Naveen Saini e3177011b2 zephyr-kernel/2.7: update to zephyr v2.7.3
003de78ce0 release: Zephyr 2.7.3
9502d500b6 release: security: Notes for 2.7.3
2a88e08296 release: update v2.7.3 release notes
e1ee34e55c drivers: sensor: sm351lt: Fix global thread triggering bug
2ad1ef651b Bluetooth: host: Fix L2CAP reconfigure response with invalid CID
089675af45 Bluetooth: host: Fix L2CAP reconfigure response with invalid MTU
03ff0d471e net: route: Fix pkt leak if net_send_data() fails
cd96136bcb boards: nucleo_wb55rg: Fix documentation about BLE binary compatibility
567fda57df tests: drivers: can: api: add test for RTR filter matching
b14f356c96 drivers: can: loopback: check frame ID type and RTR bit in filters
874d77bc75 drivers: can: mcux: flexcan: fix handling of RTR frames
ec0befb938 drivers: can: mcan: acknowledge all received frames
273e90a86f scripts: release: list_backports: use older python dict merge method
59dc65a7b4 ci: backports: check if a backport PR has a valid issue
8ff8cafc18 scripts: release: list_backports.py
ba07347b60 scripts: release: use GITHUB_TOKEN and start_date in scripts
e423902617 tests: posix: pthread: test for pthread descriptor leaks
018f836c4d posix: pthread: consider PTHREAD_EXITED state in pthread_create
f4466c4760 tests: cpp: cxx: Add qemu_cortex_a53 as integration platform
9a5cbe3568 tests: cpp: cxx: Test with various types of libc
5b7b15fb2d tests: cpp: cxx: Add dynamic memory availability test for static init
e5a92a1fab tests: cpp: cxx: Add static global constructor invocation test
74f0b6443a lib: libc: newlib: Initialise libc heap during POST_KERNEL phase
6c16b3492b lib: libc: minimal: Initialise libc heap during POST_KERNEL phase
1831431bab lib: posix: semaphore: use consistent timebase in sem_timedwait
765f63c6b9 cmake: remove xtensa workaround in Zephyr toolchain code.
062306fc0b cmake: zephyr toolchain code cleanup
8fcf7f1d78 Revert "cmake: Zephyr sdk backward compatibility with 0.11.1 and 0.11.2"
f06b3d922c Bluetooth: Controller: Fix PHY update for unsupported PHY
b75c012c55 drivers: spi: stm32 spi with dma must enable cs after periph
1efe6de3fe drivers: i2c: Fix infinite recursion in driver unregister function
39270ed4a0 Bluetooth: Mesh: Fix segmentation when sending proxy message
81ffa550ee Bluetooth: Mesh: Check SegN when receiving Transaction Start PDU
8c2965e017 Bluetooth: Mesh: add check for rx buffer overflow in pb adv
7aa38b4ac8 drivers: can: m_can: fix alignmed issues
6dd320f791 release: update v2.7.2 release notes
ecac165d36 logging: shell: fix shell stats null pointer dereference
132d90d1bc tests/bluetooth/tester: Refactor Read UUID callback
58356313ac coredump: adjust mem_region find in gdbstub
99cfd3e4d7 Bluetooth: Controller: Fix per adv scheduling issue
780588bd33 edac: ibecc: Add support for EHL SKU13, SKU14, SKU15

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Tested-by: Jon Mason <jon.mason@arm.com>
2022-09-21 11:51:20 +08:00
2022-09-08 21:16:28 +08:00
2022-08-05 12:50:19 +08:00

Building Zephyr Images via bitbake recipes
==========================================

More detailed and up-to-date information can be found here:

https://wiki.yoctoproject.org/wiki/TipsAndTricks/BuildingZephyrImages

Prerequisites:
==============

This layer depends on:
    Yocto distro (master)
        git://git.yoctoproject.org/poky
    Python layer (meta-openembedded/meta-python)
        git://git.openembedded.org/meta-openembedded

Add "meta-openembedded/meta-oe" to BBLAYERS
Add "meta-openembedded/meta-python" to BBLAYERS
Add "meta-zephyr-core" and "meta-zephyr-bsp" to BBLAYERS

Building and Running Zephyr Samples
===================================

You can build Zephyr samples. There are several sample recipes.

To use the Yocto toolchain, modify local conf by adding:
    DISTRO="zephyr"

To use the Zephyr pre-built toolchain, modify local conf by adding:
    ZEPHYR_TOOLCHAIN_VARIANT = "zephyr"

For example, to build the Zephyr "philosophers" sample:
    
    $ MACHINE=qemu-x86 bitbake zephyr-philosophers
    
You can then run the created "philosophers" image in qemu:

    $ runqemu qemu-x86
    
The same sample, for ARM image:

    $ MACHINE=qemu-cortex-m3 bitbake zephyr-philosophers
    $ runqemu qemu-cortex-m3
    
The same sample, for Nios2 image:

    $ MACHINE=qemu-nios2 bitbake zephyr-philosophers
    $ runqemu qemu-nios2

Flashing
=================================

You can flash Zephyr samples to boards. Currently, the following MACHINEs
are supported:
 * DFU:
  - arduino-101-sss
  - arduino-101
  - arduino-101-ble
 * pyocd:
  - 96b-nitrogen

To flash the example you built with command e.g.

    $ MACHINE=96b-nitrogen bitbake zephyr-philosophers

call similar command with explicit flash_usb command:

    $ MACHINE=96b-nitrogen bitbake zephyr-philosophers -c flash_usb

dfu-util and/or pyocd need to be installed in your system. If you observe
permission errors or the flashing process seem to hang, follow those instructions:
https://github.com/pyocd/pyOCD/tree/master/udev

By default, pyocd tries to flash all the attached probes. This behaviour can be
customised by defining the PYOCD_FLASH_IDS variable as a space-separated list
of IDs. Once that is set, the tool will only try to program these IDs. You can
query for the IDs by running `pyocd list` on your host while having the probes
attached. Besides setting this variable through the build's configuration or
metadata, you can also inject its value from command line with something like:

    $ PYOCD_FLASH_IDS='<ID1> <ID2> <ID3>' BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE PYOCD_FLASH_IDS" bitbake <TARGET> -c flash_usb

Building and Running Zephyr Tests
=================================
Presently only toolchains for ARM, x86, IAMCU and Nios2 are supported.
(For ARM we use CortexM3 toolchain)

To run Zephyr Test using Yocto Image Tests, ensure following in local.conf:

    INHERIT += "testimage"

You can build and test an individual existing Zephyr test.
This is done by appending the actual test name to the "zephyr-kernel-test",
for example:

    $ MACHINE=qemu-x86 bitbake zephyr-kernel-test-sleep
    $ MACHINE=qemu-x86 bitbake zephyr-kernel-test-sleep -c testimage

You can also build and run all Zephyr existing tests (as listed in the file
zephyr-kernel-test.inc). For example:

    $ MACHINE=qemu-x86 bitbake zephyr-kernel-test-all
    $ MACHINE=qemu-x86 bitbake zephyr-kernel-test-all -c testimage
or 
    $ MACHINE=qemu-cortex-m3 bitbake zephyr-kernel-test-all
    $ MACHINE=qemu-cortex-m3 bitbake zephyr-kernel-test-all -c testimage
or 
    $ MACHINE=qemu-nios2 bitbake zephyr-kernel-test-all
    $ MACHINE=qemu-nios2 bitbake zephyr-kernel-test-all -c testimage
        

Generating OE Machines based on Zephyr board definitions
========================================================
We currently have a recipe called generate-zephry-machines which will go through
and attempt to create an OE machine conf file for every board in Zephyr.

This is run via:

MACHINE=qemu-x86 bitbake generate-zephyr-machines

The output is then put in the normal deploy dir. This recipe is really only
useful for maintainers. There is currently no way to use the Zephyr board 
definition in a single step build. So if you wish to regenerate those machines,
you will need to run the above, copy the conf files from the deploy dir to the
machine conf directory and then run your build. This shouldn't need to happen 
often.

Contributing
============

Patches for meta-zephyr should be sent to the yocto@lists.yoctoproject.org
mailing list.  See https://lists.yoctoproject.org/g/yocto for subscription
details and the list archive.  Please add [meta-zephyr] to the subject so
the patches are identifable.

Git can be configured to send mails appropriately when using git send-email:

$ git config --local sendemail.to yocto@lists.yoctoproject.org
$ git config --local format.subjectPrefix meta-zephyr][PATCH
Description
No description provided
Readme 604 KiB
Languages
PHP 46.1%
BitBake 30.8%
Python 19%
Shell 1.4%
Jinja 1.3%
Other 1.4%