Open ViggoAvatar opened 2 years ago
To get STM8 debugging via STLink to work under Ubuntu 22.04, I had to perform the below 2 steps:
Same issue here, but its not related to starting a debug seesion, but to compile in debug mode. To actual start stm8-gdb above two actions are required unless stm8-gdb won't start, but the coredump is when "--debug" is issued. I am currently not sure if this is related to sduino lib / sdcc or some memory issues. I can compile WInterrupts.c manually without --debug. but with debug the core dumps.
[...]
+ /.platformio/packages/toolchain-sdcc/bin/sdasstm8 -plosgffwy ".pio/build/arduino/FrameworkArduino/WInterrupts.c.asm"
Segmentation fault (core dumped)
+ /.platformio/packages/toolchain-sdcc/bin/sdasstm8 -plosgffwy ".pio/build/arduino/FrameworkArduino/WInterrupts.c.asm" returned errorcode 35584
Hello all, I'm having issues with starting a debug session on the STM8S003F3
Output from the debug terminal: Compiling .pio/build/stm8s003f3/FrameworkArduino/weak_atexit.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/weak_initVariant.c.rel /home/tom/.platformio/packages/framework-arduinoststm8/cores/sduino/weak_atexit.c:13: warning 85: in function atexit unreferenced function argument : 'func' /home/tom/.platformio/packages/framework-arduinoststm8/cores/sduino/WInterrupts.c:73: warning 85: in function attachInterrupt unreferenced function argument : 'mode' Compiling .pio/build/stm8s003f3/FrameworkArduino/weak_serialEvent.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring-alternate-function.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring-delay-microseconds.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring-delay.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring-init.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring-micros.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring-millis.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring_analog.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring_digital-tables.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring_digital.c-1.c.rel Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring_digital.c-2.c.rel Segmentation fault (core dumped) Compiling .pio/build/stm8s003f3/FrameworkArduino/wiring_digital.c-3.c.rel *** [.pio/build/stm8s003f3/FrameworkArduino/WInterrupts.c.rel] Error 1 ========================== [FAILED] Took 1.48 seconds ==========================
This is after trying on linux, the same issue arose on winows without the segfault.
platform.ini is basic: [env:stm8s003f3] platform = ststm8 board = stm8s003f3 framework = arduino
and application even more so (main.c):
include
void setup() { // put your setup code here, to run once: pinMode(PA1, OUTPUT); }
void loop() { // put your main code here, to run repeatedly: digitalWrite(PA1, 1); delay(100); digitalWrite(PA1, 0); delay(100); }
any help would be much appreciated