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.

CODECOMPOSER: Question on "load program" and "load symbol"

Part Number: CODECOMPOSER


Hi folks,

I have this question since starting using CCS and I have found similar questions and answer here: https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/314281/difference-between-program-load-and-symbol-load#:~:text=the%20difference%20is%20basically%20whether,symbolic%20debug%20information%20as%20well.

I just want to double check on the adopted answer to follow up on further details. I am using CCS working with AM62x board / C2k by the way. Below the bold font are questions of mine.

1. Q: Suppose target already has the running program, if we again use the option: load program, then what will happen ? Will the program runs again from start ?
The target will be halted, the program will be loaded to the target and the program counter set to the entry point of program. Depending on your debugger options, it may auto-run to main or some other specified label

I am trying to understand "target already has the running program" --  for example, I am working with the m4 mcu on AM62x board. I put the binary (.out) file which built from CCS project to /lib/firmware, and changed the symbolic link so directs to that binary, reboot the board -- after that, is it considered as "target already has the running program"?


2. Q:Suppose target already has the running program, if we again use the option: load Symbol, then what will happen ?
The symbols will be loaded without halting the target


3. Q: If the target does not have the program, then in this case, what is the difference between load program and load symbol ?
load program loads code to the target and symbols to the debugger. load symbol loads symbols to the debugger and nothing to the target

Since symbols loaded but nothing on target, seems the second scenario (load symbol loads symbols to the debugger and nothing to the target) will not function, does it? 


4.Q: What is meant by 'symbolic debug information' ?
The information that the debugger needs to provide debug visibility to the program (source code correlation, etc)

I am still trying to understand it,  is symbolic debug info like watching variables / expressions?

Thanks

ki

  • Hello,

    I am trying to understand "target already has the running program" --  for example, I am working with the m4 mcu on AM62x board. I put the binary (.out) file which built from CCS project to /lib/firmware, and changed the symbolic link so directs to that binary, reboot the board -- after that, is it considered as "target already has the running program"?

    Simply - if the target is already running the program. That is basically it. How the program got on to the target and executed can vary.

    Since symbols loaded but nothing on target, seems the second scenario (load symbol loads symbols to the debugger and nothing to the target) will not function, does it? 

    Unless the code was already loaded to the target previously and still remains. Otherwise, yes it would not function if only symbols are loaded and there is no actual code on the target.

    I am still trying to understand it,  is symbolic debug info like watching variables / expressions?

    yes exactly. Without debug symbols you cannot view variables/expression, you cannot do any source level debug like source stepping or setting breakpoints on a source line, etc. You lose a lot of debug visibility without debug symbols. 

    The most common reason why you would load symbols only is if you are trying to debug a program that is already flashed on the target. So no need to reflash the device if nothing changed.

    See; https://dev.ti.com/tirex/explore/node?node=A__AHYKykEFJwnuq4iL9jMMNA__ccs_devtools__FUz-xrs__LATEST

    Thanks

    ki

  • Thanks Ki for the helpful clarification. appreciate that!