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.

TMS320F28069: Change Variable Value in .out file

Part Number: TMS320F28069
Other Parts Discussed in Thread: UNIFLASH

I am able to build my simulink generated code into a .out file using CCS 10.2. However I want to be able to change the value of variables in the .out file. My use case is the customer needs to be able to change certain parameters of the SW to test different scenarios. Right now I am make changes to the value in the source code, rebuilding and sharing the updated .out file to the customer. I want the customer to be able to make changes themselves but I do not want to share the source code with the customer. 

I am able to find the variable I want to change in the map file and using nm2000.exe --all. The issue is I don't know to that the memory address and make changes inside the .out file. For example I am able to find the below struct I want to make changes to within the linker file:

GLOBAL DATA SYMBOLS: SORTED BY DATA PAGE

address data page name
-------- ---------------- ----

00010680     41a (00010680)     _TE_Rotary_Pro_P

  • We do not have a utility which supports the ability ...

    to change the value of variables in the .out file.

    There are ways to do it.  But they are not user friendly.  You will probably conclude it is easier to ...

    make changes to the value in the source code, rebuilding and sharing the updated .out file to the customer.

    This forum post shows how to change the CRC value in an .out file.  These directions do not apply to your specific case.  But the process would be similar.  Is this something you are interested in?

    Thanks and regards,

    -George

  • Hi George

    Yes this is something I am interested in implementing. Looking at the link you provided it seems like you were able to find the CRC related initialization in the assembly file using the CRC's value from the linker map file. However my linker file does not contain any value for _TE_Rotary_Pro_P so I am not sure how I can find _TE_Rotary_Pro_P in the disassembly file.

  • Mashrur,

    There are few other options to explore. However, I would like to know more about the customer's environment. Will they also be using CCS to load the program? Or are they planning on using some alternate tool like UniFlash?

    Thanks

    ki

  • Hi Ki,

    Both I and the customer are using CCS to flash by JTAG and C2Prog to flash by CAN. Current the .out file supports both as the SW has the hooks in it for the C2Prog bootloader. I would like to continue being able to flash by CAN and JTAG after making variable's value changes to the .out file.

    thanks,

    Mashrur

  • If CCS over JTAG can be used, then one option is to use the loadProg command in the Scripting Console. It will allow you to pass arguments to main (argc/argv). These arguments can be used to set the variable value. 

    Another option is to use loadti. It is a command-line loader. loadti can be used load the program and pass arguments to main:

    https://dev.ti.com/tirex/explore/node?node=APTlbjPVSx2Y60AlJCPW8A__FUz-xrs__LATEST

    ki