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.

TMS570LS3137 - Boot Loaded application RAM errors

Hello,

After successfully flashing TMS570 using a F021 v2.00.01 version of UART bootloader example software from the WIKI page, I attempt to jump to application software and get a data abort. When I step through the assembly code I see it occurs during:

    /* initialize copy table */

       __TI_auto_init();

Also, by stepping through _dabort I see 3 errors are occuring:

tst r0, #0x8 ; check if bit 3 is set, this indicates uncorrectable ECC error on B0TCM
bne ramErrorFound
tst r0, #0x20 ; check if bit 5 is set, this indicates uncorrectable ECC error on B1TCM
bne ramErrorFound2

noRAMerror
tst r0, #0x80 ; check if bit 7 is set, this indicates uncorrectable ECC error on ATCM
bne flashErrorFound

My first thought is that flashing in the application software using the bootloader preventing some sort of RAM error, or the application software is no longer initializing RAM correctly.

I have modified 3 files from the SafetyMCU_Bootloader provided by the WIKI page in order to run F021 v2.00.01, since the bootloader was created for F021 v1.50. I have attached these 3 files as reference.

Anyone have any thoughts or think of something I might have missed?

4377.bl_flash.c7737.bl_main.c4718.bl_link_cmd.txt

  • Hi Phillip,

    The bootloader on WIKI is based on F021 API 1.50. API 2.00.01 is not fully compatible with API 1.5. Attached please find bl_flash.c and linker cmd file used for API2.00.01.

    6471.bl_flash.chttp://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/312/6378.bl_5F00_link.cmd

    Regards,

    QJ

  • QJ,

    Thank you for response and updated source files. I greatly appreciate this. Also, could you  provide any updated header files? It appears I am missing the identifier "flash_bank".

    Thanks,

    Phillip

  • I have a few questions pertaining to the new application's RAM. I am still new to using bootloaders and have some concerns that might seem trivial...

    1. Since the newly flashed application program is starting at 0x20000, will I have to modify the length of my RAM in order to include this 0x20000 offset in sys_link.cmd? RAM for my application will normally start at 0x08000000, with length 0x3FFFF. Will I have to start RAM at 0x7FE0000 or decrease length to 0x1FFFF in order to compensate for the 0x20000? Does my application assume 0x20000 is 0x0000?

    2. Should I define the same stack space for bootloader and application? Will it make a difference if same or different?

    3. If my application overwrites the bootloader RAM, will it cause any issues besides maybe some re-flashing application issues?

    I ask because when I flash my application using the UART bootloader, I am not able to "initialize copy table". I get hung up in a prefetch abort (0x0c) or sometimes a data abort (0x10) when I am changing around RAM locations.

    Also, if I remove __TI_auto_init() from sys_startup.c, I can jump to my application, but am not able to use any variables I have stored in RAM. Per say, if I store a char debug[] ="hello" and print it using UART, nothing prints.

    These might be some questions I could answer if I was more familiar with ARM architecture, but any help would be nice while I peruse datasheets.

    Regards,

    Phillip

  • Just a note for anyone going through this same issue...

    In the linker.cmd file for the application you are trying to flash with the bootloader, you have to set your interrupt vector table to start at the Application Start Address you signify in the bootloader (0x20000 in this case). Once I changed my Vector table to 0x20000 in application and offset other flash banks by -0x20000, everything worked perfect.

    Regards,

    Phillip