Hi, PJ!
Sorry for stupid questions, what do you mean by “what did you do for the Softdevice/Bootloader”?
Let me tell you what I have:
- xiao nrf52840 (not a sense version), as it came from the factory
- The info_uf2.txt is the following:
UF2 Bootloader 0.6.1 lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-293-gaf8e5a90) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Seeed XIAO nRF52840
Board-ID: Seeed_XIAO_nRF52840_Sense
SoftDevice: S140 version 7.3.0
Date: Nov 12 2021
Then I’ve installed the nrfConnect SDK following the “extension path from the VS code” given by Nordic. Toolchain, sdk, etc.
When I’ve created an app I’ve added the build configuration and selected the xiao_ble/nrf52840 as my board. Built the blinky example and was trying to upload the generated uf2 to the board.
BTW, the upload also fails with similar error in Windows, so, though there were some upload issues with MacOs (judging on internet), I think this one specifically is not related to the OS.
I’ve also looked into the following file in nrf Connect SDK folder:
/opt/nordic/ncs/v2.9.0/zephyr/boards/seeed/xiao_ble/xiao_ble_defconfig and see the following lines:
# Build UF2 by default, supported by the Adafruit nRF52 Bootloader
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_USE_DT_CODE_PARTITION=y
these lines are also the part of my prj.conf under the Kconfig section.
Also, when the app is built here is the output:
[6/158] Generating include/generated/zephyr/version.h
-- Zephyr version: 3.7.99 (/opt/nordic/ncs/v2.9.0/zephyr), build: v3.7.99-ncs2
[158/158] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 39312 B 1 MB 3.75%
RAM: 16704 B 256 KB 6.37%
IDT_LIST: 0 GB 32 KB 0.00%
Generating files from /Users/user/nRf/apps/blinky_new/build/blinky_new/zephyr/zephyr.elf for board: xiao_ble
Converted to uf2, output size: 78848, start address: 0x27000
Wrote 78848 bytes to zephyr.uf2
looks like a correct offset?
Important: I’ve found your blinky PWM example in another thread. When I try to upload it via drag and drop or via the west command I have the same error, BUT, the board reboots and the application works! While with the one I’ve built I have both the error and not working program.
So, now I have questions like:
- Am I running the correct version of the bootloader for my needs?
- Do I need to run the adafruit bootloader?
P.S. The Arduino flow works good for me: with the PlatformIO extension of VS Code I can upload arduino code to the board. However, after a non successful upload of UF2 file, the next time I upload Arduino things I need to do by manually put the board into the bootloader. Then any subsequent upload works without the need of the manual bootloader mode. But this is only the “arduino” flow.
P.P.S. As I understood, in order to fully utilize best of the class BLE power consumption and, what is more important, OTA update, the only way is to used the nrf Connect SDK. So, no Arduino libraries are capable of providing me with these capabilites without culprits, correct? That’s why I’ve decided to invest into learning the SDK, and porting my code from Arduino to the SDK. I am planning to stick to C++ still, especially, that the Nordic officials posted on the forum that it is totally legal and is not hard to add the CPP support into the project. I will be missing SPI library on Arduino, but I believe there’s the one in nrf Connect SDK which will do as good. Is my understanding correct, PJ, or am I missing something?