Hello,
I am noticing software breakpoints are not working in functions that are transferred to RAM at runtime. should they be working?
Is there a way to get them to work?
Stephen
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.
Hello,
I am noticing software breakpoints are not working in functions that are transferred to RAM at runtime. should they be working?
Is there a way to get them to work?
Stephen
Hi,
Go through these links:
http://processors.wiki.ti.com/index.php/Software_Breakpoints_in_the_IDE
http://processors.wiki.ti.com/index.php/How_Do_Breakpoints_Work#Software_Breakpoints
I hope these links solve your issue.
Regards,
Gautam
Hello Gautam,
Thanks for the reply.
I already knew how software and hardware breakpoints work. Also, I would rather not have to add breakpoints programmatically to the code.
For my situation, some of the code is downloaded to Flash and then copied to RAM at run-time.
Is it possible to make the IDE aware of this situation, so it will be successful in placing the software breakpoints in RAM.
Currently, I corrected the issue by loading the functions directly into RAM; however, I would like to keep it the same way as it is in the production code (i.e. loaded into flash and transferred to RAM at runtime).
Stephen
Hello Ki,
This is what I specified in the Linker Command File:
ramfuncs : LOAD = FLASHA, PAGE = 0
RUN = RAML0L1L2L3, PAGE = 0
LOAD_START(_ramfuncs_loadstart),
LOAD_SIZE(_ramfuncs_loadsize),
RUN_START(_ramfuncs_runstart)
I added the following above the function declaration:
#pragma CODE_SECTION(function1, "ramfuncs")
void function1(void)
{
...
}
Stephen
stevenh said:Also, I'm only able to set one Hardware Breakpoint. I am using the Docking Stn USB-EMU [R3].
Is that a limitation of having a free code composer license?
No. The free license would not limit the number of breakpoints in any way.
Note that the debugger will try to silently set some breakpoints. Like at 'main', the exit point of your application and for C I/O if you have an C I/O calls. If any of those locations are in flash, they would silently use a hardware breakpoint. You can disable the auto-setting of these breakpoints in the debugger options. Also note that setting watchpoints or using the profile clock use the same resource that setting a HW breakpoint would. So keep track of how many resources you are using. Single steeping also uses a breakpoint.
Ki-Soo Lee said:That looks right, And I would expect the debugger to correctly set breakpoints. Let me try this out myself.
I tried this out myself and this works as expected for me. I have a function with different load and run addresses and the code for it is transferred to the run address at runtime. When I set a breakpoint, it always sets it at the correct run address of the function.
When you set a breakpoint, check the breakpoint in the breakpoint view and make sure it is being set at the run address.
Ki-Soo Lee said:You can disable the auto-setting of these breakpoints in the debugger options. Also note that setting watchpoints or using the profile clock use the same resource that setting a HW breakpoint would. So keep track of how many resources you
I didn't see any options in Preferences C/C++->Debug or Run/Debug for disabling auto-settings.
Stephen
Ki-Soo Lee said:When you set a breakpoint, check the breakpoint in the breakpoint view and make sure it is being set at the run address.
I couldn't find anything that shows it being set at the run address. The breakpoint window just shows the filename and line #.
Stephen
stevenh said:Why does CIO need a breakpoint?
See:
http://processors.wiki.ti.com/index.php/Tips_for_using_printf#Special_Breakpoints
Ki-Soo Lee said:Right-click on the breakpoint in the breakpoink view and then select 'breakpoint properties' in the context menu. you can then see much more details on the breakpoint. You may have to exapnd some nodes to see them all.
The breakpoint properties shows the correct RAM address. The file has the breakpoint is a linked file;However, the breakpoint also doesn't work in the non-linked file.
Stephen
What is the behavior you are observing? Do the breakpoints fail to get set? Or do they appear to get set but the target does not stop at the address? If you manually set a breakpoint at the address (instead of setting it by referencing a source line), does the breakpoint trigger?
Could you provide a small, reproducible test case? If that is not possible, please provide your generated map file
Thanks
ki