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.

TMS320F28388S: PROGRAM_ERROR when trying to flash with serial programmer

Part Number: TMS320F28388S
Other Parts Discussed in Thread: C2000WARE

I cannot flash program our firmware into a TMS320F28388S processer using the serial flash programmer and the SCI flash kernel. Every time I try programming CPU1, I get a PROGRAM_ERROR return with an address in located in the .text section.

I edited all of the  flash sections in my linker file to use the ALIGN(8) directive to try to fix the problem but that just moved the address that is returned with the error.

I can flash one of the example programs (led_ex1_blinky) using the same flash kernel I am trying to use to flash our firmware. 

What do I need to do to resolve this issue?

  • Hi,

    Can you provide some more details about error and at which address location? 

    Also please confirm that you are using flash based command file where all the code sections and initialized data sections are mapped to flash.

    Regards,

    Rajeshwary

  • Hi, 

    Here is the output from the last time I tried to flash:

    20
    ab
    aa
    aa
    2a
    0
    0
    0
    40
    0
    0

    Application load successful!
    Done waiting for application to download and boot...
    SUCCESS of Command
    ERROR Status: PROGRAM_ERROR
    ERROR Address: 0x952d6
    Flash API Error: Incorrect Data Buffer Length
    Please refer to the Flash API documentation for further explanation of the error.
    FMSTAT Register contents: 00

    The bytes that were echoed out right before the program error line up with the end of the hex file I am trying to program.

    The flash kernel I am using is from C2000Ware v4.3.0.0.

    My linker file is putting all of my sections in flash with some RAM function sections that are setup to be copied from flash to RAM at runtime.

  • Hi Tomas,

    Can you please share a map file and linker command file for further analysis?

    Regards,

    Rajeshwary

  • I will send you the files in a private message.

  • Sure Tomas.

    Regards,

    Rajeshwary

  • Tomas,

    Looking at the error address, I feel this might be an alignment issue.  

    Hex utility splits larger blocks (greater than 0xFFFE words) in to smaller blocks when generating the hex file.  While doing so, it may not adhere to the address alignment that you specified in the linker command file for the second block (in the split blocks).  To avoid this issue, I asked the compiler to provide an option (--boot_block_size) for user to specify the length of the block size at which hex tool could split.  Using this option, user can provide a block size that would ensure a 8x16-bit word aligned address for the later block during a split. 

    You can use the --boot_block_size option for the hex2000 tool and specify the block size value as 0xFFF8 (largest size < 0xFFFE and can yield a 8 x 16-bit word alignment for the later block).  Note that you need to use compiler version 21.6.1.LTS (or higher).  You can find more details of --boot_block_size option in the assembly language tools guide at www.ti.com/.../spru513

    Please try this and let us know if it helps to fix.

    Thanks and regards,

    Vamsi

  • Thank you. This fixed the issue I was having for flashing CPU1.