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.

Compiler/TMS320F28379D: C28x Memory Map files and adding a flash section as an exercise training

Part Number: TMS320F28379D

Tool/software: TI C/C++ Compiler

Dear TI Hello,

Coming back with a multiple  questions :),

I am working on the C2000™ MCU 1-Day Workshop pdf, Lab 1: Dual-Core Debug with F2837xD and I have some profound questions about the linking process, page, section, xx.cmd and xx.map files,

1. What is the deference between PAGE1, and PAGE2 in the .cmd file? it is necessary to define 2 pages? how the cpu distinguish between page1 and page2?

2. What is the deference between F2837xD_Headers_nonBIOS_cpu1.cmd, Lab1_cpu01.map and 2837xD_RAM_lnk_cpu1.cmd ? how they are linked? including architecture ... 

3. How i could add a flash section to the .cmd file? and how i could chose RAM or FLASH from CSS?

Thank you in advance,

S.Tarik,

https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/171/cpu01.7z

 

  • Tarik,

    While not a requirement from a MCU hardware or development tools perspective (since the C28x MCU has a unified memory architecture), historical convention is to link code to program memory space on PAGE 0 and data to data memory space on PAGE 1.  The linker will function correctly if all memory is on a single page, but at least one page must be specified.

    There are two linker command files used in the lab exercise; one is the 'user' .cmd file (device memory) and the other is the header files .cmd file (peripheral memory).  You can have multiple linker command files, as long as they do not overlap.  For example, if you are using TI-RTOS, there would be a third linker command file in the project.  The .map file is a text-based summary of where the sections have been linked, the code size of each section, etc.

    If sections of code are linked to flash memory, CCS will automatically program the flash.  I suggest reviewing the F28379D standard (multi-day) workshop.  In this workshop the earlier lab exercised are run out of RAM and then the project is converted to run out of flash (lab 10).  Also, see module 2 to learn more about the linker command file.  The workshop can be found at:

    https://training.ti.com/c2000-f2837xd-microcontroller-workshop?context=1137791-1137781

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken

  • Thank you Ken

    The training is extremely helpful for me :)

    I was looking for this 

    S.Tarik,

     

  • S.Tarik,

    I am glad that the F28379D workshop materials are extremely helpful to you.  Thanks for letting me know.  I will close this thread, but please feel free to ask questions again by posting a new thread.

    - Ken