Hello all,
I am trying to prove that I can compile and upload some simple code that I have written and run it successfully on an nrf52840.
I'm using an mdbt50q-db-40 development board from Raytac, a raspberry pi 3 and openocd to flash the mcu over swd, and platformio (arduino framework) as an ide to write and compile the code.
So far, I have been successful with flashing premade a bootloader that lets me upload code over the usb interface.
However, I am struggling to get some simple code of my own to run.
(In this instance, I am not using any bootloader, I am under the impression that this is not necessary if I am not using the usb/dfu, etc features?)
#include <Arduino.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
I seem to be able to upload the code without issue, however when trying to get it to run, openocd spits out this.
> reset run [nrf52840.cpu] halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x2000002e msp: 0x2000ffc8
I don't believe that I have set any breakpoints or similar.
I have also tried a simple blink script, but haven't observed any movement on any of the nrf52840 pins when disconnected from the swd interface.
I'm aware that this question is probably better suited to the openocd community, but I'm hoping to get some insight from you guys!
Thanks for all the help,
Joe