Hey everyone,
I am a bit stuck and after countless (partly aimless) attempts, I think I'm in need of (non-AI) help. This is the first time that I am trying to flash via a debugger and it's a bit overwhelming...
Ultimately, I wanna flash an external SoC, specifically the FSC-BT634 module with the nRF52840. As the module doesn't expose USB, I have to flash my code without using the bootloader. In order to make sure everything works, I wanna try the same using the onboard SoC of the nRF52840-DK. To this end, I installed the Adafruit nRF52 boards and select the Nordic nRF52840 DK as my board. I tried flashing via Arduino IDE, but I simply cannot get it to work (*), so I need to flash it manually. Long story short, after fixing some other bugs, I managed to export the compiled binary and here's what I do:
nrfjprog --eraseall
nrfjprog --eraseall --program compiled_hex.hex --verify --reset -f nrf52
After that, I restart the board, but nothing happens. I tried setting other Pins High or Low, but nothing happens when I measure voltage at those Pins.
After some back and fourth with ChatGPT, I assumed that perhaps the .hex file I get from Arduino assumes that the Softdevice is flashed first. So I also tried
nrfjprog --eraseall
nrfjprog --eraseall --program s140_nrf52_6.1.1_softdevice.hex --verify --reset -f nrf52
nrfjprog --eraseall --program compiled_hex.hex --verify --reset -f nrf52
Again, flashing works, but nothing happens afterwards and it seems the program is simply not running.
Does anyone have an idea what I have to do in order to get this to work?
Thanks a lot for any help!
(*) First, I got errors related to adafruit-nrfutils. After I have replaced the file with one I downloaded from the web, this worked, but I now I get JLink-related errors when chosing "Upload with Programmer" ("ERROR: JLinkARM DLL load failed. Try again. If it keeps failing, please").