[meta-zephyr][PATCH v3 0/5] Add 96Boards Nitrogen support
From: Wojciech Zmuda <wojciech.zmuda@...>
v2 -> v3:
- fix accidentally broken QEMU builds. The build failed when do_deploy looked
for .hex files that were generated for physical machines but not for QEMU
(which does not need them). Fix the issue by reverting the change of generating
.hex files. They were introduced for pyocd, but it occurs that pyocd is happy
with ELFs, so this idea of .hex files was removed altogether from this patch set.
Instead, zephyr-flash-pyocd gets ELFs and happily flashes Nitrogen.
- fix building zephyr-kernel-test-all targets for physical boards. Explained in
commit message of patch 5/5.
v1 -> v2:
- README.txt: fix bad MACHINE examples: change _ to -, i.e. 96b_nitrogen -> 96b-nitrogen
This patch set adds support for the Nitrogen board by 96Boards.
The support consists of:
- adding configs for Cortex-M4, nRF52832 SoC and Nitrogen board,
- adding bbclass with pyocd-based do_flash_usb() implementation.
Tested on Nitrogen and on QEMU so I hope I didn't accidentally
1. Install pyocd.
2. Connect Nitrogen and make sure you can see Bus 001 Device 004: ID 0d28:0204 NXP ARM mbed
3. Build a sample app:
$ MACHINE=96b-nitrogen DISTRO=zephyr bitbake zephyr-philosophers
4. Flash app to the board:
$ MACHINE=96b-nitrogen DISTRO=zephyr bitbake zephyr-philosophers -c flash_usb
You can also build the test suite i.e. bitbake zephyr-kernel-test-all
and manually flash Nitrogen with images from the deploy directory. They are
not picked up by do_flash_usb implementation from zephyur-flash-pyocd,
as it works with single ELF file with the same name that the target has.
The same limitation is present in the current do_flash_usb implementation
from the zephyr-flash-dfu class.
Wojciech Zmuda (5):
zephyr-kernel: clone Nordic HAL
conf: machine: add support for Nordic nRF52832 Cortex-M4 chip
conf: machine: add 96boards Nitrogen support
zephyr-kernel: don't limit deploy to .elf file
zephyr-flash-pyocd.bbclass: support for flashing via pyocd
README.txt | 23 +++++++++++++++++++
classes/zephyr-flash-pyocd.bbclass | 17 ++++++++++++++
classes/zephyr-kernel-src.bbclass | 7 +++---
conf/machine/96b-nitrogen.conf | 8 +++++++
conf/machine/include/nrf52832.inc | 10 ++++++++
conf/machine/include/tune-cortexm4.inc | 19 +++++++++++++++
.../zephyr-kernel/zephyr-helloworld.bb | 3 ++-
recipes-kernel/zephyr-kernel/zephyr-image.inc | 2 +-
.../zephyr-kernel/zephyr-kernel-common.inc | 5 +++-
.../zephyr-kernel/zephyr-philosophers.bb | 3 ++-
10 files changed, 90 insertions(+), 7 deletions(-)
create mode 100644 classes/zephyr-flash-pyocd.bbclass
create mode 100644 conf/machine/96b-nitrogen.conf
create mode 100644 conf/machine/include/nrf52832.inc
create mode 100644 conf/machine/include/tune-cortexm4.inc