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.

TMS320F280025C: Load Application - F280025C in serial_flash_programmer.exe

Part Number: TMS320F280025C

We have tried with the new serial flash programmer tool.

It works as what was described in the demo if we follow it exactly.

(Single Bank LFU with Device Reset on F28002x User Guide)

In this demo, the application file is f28002x_lfu_singlebankBANK0FLASH.txt but for us, we have our own application txt file.

Is there any other additional steps we need to do if we want to program the MCU ?
We use hex2000.exe tool to convert the application.out to application.txt. Then, we rerun the command again but replacing the
f28002x_lfu_singlebankBANK0FLASH.txt to application.txt.

Below is the command we use :
serial_flash_programmer_appln.exe -d f28002x -k f28002x_sci_flash_kernel.txt -a application.txt -b 9600 -p COM8

Actual Result : The data transfer was halted, it stops after 46 06 00 90 7C 91 22 56 AC 28 18 00 are transferred.

Does anyone have any idea about what are the mistake we made ?

  • Hello, 

    When you run the serial_flash_programmer utility for the first time, are you using your own application file? If so, when the data transfer halts, you could pause execution of the flash kernel in CCS and see where the kernel is stalling. 

    With regards to the application itself, you could check to see whether the application is aligned to 128 bit boundaries. You need to use the ALIGN(8) directive in the linker command file for each section that is allocated to Flash. 

    Thanks, 

    Anu

  • Thanks for your reply.
    I found it hits line 617, reason :  destination address is within B0_START_ADD & B0_RESERVED".

    Now, I have fixed it, the tool can load the whole application txt file to our device.

  • Hi,

    I manage to load my application txt file to our device now.
    The application works correctly after the reset.

    However, after I reset my device & rerun the serial_flash_programmer_appln.exe tool, the result is shown as below:


    It will hang here until I press ctrl + c.
    Do you have any idea that what is the reason behind of it ?
    Why I can't reload my application into device again?

  • Chzi, 

    Is your application mapped to sectors 2-15? What is the order of operations you follow when reloading the application?

    Thanks, 

    Anu

  • Hi Anu,

    Sorry for mislook your reply.
    Yes, my application is mapped within the sector 2-15.

  • I paste the content of my application's cmd file below:

    MEMORY
    {
    BEGIN : origin = 0x08EFF0, length = 0x000002
    BOOT_RSVD : origin = 0x00000002, length = 0x00000126
    RAMM0 : origin = 0x00000128, length = 0x000002D8
    RAMM1 : origin = 0x00000400, length = 0x000003F8 /* on-chip RAM block M1 */
    // RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

    /* RAMLS4 : origin = 0x0000A000, length = 0x00000800
    RAMLS5 : origin = 0x0000A800, length = 0x00000800
    RAMLS6 : origin = 0x0000B000, length = 0x00000800
    RAMLS7 : origin = 0x0000B800, length = 0x00000800*/

    /* Combining all the LS RAMs */
    RAMLS4567 : origin = 0x0000A000, length = 0x00002000
    RAMGS0 : origin = 0x0000C000, length = 0x000007F8
    // RAMGS0_RSVD : origin = 0x0000C7F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */


    // FLASHBANK1 : origin = 0x00080000, length = 0x0000FFF0
    // FLASH_BANK1_RSVD : origin = 0x0008FFF0, length = 0x00000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    BOOTROM : origin = 0x003F0000, length = 0x00008000
    BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0
    RESET : origin = 0x003FFFC0, length = 0x00000002
    /* Flash sectors */
    /* BANK 0 */
    FLASH_BANK0_SEC0 : origin = 0x080000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC2 : origin = 0x082008, length = 0x000FF8 /* on-chip Flash */
    FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x000FF0 /* on-chip Flash */
    FLASH_BANK0_SEC15 : origin = 0x08EFF2, length = 0x00100E /* on-chip Flash */
    // FLASH_BANK0_SEC15_RSVD : origin = 0x08FFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

    }


    SECTIONS
    {
    codestart : > BEGIN, ALIGN(8)
    .text : >> FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4, ALIGN(8)
    .cinit : > FLASH_BANK0_SEC5, ALIGN(8)
    .switch : > FLASH_BANK0_SEC2, ALIGN(8)
    .reset : > RESET, TYPE = DSECT /* not used, */

    .stack : > RAMM1

    .init_array : > FLASH_BANK0_SEC2, ALIGN(8)
    .bss : > RAMGS0
    .bss:output : > RAMGS0
    .bss:cio : > RAMGS0
    .const : > FLASH_BANK0_SEC5, ALIGN(8)
    .data : > RAMGS0
    .sysmem : > RAMGS0

    //ramgs0 : > RAMGS0

    .TI.ramfunc : LOAD = FLASH_BANK0_SEC2,
    RUN = RAMGS0,
    LOAD_START(RamfuncsLoadStart),
    LOAD_SIZE(RamfuncsLoadSize),
    LOAD_END(RamfuncsLoadEnd),
    RUN_START(RamfuncsRunStart),
    RUN_SIZE(RamfuncsRunSize),
    RUN_END(RamfuncsRunEnd),
    ALIGN(8)

    }
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */

  • Chzi, 

    The linker command file looks ok, what order of operations do you follow when reloading the application?

    Thanks, 

    Anu

  • Hi Anu,

    Attached the memory configuration image, Thanks!

  • Chzi, 

    Could you try spacing out the sections in the linker command file across more sectors? For example, if a sector is mapped to .text, don't map it to another section. 

    Another thing you could try is increasing the size of the stack. Try loading and reloading the application after this and let me know what happens. 

    Thanks, 

    Anu

  • Hi Anu,

    I have tried a few times but the result was still same (reloading application failed).
    Below is one of the link command file's content:

    MEMORY
    {
    BEGIN : origin = 0x08EFF0, length = 0x000002
    BOOT_RSVD : origin = 0x00000002, length = 0x00000126
    RAMM0 : origin = 0x00000128, length = 0x000002D8
    RAMM1 : origin = 0x00000400, length = 0x000003F8 /* on-chip RAM block M1 */
    // RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

    /* RAMLS4 : origin = 0x0000A000, length = 0x00000800
    RAMLS5 : origin = 0x0000A800, length = 0x00000800
    RAMLS6 : origin = 0x0000B000, length = 0x00000800
    RAMLS7 : origin = 0x0000B800, length = 0x00000800*/

    /* Combining all the LS RAMs */
    RAMLS4567 : origin = 0x0000A000, length = 0x00002000
    RAMGS0 : origin = 0x0000C000, length = 0x000007F8
    // RAMGS0_RSVD : origin = 0x0000C7F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */


    // FLASHBANK1 : origin = 0x00080000, length = 0x0000FFF0
    // FLASH_BANK1_RSVD : origin = 0x0008FFF0, length = 0x00000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    BOOTROM : origin = 0x003F0000, length = 0x00008000
    BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0
    RESET : origin = 0x003FFFC0, length = 0x00000002
    /* Flash sectors */
    /* BANK 0 */
    FLASH_BANK0_SEC0 : origin = 0x080000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC2 : origin = 0x082008, length = 0x000FF8 /* on-chip Flash */
    FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x000FF0 /* on-chip Flash */
    FLASH_BANK0_SEC15 : origin = 0x08EFF2, length = 0x00100E /* on-chip Flash */
    // FLASH_BANK0_SEC15_RSVD : origin = 0x08FFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

    }


    SECTIONS
    {
    codestart : > BEGIN, ALIGN(8)
    .text : >> FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4, ALIGN(8)
    .cinit : > FLASH_BANK0_SEC5, ALIGN(8)
    .switch : > FLASH_BANK0_SEC6, ALIGN(8)
    .reset : > RESET, TYPE = DSECT /* not used, */

    .stack : > RAMLS4567

    .init_array : > FLASH_BANK0_SEC7, ALIGN(8)
    .bss : > RAMGS0
    .bss:output : > RAMGS0
    .bss:cio : > RAMGS0
    .const : > FLASH_BANK0_SEC8, ALIGN(8)
    .data : > RAMGS0
    .sysmem : > RAMGS0

    //ramgs0 : > RAMGS0

    .TI.ramfunc : LOAD = FLASH_BANK0_SEC2,
    RUN = RAMGS0,
    LOAD_START(RamfuncsLoadStart),
    LOAD_SIZE(RamfuncsLoadSize),
    LOAD_END(RamfuncsLoadEnd),
    RUN_START(RamfuncsRunStart),
    RUN_SIZE(RamfuncsRunSize),
    RUN_END(RamfuncsRunEnd),
    ALIGN(8)

    }
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */

    I increased the size of stack by mapping the .stack to RAMLS4567, is it ok?

  • Chzi, 

    Mapping the stack to RAMLS4567 should be ok. 

    I am discussing with the LFU expert on what next steps you can take, I will get back to you on Friday. 

  • Chzi, 

    Can you check the optimization level of your application? The LFU example has optimization levels set at level 2, can you try enabling optimizations and seeing if it makes a difference?

    Thanks, 

    Anu

  • Hi Anu,


    I have tried with optimization level 2 but the result is still the same.
    We are unable to reprogram the application after the first application is loaded.

    Thanks!

    Chzi Sern

  • Chzi, 

    I think a call would be best to figure out what to do moving forward. We can discuss over private chat what times work best. 

    Thanks, 

    Anu

  • Hi Anu,

    I agree with what you mentioned here, a virtual discussion can fasten the process & in fact we are in urgent to solve this problem.
    Include TMS320F280025C: TMS320F280025C: Load Application - F280025C in serial_flash_programmer.exe (Non-controlCARD)

    Is it ok if we have a discussion before this Friday?
    Our available time is within 8:00am - 10pm (Malaysia Time Zone).
    Looking forward to your reply.

    Thanks!

    Chzi Sern

  • Chzi, 

    Please refer to the reply in the thread you linked. 

    Thanks, 

    Anu