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.

How to jump to bootloader from application?

Hi 

I integrate ethernet bootloader and that works if I update bootloader and then update app via LM flash programmer + ethernet.

But after the above success update, I can't jump to bootloader to reflash app again.

I trigger SoftwareUpdateBegin(g_ui32SysClock) in app as the reference, but it seems that failed to jump to bootloader.

I can't see the ethernet LED activity , so I think that I don't initialize bootloader success or I can't jump to bootloader.

Does anyone get the idea for me?

thanks
Gavin

  • Hello Gavin,

    Is this a custom board, with which TM4C129 device, crystal? Did you reuse the DK-TM4C129 Ethernet Boot Loader example or wrote a new one? If you connect a debugger where does it show the PC is waiting?

    Regards
    Amit
  • Hi Amit

    1. Yes, This is my system clock setting

    SysCtlMOSCConfigSet(SYSCTL_MOSC_HIGHFREQ);
    
    g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
    	                                 SYSCTL_OSC_MAIN |
    	                                 SYSCTL_USE_PLL |
    	                                 SYSCTL_CFG_VCO_480), SYSTEM_CLOCK);

    2. I reuse the sample code in SDK

    3. PC: 0xFFFFFFFE

    Should I need to make system stay in bootloader manually?

    thanks

    Gavin

  • Hello Gavin,

    You do not have to make the bootloader stay manually. When you said that it is reused code, then what all changes did you make to the code from DK-TM4C129?

    Regards
    Amit
  • Hi Amit

    Yes, I use the sample code from DK-TM4C129 SDK.

    Is there something wrong?

    thanks
    Gavin

  • Hello Gavin,

    There is nothing wrong in the boot loader code from the DK-TM4C129. The PC value of 0xFFFFFFFE would mean that the Flash section where the boot loader is present has been erased as well. If you check with a debugger the address 0x0 and 0x4 does it show all 1's or something like 0x2000... and 0x0000...

    Regards
    Amit
  • Hi Amit

    As you mentioned, my failed case may be caused by bootloader has been erased, right?

    If so, my question is that is there any possibility after updating app image via LM flasher programmer and bootloader is erased at the same time?

    One more thing, could you please show me what's the condition make system stay in bootloader?

    If there are bootloader and app image in flash at the same, where is the checking condition to make system jump to app?

    thanks
    Gavin
  • Hello Gavin,

    I doubt that the updating the App Image is causing the boot loader to get erased. I would suggest doing a simple experiment to confirm that.

    1. Download the boot loader, connect via CCS w/o downloading the code to see the contents of 0x0 and 0x4 and make a note of the values
    2. Download the Application Code via the boot loader, connect via CCS w/o downloading any code and check the value of 0x0 and 0x4, make a note and the value of the Application Code Start Address (that would be decided by the cmd file)

    If then after step-2 the 0x0 and 0x4 show up as 0xFFFFFFFF then it would mean that during the process of App Image download or when App Image executed the boot loader is getting erased. I can re-try the original example Flash based Ethernet Boot Loader on the DK-TM4C129 (and I am 100% certain that I would succeed in changing the Image)

    Regards
    Amit
  • Hi Amit

    Thanks for your suggestion and the bootloader image in flash , not be erased.

    And I find the root cause, I lost SoftwareUpdateInit() in my project.

    It works now!!

    thanks
    Gavin