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.

LM FLASH PROGRAMMER build 1429 serial Mboot download doesn't send the COMMAND_RESET

HI,

I'm using LM FLASH PROGRAMMER build 1429 to do the serial download of my blinky_m3.bin to the M3, with the "reset MCU After Program" checked, and download address of 0x20005000.  The programmer reports "Program Complete 21944 Bytes Programmed" but the blinky application doesn't start running.  I prepared the .bin file by following the steps for post build in TRM 6.8.1.1 for the blinky_m3 example.

"${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}"

"${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd470.exe"

"${CG_TOOL_ROOT}/bin/hex470.exe" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"

I'm using 64 bit windows 7, and I didn't see the reset, I also tried running it in XP compatibility mode, and didn't see the reset.  Any ideas for me?

Thanks,

Larry

  • Larry,

    there is a checkbox in the program tab, 'Reset MCU', I think if you check that you will get a RESET. The RESET command doesn;t actually reset the device. It internally tells the Concerto device to go start the application from the application start address. Application start address here is the address where the last DOWNLOAD command began downloading the application.

     

    Best Regards

    Santosh

  • Hi Santosh,

    Thanks for the very quick reply! (and Happy Friday :))  Unfortunately, I did have the checkbox checked, so that's not fixable.

    I did expect it to have the effect of COMMAND_RESET, giving control to the application start address where main or a branch to main are

    Thanks again,

    Larry

  • yep, you are right. Both COMMAND_RESET and COMMAND_RUN give control to applcation with below differences

    > COMMAND_RESET -> the application start address is derived from the last successful DOWNLOAD command serviced.

    > COMMAND_RUN -> the application start address is derived from the current RUN command itself.

     

    Best Regards

    Santosh

  • Hi Santosh,

    I would like the downloaded to RAM blinky to get control.  Would you advise trying to edit the binary to add the COMMAND_RESET ( 3 0x25 0x25) at the very end?

    Thanks,

    Larry

  • Larry,

    which binary you are talking about? blinky.bin? are you still talking about communicating to board with LM Flash programmer or some other utility?

    Best Regards

    santosh

  • Yes, putting the COMMAND_RESET at the end of  blinky_m3.bin.  I am still talking about sending the .bin with LM Flash Programmer

  • how would that help? you are probably assuming that COMMAND_DOWNLOAD, SEND, SEND...etc commands come from the bin file,which is not the case. The programmer takes a plain bin file and packages them to COMMAND_DOWNLOAD, SEND, SEND, SEND...RESTART .

    if you check the 'RESTART MCU' box in the program tab of LM Flash programmer it should send the RESTART command automatically at the end of transfer and that should start the blink app.

    Best Regards

    santosh

  • Santosh Athuru said:
    if you check the 'RESTART MCU' box in the program tab of LM Flash programmer it should send the RESTART command automatically at the end of transfer and that should start the blink app

    My problem is that even though I have checked the RESTART MCU box in the program  tab, blinky is not started. 

  • oooh, thats probably the linker command file. I just saw the default blinky linker commands doesnot generate a bootable image. For the applciation image to be bootable, the reset or entry point of the app should be at 0x20005000. See if you can edit your default linker command file to match below. mainly make sure your application doesn;t use any memory before 0x20005000 and your reset entry point and INT VECS should be declared as below.

    /////use below in your linker command file....

    #define APP_BASE 0x20005000

    /* System memory map */
    MEMORY

    {

    BOOT_RSVD (RWX) : origin = 0x20004000, length = 0x00001000

    RESETISR (RWX) : origin = 0x20005000, length = 0x00000008

    C2RAM (RWX) : origin = 0x20005008, length = 0x00000FF8

    INTVECS (RWX) : origin = 0x20006000, length = 0x000001B0

    C3RAM (RWX) : origin = 0x200061B0, length = 0x00001E50

    S0RAM (RWX) : origin = 0x20008000, length = 0x00002000

    S1RAM (RWX) : origin = 0x2000A000, length = 0x00002000

    S2RAM (RWX) : origin = 0x2000C000, length = 0x00002000

    S3RAM (RWX) : origin = 0x2000E000, length = 0x00002000

    S4RAM (RWX) : origin = 0x20010000, length = 0x00002000

    S5RAM (RWX) : origin = 0x20012000, length = 0x00002000

    S6RAM (RWX) : origin = 0x20014000, length = 0x00002000

    S7RAM (RWX) : origin = 0x20016000, length = 0x00002000

    CTOMRAM (RX) : origin = 0x2007F000, length = 0x00000800

    MTOCRAM (RWX): origin = 0x2007F800, length = 0x00000800

    }

    /* Section allocation in memory */

    SECTIONS

    {

    .intvecs : > INTVECS

    .resetisr : > RESETISR

    .text : > C3RAM

    .const : > C3RAM

    .cinit : > C3RAM

    .pinit : > C3RAM

    .vtable : > C2RAM

    .data : > C2RAM

    .bss : > C2RAM

    .sysmem : > C2RAM

    .stack : > C2RAM

    ..

    ...

    ...

    }

    /////////////////end sample linker snippet ////////////

    Let me know if you have any questions.

     

    Best Regards

    santosh

     

  • Hi Santosh,

    This was an excellent thought of yours!  Now it comes right up.  Next the flashburner :)

    Thank you!

    Larry

  • awesome, it would be nice if your applciation (Reset entry function) can look at some word in RAM and decide whether to call flash_bruner or simply proceed. It will help you in testing.

     

    Best Regards

    santosh

  • Hi Santosh,

    As you know with your excellent help I used LM FLASH Programmer to download my bin of Blinky, and get control.  I prepared the binary image according to the recipe in TRM 6.8.1.1 I'd like to avoid developing a serial sender, so using LM to send my burner code, and then using LM FLASH Programmer to send the image to be burnt looks appealing.  Is there a place to find out more information about what LM does?  

    Thanks,

    Larry

  • Larry,

    I'm not sure if we release the sources for LM Flash programmer. Please check with Stellaris forum team - they should be able to provide you with all the information.

    while you wait for that answer - are you sure that LM Flash programmer works for your use case as it is? or you plan to use it temporarily for testing and are you looking to modify LM Flash programmer for your need?

     

    Best Regards

    Santosh

     

  • Hi Santosh,

    Thanks for finding that post.  Unfortunately they won't be giving out source code ;(  I wanted this because when I discussed with my manager the hack we had discussed, he unfortunately thought that it was too risky for our production code. So now I'm thinking in terms of implementing the serial protocol for my burner, and doing the receive/ACK myself  since I won't be calling into the boot rom unless and until there's a published API that makes him happy.  Should I start a new thread?

    Thanks,

    Larry

  • Larry,

    yep, please start a new thread. Stellaris team might help address the issues on LM Flash programmer side.

     

    Best Regards

    Santosh

     

  • Santosh,

    Thanks very much for all your help, you ROCK!

    Larry

  • Hi,

    I am using LM Flash programming for programming code for transferring data from input register to output register.

    Is is possible to make code and programmed in flash memory and than remove USB just power is given externally in EKK-LM3S9D92 evaluation kit....