chThdSleepX stucks while debugging on STM32F030x4
Posted: Thu Mar 07, 2019 12:57 am
In this example, I'm experiencing a strange issue:
1. [PROBLEM] When a breakpoint is put on app/main.c:44, GDB stops at the breakpoint, when I "continue" it continues and and never reaches to app/main.c:44 again, the application "crashes". I would expect GDB to stop at the same line, 10ms after I "continue"d.
2. If I comment out the "chThdSleepMilliseconds(10);" line and put a breakpoint to app/main.c:52 (for example), debugger reaches to the breakpoint. When I continue, it immediately reaches the same line as expected.
3. If I load the code directly with "make write", application works regardless the "chThdSleepMilliseconds(10);" line (44) is commented out or not.
If I change the target hardware from STM32F030 to STM32F103 and connect the appropriate board, everything works as expected. (GDB stops at line 44 while "chThdSleepMilliseconds(10);" line isn't commented out.)
What might be the cause of the [PROBLEM]?
1. [PROBLEM] When a breakpoint is put on app/main.c:44, GDB stops at the breakpoint, when I "continue" it continues and and never reaches to app/main.c:44 again, the application "crashes". I would expect GDB to stop at the same line, 10ms after I "continue"d.
2. If I comment out the "chThdSleepMilliseconds(10);" line and put a breakpoint to app/main.c:52 (for example), debugger reaches to the breakpoint. When I continue, it immediately reaches the same line as expected.
3. If I load the code directly with "make write", application works regardless the "chThdSleepMilliseconds(10);" line (44) is commented out or not.
If I change the target hardware from STM32F030 to STM32F103 and connect the appropriate board, everything works as expected. (GDB stops at line 44 while "chThdSleepMilliseconds(10);" line isn't commented out.)
What might be the cause of the [PROBLEM]?