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: Ramfunc support under CCS v9 for f28335

Part Number: TMS320F28335

Tool/software: Code Composer Studio

Hello,

I have a similar problem like reported about the ramfuncs feature at my firmware project. I'm using a tms320f28335 device and I moved the project from CCS v6 to CCS v9. During first built I immediately recognized the compiler warning on declared ramfuncs. I'm loading dedicated functions into ram after start of the program. Declaration under CCS v6 were done via #pragma CODE-SECTION directives and ramfuncs section in the project cmd-file. Now I'm in trouble to get the functions loaded into ram under CCS v9. Declaration of the defined functions within the project I changed to __attribute(ramfunc) as mentioned on the wiki page "how to load code from flash into ram". Also I adapted the linker command file with the section qualifier .TI.ramfunc. Compilation of project works so far, but I'm getting an error message while loading the program into the flash. Adress error: 0x4000@Program

When reverting all ramfunc related changes back to CCS v6 version everything works fine, except that no function will be loaded into ram from flash, which loads timing on some of my interrupt tasks. Therefore I need to place some of the functions into the ram.

Thanks for support!

BR, Juergen

  • For the build which fails to work, please submit the linker map file and the linker command file.  Put them both in a zip file, then attach that file to your next post.

    Thanks and regards,

    -George

  • Hi George,

    Thanks for response. Attached some extract of:

    Linker-CMD file:

    #ifdef __TI_COMPILER_VERSION__
    #if __TI_COMPILER_VERSION__ >= 15009000
     .TI.ramfunc : {} LOAD = FLASHC_D,
          RUN = RAML0,
          LOAD_START(_RamfuncsLoadStart),
          LOAD_END(_RamfuncsLoadEnd),
          RUN_START(_RamfuncsRunStart),
          PAGE = 0
    #else
      ramfuncs : LOAD = FLASHC_D,
        RUN = RAML0,
        LOAD_START(_RamfuncsLoadStart),
        LOAD_END(_RamfuncsLoadEnd),
        RUN_START(_RamfuncsRunStart),
        PAGE = 0
    #endif
    #endif

    Linker-MAP file:

    SECTION ALLOCATION MAP
     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    .TI.ramfunc
    *          0    003251ea    0000017e     RUN ADDR = 00008000
                      003251ea    00000161     Dummy1.obj (.TI.ramfunc)
                      0032534b    0000001d     DSP2833x_SysCtrl.obj (.TI.ramfunc)
    .cinit     0    00325368    000004af    
                      00325368    00000240     Dummy2.obj (.cinit)
                      003255a8    00000061     Dummy3.obj (.cinit)
                      00325609    00000037     main.obj (.cinit)
    As mentioned declaration of necessary functions to be placed into RAM I tried via:
    #pragma CODE_SECTION(InitFlash, ".TI.ramfunc");
    void InitFlash(void)
    OR 
    __attribute__((ramfunc))
    void InitFlash(void)
    The error I receive while flash procedure is the following:
    C28xx: File Loader: Verification failed: Values at address 0x04000@Program do not match Please verify target memory and memory map.
    As mentioned, once I revert the changes (.TI.ramfunc or __attribute__((ramfunc))) in the code and use (ramfuncs : LOAD = FLASHC_D …) in the linker-cmd I'm able to flash the out-file, but without placing necessary functions into RAM. 
    Changes on the project I executed accordingly to the instructions at:
    Thanks,
    Juergen
  • Juergen Wassmuth said:
    The error I receive while flash procedure is the following:
    C28xx: File Loader: Verification failed: Values at address 0x04000@Program do not match Please verify target memory and memory map.

    Address 0x04000 on a TMS320F28335 is "XINTF Zone 0" which is external to the TMS320F28335.

    What type of memory do you have connected to XINTF Zone 0?

    I am not sure if the CCS flash programmer can write to external memory.