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/TMS320F28335: Run flash boot, RAM boot, Memory mapping

Part Number: TMS320F28335


Tool/software: Code Composer Studio

MemoryMappingQuestion.zip

The code runs well in RAM boot mode. The code is modified to boot from Flash.

the following codes are inserted to RAM code:

These three definitions are inserted before main{} 

// These are defined by the linker (see F28335.cmd)

extern Uint16 RamfuncsLoadStart;

extern Uint16 RamfuncsLoadEnd;

extern Uint16 RamfuncsRunStart;

//extern Uint16 RamfuncsLoadSize; 

//These code are inserted after initPieVecTable();

// The RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart

// symbols are created by the linker. Refer to the F28335.cmd file. 

//   memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (Uint32)&RamfuncsLoadSize);

memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (Uint32)&RamfuncsLoadEnd); 

// Call Flash Initialization to setup flash waitstates

// This function must reside in RAM

   InitFlash();

When build the project, it gives the memory violation messages, as the following.

My two questions:

1. memcpy() is a wrong function name. the right name is memcopy(). However, system does not recognize the right name memcopy. Why?

2. What is the violated in mapping the memory?

Thank you.

"../F28335.cmd", line 78: error #10263: RAML0 memory range has already been specified
"../F28335.cmd", line 78: error #10264: RAML0 memory range overlaps existing memory range RAML0
"../F28335.cmd", line 79: error #10264: RAML1 memory range overlaps existing memory range RAML1L2
"../F28335.cmd", line 80: error #10264: RAML2 memory range overlaps existing memory range RAML1L2
"../F28335.cmd", line 81: error #10263: RAML3 memory range has already been specified
"../F28335.cmd", line 81: error #10264: RAML3 memory range overlaps existing memory range RAML3
"../F28335.cmd", line 83: error #10264: ZONE7 memory range overlaps existing memory range ZONE7A
"../F28335.cmd", line 91: error #10263: CSM_RSVD memory range has already been specified
"../F28335.cmd", line 91: error #10264: CSM_RSVD memory range overlaps existing memory range CSM_RSVD
"../F28335.cmd", line 92: error #10263: BEGIN memory range has already been specified
"../F28335.cmd", line 93: error #10263: CSM_PWL memory range has already been specified
"../F28335.cmd", line 93: error #10264: CSM_PWL memory range overlaps existing memory range CSM_PWL
"../F28335.cmd", line 95: error #10263: ADC_CAL memory range has already been specified
"../F28335.cmd", line 95: error #10264: ADC_CAL memory range overlaps existing memory range ADC_CAL
"../F28335.cmd", line 97: error #10263: IQTABLES memory range has already been specified
"../F28335.cmd", line 97: error #10264: IQTABLES memory range overlaps existing memory range IQTABLES
"../F28335.cmd", line 98: error #10263: IQTABLES2 memory range has already been specified
"../F28335.cmd", line 98: error #10264: IQTABLES2 memory range overlaps existing memory range IQTABLES2
"../F28335.cmd", line 99: error #10263: FPUTABLES memory range has already been specified
"../F28335.cmd", line 99: error #10264: FPUTABLES memory range overlaps existing memory range FPUTABLES
"../F28335.cmd", line 100: error #10264: ROM memory range overlaps existing memory range BOOTROM
"../F28335.cmd", line 101: error #10263: RESET memory range has already been specified
"../F28335.cmd", line 101: error #10264: RESET memory range overlaps existing memory range RESET
"../F28335.cmd", line 110: error #10263: RAMM1 memory range has already been specified
"../F28335.cmd", line 110: error #10264: RAMM1 memory range overlaps existing memory range RAMM1
"../F28335.cmd", line 111: error #10263: RAML4 memory range has already been specified
"../F28335.cmd", line 111: error #10264: RAML4 memory range overlaps existing memory range RAML4
"../F28335.cmd", line 112: error #10263: RAML5 memory range has already been specified
"../F28335.cmd", line 112: error #10264: RAML5 memory range overlaps existing memory range RAML5
"../F28335.cmd", line 113: error #10263: RAML6 memory range has already been specified
"../F28335.cmd", line 113: error #10264: RAML6 memory range overlaps existing memory range RAML6
"../F28335.cmd", line 114: error #10263: RAML7 memory range has already been specified
"../F28335.cmd", line 114: error #10264: RAML7 memory range overlaps existing memory range RAML7
warning #10247-D: creating output section "DLOG" without a SECTIONS specification
error #10010: errors encountered during linking; "FlashRun_pmsm28335.out" not built

  • "../F28335.cmd", line 78: error #10263: RAML0 memory range has already been specified
    "../F28335.cmd", line 78: error #10264: RAML0 memory range overlaps existing memory range RAML0

    I think you got two cmd files active within the same project. Did you change active Build Configuration? If so make sure *.cmd's for inactive configuration is grayed out checking Exclude from Build. (Right mouse click on file).
    If still error, perhps 2nd cmd file is specified in linker settings.
  • Hello

    The correct name is memcpy().
    As EK mentioned, you likely have two linker command files active. Remove or exclude one from your build configuration.

    Best regards
    Chris
  • Yes, Thank you for the comments. I found out that is because the linker command file "28335_IQmath_lnk.cmd" is conflict with another linker command file "F28335.cmd". 

    I comments out the conflict linker command file sections in the linker command file "28335_IQmath_lnk.cmd", whihc is confict with another linker command file "F28335.cmd".here is both linker command files: 1. 28335_IQmath_lnk.zip

    4571.F28335.zip

    the error message is shown below.

    the errors show that there is not enough space for IQmath. How come?

    warning #10247-D: creating output section "DLOG" without a SECTIONS specification

    "../28335_IQmath_lnk.cmd", line 96: warning #10097: memory range not found: RAML1L2 on page 0

    "../28335_IQmath_lnk.cmd", line 96: error #10265: no valid memory range(null) available for placement of ".text"

    "../28335_IQmath_lnk.cmd", line 96: error #10099-D: program will not fit into available memory.  placement with alignment/blocking fails for section ".text" size 0x137e page 0

    "../28335_IQmath_lnk.cmd", line 81: warning #10097: memory range not found: RAML1L2 on page 0

    "../28335_IQmath_lnk.cmd", line 81: error #10265: no valid memory range(null) available for placement of "IQmath"

    "../28335_IQmath_lnk.cmd", line 81: error #10099-D: program will not fit into available memory.  placement with alignment/blocking fails for section "IQmath" size 0x47 page 0

    error #10010: errors encountered during linking; "FlashRun_pmsm28335.out" not built

  • Hello

    You should just remove one of the linkers from your project entirely, you don't need both.

    Here are some wikis to help with linkers and your question:
    processors.wiki.ti.com/.../C28x_Compiler_-_Understanding_Linking
    processors.wiki.ti.com/.../Linker_Command_File_Primer

    Best regards
    Chris