Setup: J-Link V6.72a on Ubuntu 18.04 for my STM32F302CC using J-Link Mini EDU.
Configurations: Using CLion with "Embedded GDB Server": /usr/bin/JLinkGDBServer -select USB -device STM32F302CC -endian little -if SWD -speed 4000 -ir -LocalhostOnly -vd -strict
When I try to add a new breakpoint in CLion, the debugger will immediately break at whatever line is being executed with a SIGTRAP (i.e. NOT where I set the breakpoint). Note that this is different than the SIGINT that I would receive for a normal breakpoint. I can continue the program execution manually afterwards but this is quite inconvenient.
Suppose I am adding breakpoint 5 to main.c:627. This is what I observe (with some annotated comments):
Configurations: Using CLion with "Embedded GDB Server": /usr/bin/JLinkGDBServer -select USB -device STM32F302CC -endian little -if SWD -speed 4000 -ir -LocalhostOnly -vd -strict
When I try to add a new breakpoint in CLion, the debugger will immediately break at whatever line is being executed with a SIGTRAP (i.e. NOT where I set the breakpoint). Note that this is different than the SIGINT that I would receive for a normal breakpoint. I can continue the program execution manually afterwards but this is quite inconvenient.
Suppose I am adding breakpoint 5 to main.c:627. This is what I observe (with some annotated comments):
Program received signal SIGTRAP, Trace/breakpoint trap. # The SIGTRAP happens as soon as I set the breakpoint, and we pause at task.c:3376 because the program execution happens to be there
0x08008dd8
in prvCheckTasksWaitingTermination () at
/home/thekenu/Consolidated-Firmware/boards/DIM/Middlewares/Third_Party/FreeRTOS/Source/tasks.c:3376
3376 while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U )
# Here I press "Continue", and we pause at main.c:627 where breakpoint 5 was set
Breakpoint 5, StartTask1kHz (argument=0x0) at /home/thekenu/Consolidated-Firmware/boards/DIM/Src/main.c:627
627 Io_CanTx_EnqueuePeriodicMsgs(
The post was edited 4 times, last by thekenu ().