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.

TMS570 USB Stick CCS4 Loader

We have been working with the TMS570 USB Stick for seven months. All of our programming in C has gone very smoothly.

My students and I are now writing Assembly language code for the TMS570.

I have written an assembly language module. I have assembled the code successfully. I have written a link command file and successfully linked the module to target FLASH and another to target RAM.  This has all been accomplished on the Command Line to avoid all the questions that might be associated with IDE, etc.

My objective is to load the object file into RAM using Code Composer Studio. Of course I would then like to execute the code using the Debugger. In the Introduction to Object Modules Chapter, Chapter 2, of theARM Assembly Language Tools v4.9 User’s Guide, Section 2.6, Loading a Program, states that:

"Code Composer Studio can load an executable object module onto hardware. The Code Composer Studio loader reads the executable file and copies the program into target memory."

I am sure this must be covered in the documentation however, I have not been able to locate this information.

At this time the module is designed to be a standalone module. Other associated questions are:

1. What is the minimum content of an .obj file? (.text only, or .text, .data and .bss)

2. Are there other code modules that must be linked with my code?

Example: --symdebug:dwarf

Of course all guidance in and around this question will be appreciated.

Thanks,

George

  • Hello,

    I will try to address each of your questions. Please let me know if I have missed any one.

    Q1 : My objective is to load the object file into RAM using Code Composer Studio. Of course I would then like to execute the code using the Debugger. In the Introduction to Object Modules Chapter, Chapter 2, of theARM Assembly Language Tools v4.9 User’s Guide, Section 2.6, Loading a Program, states that:

    "Code Composer Studio can load an executable object module onto hardware. The Code Composer Studio loader reads the executable file and copies the program into target memory."

    I am sure this must be covered in the documentation however, I have not been able to locate this information.

    >> CCS does allow you to either program the flash or RAM with an object code or a linked executable file. This is defined by the address information in the executable file and the memory map setup of the microcontroller. The default memory map setup of the MCU maps the program flash to address 0x00000000 and the data RAM to 0x08000000. Therefore, if you have a .intvecs section and a .text section that occupies memory starting at 0x00000000, CCS will program the flash when you try to download this file into the MCU.

    >> The TMS570 MCUs allow you to swap the memory maps of the program flash and data RAM, such that now the data RAM is accessed at 0x00000000 and the flash at 0x08000000. This allows you to download code directly into RAM and execute from RAM. You would need to ensure that each section in the code is mapped to a region that falls within the available RAM.

    Q2: What is the minimum content of an .obj file? (.text only, or .text, .data and .bss)

    >> An object file can have just the .text section. This would be the case when your code does not define any statically-allocated variables or any global variables.

    Q3: Are there other code modules that must be linked with my code?

    >> This depends on whether your code is referencing functions or sections defined in other libraries or object files.

    Regards, Sunil