Loading...
 
Skip to main content

System Workbench for STM32


Breakpoint triggers on bad line number

Sure, I can agree with that.
But consider this scenario:
1. remove lines of code above or even containing breakpoint
2. build project and upload it to the MCU
3. breakpoint behaves 'unexpectedly'
When removing lines with breakpoints it also sometimes happen that the breakpoint is not removed and instead of that it is moved on a 'random' line.

The second scenario is posted in attachments. I have closed and reopened Eclipse, run clean & build with no difference. Interesting is also this:

info breakpoints
Num Type Disp Enb Address What

1 breakpoint keep y 0x08002258 in flyhero
MPU6050
Data_Read_Callback() at C:/Users/michp/git/flyhero/IMU (in development)/src/MPU6050.cpp:83 2 breakpoint keep y 0x080029b8 in flyhero
MPU6050
Start_Read_Raw() at C:/Users/michp/git/flyhero/IMU (in development)/src/MPU6050.cpp:445 3 breakpoint keep y 0x08002168 in flyhero
MPU6050
Data_Ready() at C:/Users/michp/git/flyhero/IMU (in development)/src/MPU6050.cpp:63

breakpoint already hit 1 time

Saying that line 63 is in Data_Ready() function. But viewing source file using GDB:

list 60
55 if (ddatai.state != DATA_START_READ) {
56 printf("error\n");
57 }
58 if (ddatai.delta > 40 && ddatai.delta > max)
59 max = ddatai.delta;
60 //printf("%d %d\n", i, ddatai.delta);
61 }
62
63 printf("a");
64 }

Is there anything else I can run to solve this?

 
Collapse/expand modules below