I wanted to get FOTA running on a PineTime devkit board (nrf52832) just to test and see if it works, but am getting the following error message:
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/flash/libdrivers__flash.a(spi_nor.c.obj):(.rodata.spi_nor_config_0+0x0): undefined reference to `__device_dts_ord_88'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Additional error messages:
FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf /Users/lj/Projects/GitHub/lj/blinky_ble/build_1/modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build /Users/lj/Projects/GitHub/lj/blinky_ble/build_1/mcuboot/zephyr/zephyr.hex /Users/lj/Projects/GitHub/lj/blinky_ble/build_1/mcuboot/zephyr/zephyr.elf
cd /Users/lj/Projects/GitHub/lj/blinky_ble/build_1/mcuboot && /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/cmake/3.21.0/bin/cmake --build . --
cd /Users/lj/Projects/GitHub/lj/blinky_ble/build_1/mcuboot && /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/cmake/3.21.0/bin/cmake --build . --
I'm using Zephyr and nRF Connect for VS Code. BLE was working but got the error when I added these lines to the prj.conf:
# Enable MCUboot and FOTA CONFIG_BOOTLOADER_MCUBOOT=y CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
the full prj.conf is:
CONFIG_GPIO=y CONFIG_LOG=y CONFIG_USE_SEGGER_RTT=y CONFIG_BT=y CONFIG_BT_DEVICE_NAME="MCU Test" CONFIG_BT_PERIPHERAL=y # Enable MCUboot and FOTA CONFIG_BOOTLOADER_MCUBOOT=y CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
I've looked at these articles:
- Exercise 3 - FOTA over Bluetooth Low Energy - Nordic Developer Academy (nordicsemi.com)
- Using MCUboot in nRF Connect SDK (nordicsemi.com)
- FOTA updates on nRF52 Series devices — nRF Connect SDK 2.7.99 documentation (nordicsemi.com)
I wonder if this is a clue Troubleshooting devicetree — Zephyr Project Documentation
I have a basic Blinky example I am using to test. I have two builds in it:
- nrf52dk_52832
- pinetime_devkit0
I can build on the nrf52dk but not the pinetime. These are from the .dts of each:
model = "Nordic nRF52 DK NRF52832"; compatible = "nordic,nrf52-dk-nrf52832"; chosen { zephyr,console = &uart0; zephyr,shell-uart = &uart0; zephyr,uart-mcumgr = &uart0; zephyr,bt-mon-uart = &uart0; zephyr,bt-c2h-uart = &uart0; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,code-partition = &slot0_partition; };
model = "Pine64 PineTime DevKit0"; compatible = "pine64,pinetime-devkit0"; chosen { zephyr,console = &uart0; zephyr,shell-uart = &uart0; zephyr,bt-mon-uart = &uart0; zephyr,bt-c2h-uart = &uart0; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,code-partition = &slot0_partition; zephyr,display = &st7789v; };
Repo is here ljunquera/blinky_ble (github.com)