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.

TMS320F28035: .out, flash memory usage

Other Parts Discussed in Thread: TMS320F28035

Hi all, I've searched on the C2000 and Code Composer forum sections but I couldn't find an answer, so I'm going to post my question here:

I'm using a TMS320F28035 MCU and I want to know the exact size of the FLASH that is going to be used on the device by uploading the .out file. I have to select the right chip of the F28035 family that mounts the amount of FLASH necessary to hold the binary of my executable but I haven't found a way to get to that size. Is there a simple procedure to get the actual number of bytes occupied in the devices FLASH memory by the executable?

Best Regards,

Christian

  • If you have an .out file, you should also have (or be able to generate) a .map file.  The map file gives you "used" sizes for your flash sections.

    Another way to do it (though, this is my second choice) is to generate a hex file using the hex utility (ccsv5\tools\compiler\c2000\bin\hex2000).  The number of characters in that hex file should give you a good approximation of how many words of flash the .out file will require.

     

  • Hi quark, thanks for the reply.

    Indeed I have a .map file. In the "MEMORY CONFIGURATION" section i have the "PAGE 0" and "PAGE 1" subsections. Just to be sure, which fields do I have to read? I suppose the 'used' column of the "PAGE0.FLASH" entry is what I need.

    Are there other fields I have to take into account to have the complete flash memory occupation?

    Thanks a lot!

  • Hello Christian,

    Another option to make sure you are checking all the sections, discussed further in the Optimizing C/C++ User's Guide section titled Sections, wihch are stored in Flash is to compare the Memory Map for the F28035 found in the User's Guide, Figure 3-2 with address ranges given in Table 3-1, with the SECTION ALLOCATION MAP found in the .map file below the MEMORY CONFIGURATION.  Check the origin address of each section and their corresponding lengths in the .map file and compare with Flash memory ranges in the Memory Map for complete flash memory occupation.

    Further reading of each document should give you a better idea for the functional purpose of each section (.text, .cinit, .econst, .reset etc.) and the overall memory structure of the device if you are looking for that information as well.

    Best Regards,

    Mark-

  • Christian,

    Sorry for the late reply, but I've been swamped and haven't logged into E2E for a while.

     

    In your map file, take a look at all the "PAGE 0" and "PAGE 1" with "origin" addresses within the flash address space.

    It is possible that you do not have anything in "PAGE 1" that is in the space, but check anyway.

     

    The flash address space might be from 0x3E8000 to 0x3F7FF7.  Check your datasheet for the device you're using.

     

    I hope this helps.

    -quark