TMS320F280049C: Store two different codes in two flash sectors

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Dear Friends

I need to store two different codes in two flash memory sectors and execute it in function of variable value. The idea is execute main program and if the user by communications set a variable to '1', jump to the second program and do other routines.

I think this is possible, but im not finiding many information, all information is about the classical spi, can, sci boot.

Many thanks in adavance

  • I'm going to share an older example in C2000Ware here C:\ti\c2000\C2000Ware_5_04_00_00\device_support\f2803x\examples\c28\flash_f28035 , you will see the use of 

    #pragma CODE_SECTION(epwm1_timer_isr, "ramfuncs");
    Now, this is slightly different than what you want, this example is showing how to load a code section to Flash, but then run it from RAM.
     
    For your case, you simply want to allocate different code sections to different regions of flash.  The CODE_SECTION pragma can be used here as well, the load/run addresses would be the same in your linker(.cmd) file.
     
    Let me know if this helps.
     
    Best,
    Matthew
  • Dear Matthew

    Many thanks for your respone. I'm going to explain my application in order to solve faster this issue and know if its possible.

    My idea is develop a software flasher/upgrader and using a serial port SCIA and flashAPI.

    The goal is save in 2 flash sector/s (that cannot be erased) the basic functions to run the DSP, run the serial port and develop with flashAPI the flasher program (it will blanck the flash sectors, check it and write it according linker file) and if this process finish well, reboot the system and start with the new application running. Is this possible?

    Which are the steps?

    Many thanks in advance


    Regards

  • Juan,
    Thanks for the clarification, I think this application report will help here: https://software-dl.ti.com/C2000/docs/software_guide/c2000ware/lfu.html

    Best,
    Matthew