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.

TMS320F28335 Boot from Flash Problem

Other Parts Discussed in Thread: TMS320F28335

I have a simple application that runs out of flash on a TMS320F28335.The application runs fine when executed from the debugger/emulator environment.

However after I reset the power, the device does not boot up the application correctly.

I.e. It runs out of flash when executed from the debugger, but not after a power reset.

I have run other sample applications from flash after a reboot and they run just fine. I've tried comparing the project settings and they look the same as my application.

What special considerations do I need to make (project settings) to allow my application to run after a power reset?

I have code composer studio CCS v5 and USB2000 Emulator.

thanks in advance,

Paul

  • The problem seems to be the following line of code in my .CMD file

              .rts  { -lrts2800_fpu32_eh.lib (.text) }  >> RAML1   PAGE = 0

    when I remove it it boots up correctly after a power cycle, however I need load the math library functions into RAM for better performance.

    Can anyone suggest a solution?

    thanks,

    Paul

  • Hello Paul

     

    Have you read this? http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=spra958&fileType=pdf 

  • Thanks for your response,.
    The document is very useful and I have been able to run several of my application’s functions from RAM (loading from FLASH on startup.
    The thing I am having difficulty with is loading the math library functions from FLASH to RAM on startup.

    The following command I have used to place the library in a specific section of FLASH (FLASHH):

    .rts  { -lrts2800_fpu32_eh.lib (.text) }  >> FLASHH   PAGE = 0

    Now I need to load this FLASHH section to RAM on power up. I have tried the following, but this doesn’t work:

    rts                 : LOAD = FLASHH,
                             RUN = RAML1,
                             LOAD_START(_rts_LoadStart),
                             LOAD_END(_rts_LoadEnd),
                             RUN_START(_rts_RunStart),
                             PAGE = 0

    MemCopy(&rts_LoadStart, &rts_LoadEnd, &rts_RunStart);

    I think the issue is that I haven’t placed the functions into a linkable section. This would usually be done using the #pragma CODE_SECTION.
    In section 4.4 of SPRA958K this is done be placing a #pragma CODE_SECTION declaration above each function you want to add to the linkable section. Unfortunately I don’t have access to the code for the rts2800_fpu32_eh.lib so I can’t do that.

    So how do I define a linkable section for the functions that I need from this library?

  • Paul,

    Please try this syntax - this would put the rts library .text section from the object file shown into a section called text1.

    text1        : LOAD = FLASHD,

                       RUN = RAML0,

                       LOAD_START(_text1LoadStart),

                       LOAD_END(_text1LoadEnd),

                       RUN_START(_text1RunStart),

                       PAGE = 0

                       {

                        -l rts2800_fpu32.lib < fd_add.obj > (.text)

                       }

  • Also - there is a known CCS bug - if you get a "warning #10068-D: no matching section" then in the project options change the RTS lib from <automatic> to the library you are including.

  • Hi Lori,

    Thanks for the information. This is really helpful.

    I have a couple more questions -

    1.) with the syntax you suggest in the linker cmd file - do I still need to do a Memcopy in my startup code? (something like Memcopy (&text1LoadStart,&text1LoadEnd,&text1RunStart))???

    2.) with the syntax you suggest in the linker cmd file - do I still need add #pragma CODE_SECTION blocks in the code or does the linker already so this?

    3.) Is there a way to move all of the required objects from that library on startup, or do I need to name each one < fd_add.obj  fd_sub.obj > etc etc.

    Thanks in advance,

    Paul

  • Paul Raine said:
    1.) with the syntax you suggest in the linker cmd file - do I still need to do a Memcopy in my startup code? (something like Memcopy (&text1LoadStart,&text1LoadEnd,&text1RunStart))???

    Yes - this just allocates it to the section.

    Paul Raine said:
    2.) with the syntax you suggest in the linker cmd file - do I still need add #pragma CODE_SECTION blocks in the code or does the linker already so this?

    No, the code section pragma is not needed.

    Paul Raine said:
    3.) Is there a way to move all of the required objects from that library on startup, or do I need to name each one < fd_add.obj  fd_sub.obj > etc etc.

    I *think* if you just specify (.text) you will get all of the text sections in the library.

  • Hi Lori,

    Yes this linker syntax seems to work, along with the Memcopy, as long as I specify the objects individually.

    I couldn't get it to work when I tried to load the whole library with just (.text) - CCS downloaded the program, but didnt give me an option to run. (??)

    However, I just specify the objects I really need then these are loaded into RAM at boot time. This gives much better performance.

    Thank you very much for your help.

    Regards,

    Paul

  • Paul Raine said:
    I couldn't get it to work when I tried to load the whole library with just (.text) - CCS downloaded the program, but didnt give me an option to run. (??)

    hmm Looking at the assembler guide (www.ti.com/lit/spru513) I think you can use a wildcard to do this.

    ..... <*.obj> (.text)