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 problem in LM4F232H5QR



Hi,

I have one LM4F232H5QR evaluation board. I am using CCS.

I'm trying to learn bootloader program by using boot_serial example in LM4F232H5QR. First of all, l've loaded bootloader, ie, boot_serial.bin, to the board using LM Flash Programmer via JTAG. Then i've loaded another example code, ie, blinky.bin to the board using UART. In blinky_ccs.cmd file, i've changed the APP_BASE from 0x00000000 to 0x00002800. When i reset the board, the LED starts blinking.

But, if i am trying to load the blinky program again, it is not getting loaded. ie, second time if i press 'program' in LM Flash Programmer one error message is coming.

I've tried by defining " MyCheckUpdateFunc(void)" and "#define BL_CHECK_UPDATE_FN_HOOK MyCheckUpdateFunc". Then i repeated above procedures, first i've loaded boot_serial.bin, then blinky.bin. This time blinky program is not working, but i can load the blinky.bin file again and again.

Can anyone please tell me the solution.

  • Hi,

        Just use the boot_demo1 or boot_demo2 as base. Then just add a blinky code. Know the difference between blinky and boot_demo1 or boot_demo2. Search this forum also.

    -kel

  • Hi kel,

    I've tried with boot_demmo1 and boot_demm2.

    But i am not able to load blinky code at least for once also.

    Bijo

  • Hi,

        You are sort of in the same situation as Santosh from the post below. See Stellaris John's explanation.

        http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/263980/929280.aspx#929280

    -kel

  • Hi kel,

    I have defined ENABLE_UPDATE_CHECK, FORCED_UPDATE_PERIPH, FORCED_UPDATE_PORT, FORCED_UPDATE_PIN, FORCED_UPDATE_POLARITY and FORCED_UPDATE_WPU in bl_config.h. Now everything is working fine.I can load any program through UART.

    But i don't want to use extra GPIO pin for it. Is there any other method to do bootloader program??

    Thanks for the help.

    Bijo

  • Hi Bijo,

       I think I have not given you the proper directions. Let's get back to your first post. I have done the same sequence below as you before, learning about bootloader, using a different Evaluation Kit.

    1. Load boot_serial using JTAG at adress 0x0
    2. Load blinky using serial at address XXXX

    When I reset the board, the led starts blinking. But, when I load the blinky again, there was some sort of problem with the LM Flash Programmer. The cause of the problem is that blinky needs to jump back into the bootloader in order to reprogram the board after your application has started executing.

    That is why I advice to use the boot_demo1 as base, and just add a blinky code. Much easier.

    But, if you want to use the blinky code together with boot_serial. You need to add a code that jumps to bootloader, and as per Stellaris John's advice from the post link above "make sure to call SysCtlClockSet() and run the part from the PLL".

    No, bl_config.h modifications are needed.

    -kel

  • Hi kel,

    Can you tell me the changes that i have to make in boot_demo1 for using it as the base for the bootloader. I have confused with demo1 because its flash address is starting from 0x2800. My blinky flash starting address is also 0x2800.

    Bijo

  • Hi kel,

    Thanks for you information. I have used boot_demo1 as the base code. Now everything is working fine.

    I want to know one more thing. How does the communication through UART is working.?? What are the data being send/receive for UART firmware upgrade.??

    Thanks for your help.

    Bijo