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.

TMS320F280049C: Problems with

Part Number: TMS320F280049C

I am a new embedded developer who is currently taking the TMS320F28004x Microcontroller Workshop found here training.ti.com/c2000-f28004x-microcontroller-workshop

I am reading the F20004x_Microontroller_1-0.pdf workbook provided with the workshop and I do not understand some of the concepts in the Linking section, starting on page 2-18. 

In the course Lab 2 shows the following memory map:

But the TMS320F28004x Data Sheet shows a different memory map:

I am trying to understand the difference between the two memory maps. I have the following questions:

  1. Why are the .text and .cinit sections put into RAM even though the previous pages of the workbook indicated they should be put into FLASH? 
  2. Why is the last memory section of PAGE 0 called RAMGS01 instead of RAMGS0?
  3. In the MEMORY section of the linker command file, can the name that is associated with the address be any name and the person who wrote the file just decided for some reason to add a 1 to the end of the name? 
  4. Why was RAMGS1 not included in the memory map? 
  5. Why was RAMM0 set with an origin address of 0xF5 and not 0xF0. And why was the length set to 0x30B and not 0x3FF?

I suppose the answer to the questions is that we are free to use any memory. For example, if you don't want to use LS0RAM, then don't put it into the MEMORY section. Further more if you do want to use LS0RAM, you can call it whatever you want and you can pick any particular starting and ending address. 

Or I could place everything into RAMM0, assuming it was big enough for everything. 

Furthermore, I suppose I could name RAMM0 like this:

MEMORY

{

MY_FAVORITE_MEMORY: origin = 0x0, length 0x234

}

Am I correct in my assumptions? If so, it might be a good idea to add a comment to the workbook to let new users understand that the linker command memory map does not have to match the memory map in the data sheet. And that we are free to allocate memory however we want….you don’t have to put code and initial values in flash if you don’t want to. 

Obviously there are limits, I assume you could not put PAGE 1 data into FLASH. This is correct isn't it?

  • Hi Clark,

    I suppose the answer to the questions is that we are free to use any memory. For example, if you don't want to use LS0RAM, then don't put it into the MEMORY section. Further more if you do want to use LS0RAM, you can call it whatever you want and you can pick any particular starting and ending address. 

    That is correct. We also release a sample linker cmd for RAM and for FLASH in C2000Ware which user can start with.

    Or I could place everything into RAMM0, assuming it was big enough for everything. 

    Technically yes though we do not recommend that. Also we have small RAMM0 so it'll not be possible. And yes, you can name it anything you want in your linker cmd file.

     If so, it might be a good idea to add a comment to the workbook to let new users understand that the linker command memory map does not have to match the memory map in the data sheet. And that we are free to allocate memory however we want….you don’t have to put code and initial values in flash if you don’t want to. 

    Please note that RAM is volatile memory so user can not keep the application in RAM. User can use the RAM for initial development and debug but final code always get mapped into FLASH unless they want to download the code every time from external storage device via one of the bootmode which will delay the boot process significantly.

    I would suggest to refer this page for more info on linker cmd file.

    Regards,

    Vivek Singh

     

  • Hello Vivek,

    Thank you for your rapid response. This is why I have moved from STM to TI. Your products are great and your support is infinitely better!

    You did a good job of answering my questions, but I do have a followup question.

    In the workshop, the author started RAMM0 memory at 0xF5 instead of ox0. I realize that it is possible to do this and that the linker won't complain, but is there any reason someone would actually want to do this? 

  • Hi Clark,

    Thank you.

    In the workshop, the author started RAMM0 memory at 0xF5 instead of ox0. I realize that it is possible to do this and that the linker won't complain, but is there any reason someone would actually want to do this? 

    As you know we have BOOTROM code and some portion of RAMM0 is used for BOOTROM code stack hence some portion of RAMM0 is not allocated to user code in this sample linker cmd file. 

    Regards,

    Vivek Singh