So, I’m experimenting with getting the Ada Ravenscar runtime going on a Particle device (the Argon).
The SoC in the Argon (nRF52840) happens to have the barebones of interface support already in the ada barebones project. From that I was able to put together a simple GPIO driver and get the binary built with the Ravenscar runtime.
Since Ravenscar can run on bare metal, the runtime I’m using includes its own initialization code and thus (I believe) the Particle boot loader isn’t needed.
Replace or export $OPENOCD_IFACE with the interface file for your SWD/JTAG debugger.
To restore Particle firmware, set bld_addr back to 0xF4000, flash the softdevice to 0x0, flash the bootloader to 0xF4000. You’ll probably also want to restore system-part1 and user firmware/tinker as well, though you can do that by USB/DFU or SWD/JTAG.
Thanks, that’s very helpful. While I was waiting on your response I went ahead and flashed it to 0x00 and it seems to work (my little program flashes the led). However, it seems then I’ve overwritten the soft device, which I will be needing presumably.
I’ll try flashing back the soft device and seeing if I can still get the program going from that address.