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.

Bootloader error for TMS570LS31x

Hello.

This is Wooseung. 

i've got the same problem with this post

http://e2e.ti.com/support/microcontrollers/hercules/f/312/t/286194.aspx

I can't send any file on my board by ymodem. 

So. I used the file in the post. but I don't have any idea about the flash_bank variable. 

Can I get help with that. 

Thank you. 

  • Hello Wooseung,

    I have forwarded your question to our bootloader expert. He should reply to your post soon. In the mean time, it might be helpful if you could post your code and let us know which device you are using.

  • Hello Wooseung,

    How do you create the raw binary file (image file)? The project I posted uses Release mode, if you use it as Debug mode, the location of API obi files should be redfined in cmd file.

    Attached is the image file I used for testing. After the image is uploaded to flash successfully, the execution should jump to your application. You will see the LED flashing on HDK.

    Regards,http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/312/6012.TMS570LS31Blinky.bin

    QJ 

  • Thanks for your reply, QJ. 

    I've done test bootloader.

    The reason that ymodem doesn't work is bl_flash. 

    So, I modified bl_flash, bl_link.cmd

    I used bl_flash.c file that u provided with F021 API. And, I modified bl_link.cmd little bit. 

    but, I'm still curious about "flash_bank[bk].numOfSectors". I can't find the variable. 

    So, I just cut the line. and then it works well.

    Thank you for your helping.

    This is the bl_link.cmd I modified.

    ///////////////////////////////////////////////////////////////////////////////////////

    --retain="*(.intvecs)"


    MEMORY
    {
    VECTORS (X) : origin=0x00000000 length=0x00000200
    FLASH_API (RX) : origin=0x00000200 length=0x000014E0
    FLASH0 (RX) : origin=0x000016E0 length=0x002FEB00 //LS31x and RM48 Flash size is 0x300000
    SRAM (RW) : origin=0x08002000 length=0x0002D000
    STACK (RW) : origin=0x08000000 length=0x00002000
    }
    SECTIONS
    {
    .intvecs : {} > VECTORS
    flashAPI :
    {
    ..\Debug\Fapi_UserDefinedFunctions.obj (.text)
    ..\Debug\bl_flash.obj (.text)

    --library= F021_API_CortexR4_BE.lib < FlashStateMachine.IssueFsmCommand.obj
    FlashStateMachine.SetActiveBank.obj
    FlashStateMachine.InitializeFlashBanks.obj
    FlashStateMachine.EnableMainSectors.obj
    FlashStateMachine.IssueFsmCommand.obj
    FlashStateMachine.ScaleFclk.obj
    Init.obj
    Utilities.CalculateEcc.obj
    Utilities.WaitDelay.obj
    Utilities.CalculateFletcher.obj
    Read.MarginByByte.obj
    Read.Common.obj
    Read.FlushPipeline.obj
    Read.WdService.obj
    Async.WithAddress.obj
    Program.obj > (.text)
    } load = FLASH_API, run = SRAM, LOAD_START(api_load), RUN_START(api_run), SIZE(api_size)

    .text > FLASH0
    .const > FLASH0
    .cinit > FLASH0
    .pinit > FLASH0
    .data > SRAM
    .bss > SRAM
    }

    ///////////////////////////////////////////////////////////////////////////////////////

  • QJ,

    If you don't mind can I get the blinky application source that could be the blinky binary file. 

    I've got this source, but I think the source is different with the binary file u gave me. 

    http://processors.wiki.ti.com/images/e/ea/TMS570LS31x_HDK_Blinky_Sample_Code.zip

    Thanks a lot.

  • Hi Wooseung,

    You can use the same project. The only change is the code load address which is defined in cmd file. I highlighted the changes:

    /*----------------------------------------------------------------------------*/

    /* Linker Settings */

    --retain=

    "*(.intvecs)"

    -heap 0x800

    /*----------------------------------------------------------------------------*/

    /* Memory Map */

    MEMORY

    {

    VECTORS (X) : origin=0x00020000 length=0x00000020

    FLASH0 (RX) : origin=0x00020020 length=0x0017FFE0

    STACKS (RW) : origin=0x08000000 length=0x00001300

    RAM (RW) : origin=0x08001300 length=0x0003ED00

    }

    /*----------------------------------------------------------------------------*/

    /* Section Configuration */

    SECTIONS

    {

    .intvecs : {} > VECTORS

    .text : {} > FLASH0

    .const : {} > FLASH0

    .cinit : {} > FLASH0

    .pinit : {} > FLASH0

    .bss : {} > RAM

    .data : {} > RAM

    .sysmem : {} > RAM

    }

     

    Regards,

    QJ

  • Hi Wooseung,

    My project uses RELEASE mode, but you use "DEBUG" mode, so the objects are located in \debug folder rather than \release folder.

    Regards,

    QJ

  • Thanks QJ.

    I've solved the problems.

    It works well now.