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.

TMS320F2800137: Serial Bootloader Failure with "codestart" small section

Part Number: TMS320F2800137
Other Parts Discussed in Thread: UNIFLASH

I am experiencing the same error message form the serial flash bootloader as the referenced thread.  However the work around in the previous thread will not work for me - I need a fixed location for "codestart" so I can cleanly launch the application from my bootware located elsewhere in flash.

Verification confirms the vector at 0x084000 was not programmed. (this is where I have placed "codestart" for my application, my bootware starts at 0x080000)

Checking with JTAG - I see the section is still blank.

checking the project TXT stream file, I can see the very small (2 word) section located at 00084000:

Thanks for any advice!

  • Hi Paul,

    Sorry for the delay; We are notified today to take a look at this post.

    The error message did not actually show any error from the flash API during the program operation.  Can you share your linker command file and the map file?  Would like to see how the corresponding 128-bit aligned flash word is used/split in your linker command file.

    Are you able to load it fine using CCS flash plugin?

    Thanks and regards,
    Vamsi

  • Hi Vamsi,   I will attach the files here. The flash API has been inconsistent, in some situations I do get an error that is passed back to the pc application but not in all situations.  When I load the project with CCS it works as expected and I see the start jump instruction at address 0x084000.  In the attached linker file you will see I left a gap between "Begin2" and "FLASHBANK0_FAST" - I have also tried with no gap here, same result.  Even when I put the FLASHBANK0_FAST starting at 0x084002 the resulting txt stream file has two sections, one for begin2 and one for bank0flash.

  • Linker CMD file for application

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //APPLICATION
    // Keep in mind that LS0, and LS1 are protected by the code
    // security module.
    //
    // What this means is in most cases you will want to move to
    // another memory map file which has more memory defined.
    //
    */
    /*========================================================= */
    /* Define the memory block start/length for the F280013x
    PAGE 0 will be used to organize program sections
    PAGE 1 will be used to organize data sections
    Notes:
    Memory blocks on F2800137 are uniform (ie same
    physical memory) in both PAGE 0 and PAGE 1.
    That is the same memory region should not be
    defined for both PAGE 0 and PAGE 1.
    Doing so will result in corruption of program
    and/or data.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Map file for applicaiton:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    ******************************************************************************
    TMS320C2000 Linker PC v22.6.0
    ******************************************************************************
    >> Linked Thu Jun 29 15:30:14 2023
    OUTPUT FILE NAME: <f2800137.out>
    ENTRY POINT SYMBOL: "code_start" address: 00084000
    MEMORY CONFIGURATION
    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    RAMM0S 00000128 00000158 00000100 00000058 RWIX
    RAMM1D 00000280 00000578 000002bc 000002bc RWIX
    RAMM1_RSVD 000007f8 00000008 00000000 00000008 RWIX
    ADCARESULT 00000b00 00000018 00000000 00000018 RWIX
    ADCCRESULT 00000b40 00000018 00000000 00000018 RWIX
    CPUTIMER0 00000c00 00000008 00000000 00000008 RWIX
    CPUTIMER1 00000c08 00000008 00000000 00000008 RWIX
    CPUTIMER2 00000c10 00000008 00000000 00000008 RWIX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Linker cmd file for bootware

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    MEMORY /* modifiied back to FLASH mode 6/14/2023*/
    {
    BEGIN : origin = 0x00080000, length = 0x00000002
    BOOTVER : origin = 0x00080002, length = 0x00000004 //bootware version string
    BOOT_RSVD : origin = 0x00000002, length = 0x00000126
    RESET : origin = 0x003FFFC0, length = 0x00000002
    RAMM0 : origin = 0x00000128, length = 0x000002D8
    RAMM1 : origin = 0x00000400, length = 0x000003F8
    // RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    RAMLS0 : origin = 0x00008000, length = 0x00002000
    RAMLS1 : origin = 0x0000A000, length = 0x00001FF0
    BOOT_L_KEY : origin = 0x0000BFF0, length = 0x0F
    // RAMLS1_RSVD : origin = 0x0000BFF8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    /* Flash sectors */
    FLASH_BANK0_SEC_0_7 : origin = 0x080008, length = 0x2FF0 /* on-chip Flash <<< all bootloader code goes here END = 0x083000 */
    //reserve most flash space for the application
    // FLASH_BANK0_SEC_8_15 : origin = 0x082000, length = 0x2000 /* on-chip Flash */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Paul,

    What GPIOs are you using for the SCI communication? Could you also do a memory dump to compare the values placed in flash memory through the CCS method and the standalone method using the host?

    Thanks and regards,

    Charles

  • Hi Charles,  should have more info for you on the 5th.  Thanks!

  • I erased all flash with UniFlash first and then just loaded the application with CCS, here is the memory dump from CCS:

    I am using GPIO#32 and #35 (SCI-C). (Pin 19 and 20 on the RHB 32 pin package).  To make that work, I have placed flash_kernel_ex3_sci in flash. (linker file above).

  • I see a problem in the bootloader code. The return from findSector for this specific address is incorrect. 

     

    This would cause the wrong sector to be erased?

  • Hi Paul,

    GPIOs seem fine, as well as the dump. This may be what is causing the issue. I'll some time to look at this tomorrow morning and get back to you.

    Thanks and regards,

    Charles

  • Hi Paul,

    Listing of sectors from datasheet, I believe this to be a valid find. I have also noticed that other addresses aside the one for Bank zero sector 15 contains less than or equal to for erase check of the sectors. Will need to run some builds again tomorrow and confirm with my team how we can move forward. 

    Thanks,

    Charles

  • The <= have quite a pattern : sectors 15, 30, 45 , 60, 75 ,90, 105, 120.     I have changed them all in my version of kernel code and things seem to be working better.  Not sure why I had a blank sector sometimes - but it certainly explains programming failures when the sector was already programmed and did not properly erase.

  • Hi Paul,

    Thanks for sending the text file. I'll get back to you the results by Monday.

    Regards,

    Charles

  • Hi Paul,

    I can confirm that the issue was the findSector routine in the flash_kernel_ex3_boot.c file. Having made the adjustment, it is able to download to the device and place the codestart section at 0x84000.

    Could you try implementing the change at your previously listed sector and recompile? Let me know if you reach the same conclusion.

    Thanks,

    Charles

  • Sorry, forgot to reply here - I have tested and it looks good now.  I get successful loads at either sector.