Nordic nrf52 blink sketch not uploading

i’m working with adafruit bluefruit board i want to try on the blue led blink sketch.
It was not easy even with arduino ide but doable:

  1. install the board library
  2. installed jlink commander for linux x64
  3. install the nrftool (python code)
    sketch compiles and uploads (the regular blink sketch but using LED_BLUE instead of LED_BUILTIN).

with platform io i first tried with the LED_BUILTIN. i could compile of course, but not upload cause the default i jlink. i could see there is nrfjprog package and possibility to upload, but i had to add upload_protocol = nrfjprog to my platformio.ini file.

Before i had jlink commander installed i got an error that jlink dll is missing (dll ??? on linux ???)
after the installation i get
ERROR: There is no debugger connected to the PC. *** [upload] Error 41

i’m connected using usb cable and i get /dev/ttyUSB defined and also i am able to upload using arduino ide, however arduino ide does NOT use the nrdjprog, at least not directly. it uses nrftools which i didn’t see at all in the platform defs of the nrf52-dk.
I didn’t even try to compile with LED_BLUE.

a. does it suppose to work or am i using the wrong upload protocol ? again, using usb cable DFU upload.
b. if it should not is there any expected support in this ? not WIP but something i can actually work with.

updating my own question after looking at Support for the Adafruit Feather nRF52 Bluefruit LE board · Issue #8 · platformio/platform-nordicnrf52 · GitHub seems like i’m not the only one understanding the nrf52-dk platform is not adafruit nrf52.
also i’ve discovered many includes are missing from the compilation commands while the code itself exists in the downloaded core dependencies! a hack of custom compile flags can solve it. but it’s a hack, not a working solution.

ok. adafruit nordic nrf52 is simply not supported, not the libraries nor anything else, to make it work you need to update everything, you can start of from Support for the Adafruit Feather nRF52 Bluefruit LE board · Issue #8 · platformio/platform-nordicnrf52 · GitHub but it’s not enough.

better use cmake. i gave up pio on this, too much work to make this work which is what i was trying to avoid while using pio. Shame but seems like we’ll abandon pio alltogether and move to working with bare metals and build our own build system with cmake and jfrog bintray for bionary repo + dependency managment

This is an open source development platform for PlatformIO. Anyone can contribute and improve it. We will contact Nordic and ask them to help with all issues related to nRF51/52.

If you need commercial support for your project, please Contact Us.

1 Like