Hey, I’m looking for some help in regard to create one basic program that blinks an LED, that doesn’t use the Mbed framework(which actually works fine).
Could someone tell me, why when I start debugging the program I get an instant crash?
Have you tried debugging an mbed-os firmware using the blackmagic tool? Then you could make sure that it’s independent of the firmware loaded on the MCU.
The Mbed framework build and works fine, but debugging seems to fail as well with the same error.
done.
PlatformIO Unified Debugger -> http://bit.ly/pio-debug
PlatformIO: debug_tool = blackmagic
PlatformIO: Initializing remote target...
Target voltage: 3.3V
Available Targets:
No. Att Driver
1 LPC17xx
0x10000010 in ?? ()
Temporary breakpoint 1 at 0x236c: file src/main.cpp, line 5.
Loading section .text, size 0x803c lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x803c
Loading section .data, size 0xad0 lma 0x8044
Loading section .heap, size 0x6120 lma 0x8e40
Start address 0x173c, load size 60468
Transfer rate: 21 KB/sec, 944 bytes/write.
Warning: the current language does not match this frame.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = tbreak main`
PlatformIO: More configuration options -> http://bit.ly/pio-debug
I had to downgrade my BPM firmware, as the latest nightly doesn’t correctly recognize my microcontroller, so basically I gotta try different BMP firmware now.
Honestly, with that much trouble the BMP is giving you (and it seems to currently be a fault in the BMP probe or the GDB server it spawns) you might be better of with your old ulink2 or a plain simple ST-Linkv2 clone for ~5€ from ebay, these have never ever given me any problems.
Though you could go an and test it without the PIO part, meaning connect the BMP to the target, make it spawn a GDB server and connect to it manually using arm-none-eabi-gdb. If this basic config fails, only the BMP people can help you (or a different debugger)
Basically I’m being told in the issue, that I’m building the firmware incorrectly?
I do not see any BMP specific problem here. The target is recognized,
you can program flash. Keep in mind that LPC has some place where
a checksum or some other magic number is stored. Siglost happens,
when your target does special things, perhaps remap SWD pins or go
to deep sleep.
Changing the platformio.ini file to this allows me to debug the Mbed framework, but my own stuff throws a segmentation fault before the program is even being executed.
btw. The answer to this is that the same as the ULINK-ME, the J-Link and the Black magic Probe, all of them need the firmware to be patched before it is being flashed to the target micro controller.