This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, I have a couple of questions regarding break point:
1. in this simple function, I am able to put break point on line828, but not 825 and 827. Why so? what are the rules of break points?
2. the break points set below, doesn't stop the program at all, when i hit run after launch, it run right through those break points.
Hello,
1. in this simple function, I am able to put break point on line828, but not 825 and 827. Why so? what are the rules of break points?
This function appears to be in flash and the debugger is trying to set hardware breakpoints. Note that there are a limited number of hardware breakpoints available. When you run out, it will set the hardware breakpoints as disabled (grey-ed out like in 825 and 827). When you run out, you should get notified of this, Did you get some error message like described in the below link?
https://dev.ti.com/tirex/explore/node?node=AFxRAHEqhlcitK5yopkNoA__FUz-xrs__LATEST
2. the break points set below, doesn't stop the program at all, when i hit run after launch, it run right through those break points.
I see that you are using software breakpoints in this case. Is this function in RAM or flash? If RAM, did you set these breakpoints while the target was halted? If so, can you confirm that those lines should have been executed?
Thanks
ki
Hi, Ki,
Thanks a lot for your response.
1. How many h/w break points can i put in? this is the link suppose to have 'error message', i don't know what to look for?
2. when setting break points, i just double clicked the left side of the line, some times it is H/W type, some times it is software type. That confuses me, is there a document on break points?
The code is down loaded to flash, but in the device_init() function, it copies some to the RAM. Attached are the code that copying program from flash to RAM, and the linker.cmd file. Looks like only sfra/isr/dcl functions are in RAM. So to your question, the part of the program that i try to put break points are in Flash.
I sets this points when goes into debug mode, before run(programmer points to first line in main()). What is the difference?
#ifdef _FLASH
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
memcpy(&isrcodefuncsRunStart, &isrcodefuncsLoadStart,
(size_t)&isrcodefuncsLoadSize);
#endif
This is from the linker.cmd file:
SECTIONS
{
codestart : > BEGIN, PAGE = 0, ALIGN(4)
.text : >>FLASH_BANK0_SEC1 | FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3, PAGE = 0, ALIGN(4)
.cinit : > FLASH_BANK0_SEC0, PAGE = 0, ALIGN(4)
.init_array : > FLASH_BANK0_SEC0, PAGE = 0, ALIGN(4)
.switch : > FLASH_BANK0_SEC0, PAGE = 0, ALIGN(4)
.const : > FLASH_BANK0_SEC0, PAGE = 0, ALIGN(4)
.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */
.stack : > RAMM1, PAGE = 1
.data : > RAMLS0LS1, PAGE = 1
.bss : > RAMLS0LS1, PAGE = 1
.sysmem : > RAMGS2, PAGE = 1
GROUP
{
.TI.ramfunc
{
-l sfra_f32_tmu_eabi.lib
}
ramfuncs
} LOAD = FLASH_BANK0_SEC6,
RUN = RAMGS0GS1,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
SFRA_F32_Data : > RAMLS0LS1, ALIGN = 64, PAGE = 1
FPUmathTables : > FLASH_BANK0_SEC11, PAGE =0
.scratchpad : > RAMLS0LS1, PAGE = 1
.bss_cla : > RAMLS0LS1, PAGE = 1
controlVariables : > RAMLS0LS1, PAGE = 1
.const_cla : LOAD = FLASH_BANK1_SEC8_9_10,
RUN = RAMLS2LS3LS4LS5,
RUN_START(Cla1ConstRunStart),
LOAD_START(Cla1ConstLoadStart),
LOAD_SIZE(Cla1ConstLoadSize),
PAGE = 0
GROUP
{
isrcodefuncs
dclfuncs
} LOAD = FLASH_BANK1_SEC8_9_10,
RUN = RAMLS2LS3LS4LS5,
LOAD_START(isrcodefuncsLoadStart),
LOAD_SIZE(isrcodefuncsLoadSize),
LOAD_END(isrcodefuncsLoadEnd),
RUN_START(isrcodefuncsRunStart),
RUN_SIZE(isrcodefuncsRunSize),
RUN_END(isrcodefuncsRunEnd),
PAGE = 0, ALIGN(4)
/* CLA specific sections */
Cla1Prog : LOAD = FLASH_BANK1_SEC8_9_10,
RUN = RAMLS2LS3LS4LS5,
LOAD_START(Cla1ProgLoadStart),
RUN_START(Cla1ProgRunStart),
LOAD_SIZE(Cla1ProgLoadSize),
PAGE = 0, ALIGN(4)
}
Hmmm.... the page did not open properly in your browser. It should look like:
Does this direct link work?
https://software-dl.ti.com/ccs/esd/documents/troubleshooting_no-aet-resources.html
1. How many h/w break points can i put in?
It varies per device but I believe the F280049 supports more than the usual 28x device. Perhaps 8?
2. when setting break points, i just double clicked the left side of the line, some times it is H/W type, some times it is software type. That confuses me, is there a document on break points?
The debugger will read the debugger memory map to determine if the memory is flash or RAM. If flash, it will set a HW breakpoint. If RAM, it will set a SW breakpoint.
I sets this points when goes into debug mode, before run(programmer points to first line in main()). What is the difference?
I believe the debugger would be expecting the code in RAM. If you try to set breakpoints before the code is copied to RAM, then that may be the issue. Would you be able to share your project+executable? If you do not wish to share publicly, please start private E2E conversation with me.
Thanks
ki
hi, Ki,
I am not able to open the webpage, neither through ccs>resource explorer.
I zip the whole project, how to send it to you?
I am not able to open the webpage, neither through ccs>resource explorer.
It must be some conflict with your local network. Are you on your company network? If so, can you try to see if you can load those pages when not on corporate network?
I zip the whole project, how to send it to you?
Please start a private E2E conversation with me.
Thanks
ki
This issue was resolved offline. There were multiple issues. The first was that some breakpoints were set before a debug session was started, hence not associated with any debug context. The second was that one of the exmaple being used has heavy optimization enabled - which would impact source level debug visibility.