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.

CCS/TMS320F2812: about F2812.cmd file

Part Number: TMS320F2812


Tool/software: Code Composer Studio

Hi, Thank you for your  solution last time.  I learn that the file (F2812.cmd) is made up of two parts: PAGE 0---program memory,  PAGE 1---Data Memory.  RAML0 is a RAM,  why put it in PAGE 0 ?   FLASHB  is a flash,  why put it in PAGE 1?  if that,  why not FLASHC or others?   looking forward to your answer.

  • Sdssh,

    Any memory type (i.e. RAM or flash) can be assigned to either memory space (i.e. program or data). As an example, during development all code (program and data) could be linked to RAM - this provides for easy debug/re-build with no need to re-flash the device for each change to the code (saving time) and it also allows for 'unlimited' number of breakpoints (based on available PC memory). The C2000 workshops use this methodology, where the lab exercises start with developing in RAM and then the final exercise changes the project to a self- contained 'embedded system' making use of flash. As for using flash in data space, this could be done for tables/constants which cannot be changed.

    While it is not a requirement from a microcontroller hardware or development tools perspective (since the C28x MCU has a unified memory architecture), historical convention is to link code to program memory space and data to data memory space. However, as explained above, this is not a 'strict' requirement. To provide you with a little more history, our very early DSP processors (based on a Harvard memory architecture) had three separate memory maps - program, data, and I/O space. This required the linker command file to have three separate memory section defined for each space. As a result, this carried forward and we still use the two memory spaces (for program and data) to simplify the understanding of the memory type usage. Technically, today with a unified memory architecture, you could have just one space (defined as PAGE 0), and the project should build and load without issue. But again, by convention we still use both program and data in the linker command file memory section.

    I hope this answers your question and if so, please click the green "Verified Answer" button. Thank you.

    - Ken