| Breakpoint problem [message #1855503] |
Tue, 18 October 2022 12:56  |
Eclipse User |
|
|
|
I use Eclipse to develop a number of projects on custom hardware using STM32 ARM processors. I have Eclipse version 2022-09, compiled for Embedded C/C++ Developers, installed on several Windows PC's. A few months have passed since I last did any development work, and I ran Help>>Check for updates before starting work.
However, I can't get breakpoints working correctly. Projects typically start like this:
main(void){
u32 x32 = 0;
RCC_RMVF = 1;
prvMain.HostAddress = -1;
prvMain.ModuleAddress = -1;
Tick.MainLoopCnt10us = 100000;
Cal = *(tAnalogueCal*)FLASH_SUPER_BLOCK_ADDR;
if ((Cal.Gain[0] < 0.5) || (Cal.Gain[0] > 2.0)){
x32 = 4;
for(x32 = 0; x32 < 4; x32++){
Cal.Offset[x32] = 0;
Cal.Gain[x32] = 1.0;
}
}
InitialiseSTM32();
while(1){
prvCheckSwitches();
.
.
}
}
I have added breakpoints on various lines before the while statement, and at the line prvCheckSwitches();. However, when I run it the only breakpoint that is actioned is the one at prvCheckSwitches();. If I look at the disassembly I can see the code and the breakpoints. The same applies regardless of which project I run or the PC on which I run it.
The only common factor is Eclipse and it's add-ons.
Any suggestions?
|
|
|
|
|
| Re: Breakpoint problem [message #1855523 is a reply to message #1855503] |
Wed, 19 October 2022 09:11  |
Eclipse User |
|
|
|
The devil is in the details, and you have left them out.
I guess that you're running a STM32 processor and connecting to it via an USB - to - JTAG dongle (ST-link?).
If you're running the target code from Flash memory on the target chip, GDB has to use the built-in debug registers in the chip to implement breakpoints. There is actually nothing of the breakpoints in the code.
My guess it that InitialiseSTM32() plays with the registers, and they are not fully functional before the initialisation. I'm not going to wade again the swampy mess of STM code to look at it.
|
|
|
Powered by
FUDForum. Page generated in 0.04064 seconds