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.

TM4C129XNCZAD: Bootloader with TM4C129X

Part Number: TM4C129XNCZAD
Other Parts Discussed in Thread: UNIFLASH, EK-TM4C1294XL

Dear Sir,

I have compiled the code boot_serial @0x0000 and dump the .bin file  through LM flash loader  by selecting TM4C129X development board +JTAG in configuration

As already read that firmware updated through Uart enable is set in bl_config.h

After that I had bulid the simpl blink code @0x4000 location and dump the same through LM flash loader by selecting TM4C129X development board +JTAG in configuration @ program offset 0x4000

Now I build my code @0x4000 location and dump the same through LM flash loader by selecting Manual configuation+Interface serial UART+Baud rate 115200 but i ma getting the ERROR.

What is an issue.?

As I am doing the right Way or some thing wrong.

  • Hello Abhijit,

    After that I had bulid the simpl blink code @0x4000 location and dump the same through LM flash loader by selecting TM4C129X development board +JTAG in configuration @ program offset 0x4000

    I believe this step is where you are having an issue.

    Once you load the boot loader, you should use that to load the program that is offset to 0x4000.

    When programming over JTAG even with offset address I think it may be writing over the boot loader. I never have tried it myself but I wouldn't be surprised if that is happening. If you use CCS Uniflash you can check by reading out Flash after the boot loader is programmed and then again after doing the programming at offset 0x4000 over JTAG and you can see if the boot loader code is still present at 0x0000.

  • 1.This time I use boot_serial through LM+JTAG(@0x0000 location) .

    2. Boot_demo1 through LM in Uart mode(@0x4000) dump successfully.

    3. Tried to load my code through LMin Uart mode (@0x4000) but getting error " failed to establish communication with the board"

    What is an issue ?

  • Dear Ralph,

    My procedure was right as mentioned thread first time.

    I have also stellaris LM3s9B96 demo board. I have performed boot loader activity with them.

    I have compiled the code boot_serial @0x0000 and dump the .bin file  through LM flash loader  by selecting Lm3s9b96 development board +JTAG in configuration

    After that I had bulid the boot_demo1 code @0x1800 location and dump the same through LM flash loader by selecting Lm3s9b96 development board +JTAG in configuration @ program offset 0x4000 by selecting erase necessary pages so boot loader will not erase.

    Now I build my code @0x180000 location and dump the same through LM flash loader by selecting Manual configuation+Interface serial UART+Baud rate 115200  and its successfully working.

    I have again repeat the process and dump boot_demo1 through uart and its also working.

    But that is not the case in TM4C129X. What is an issue?

  • Hello Abhijit,

    3. Tried to load my code through LMin Uart mode (@0x4000) but getting error " failed to establish communication with the board"

    How are you triggering the boot loader to be ready to expect another program?

    The demo is set to have a trigger to invoke the boot loader again.

    If you do not use that trigger, then the boot loader won't connect automatically. This is so the application is only updated when the user wants to do so.

  • I have refereed the below link .

    https://e2e.ti.com/support/microcontrollers/other/f/908/t/366681?TM4C129x-BOOT-Loader

    Not succeed that why written on E2E.

    In this link 1st use boot_serial and then code dump through UART (compiler - CCS) where as I am using Keil Compiler. 

    Follow in same line Dump boot_serial @0x0000 location then use LMFlash loader with UART to dump our code.

  • Hello Abhijit,

    Okay I understand now. I would not recommend using that code, it is 7 years old. Let me help you with newer code.

    We have boot loader examples in our TivaWare SDK that are fully up-to-date though we admittedly don't have a good flash boot loader demo project for the DK-TM4C129X.

    The flash boot loader from the EK-TM4C1294XL can be used on the DK-TM4C129X as well. This project is boot_serial in TivaWare under the EK-TM4C1294XL examples folder.

    I went ahead and modified the boot_demo_uart project for DK-TM4C129X to work with a Flash boot loader instead. I am attaching that here for your use:  boot_demo_uart_flash.zip

    This setup should now work reliably together, I have tested that I am able to reload the boot demo project multiple times with the flash boot loader.

  • Dear Bob,

    I am using Keil compiler. I have used the Boot_serial as suggested and use your zip file in Keil enviroment.

    In Boo_serial  there is bl_config.h  in which APP_START_ADDRESS 0x10000 & VTABLE_START_ADDRESS    0x10000   defined.

    Using LM Flash Loader with configuration Tm4C129X Developement board+JTAG dump boot_serial.bin image @0x0000 location

    Compile my project application Boot_demo_Uart_1@)x10000 and dump with same configuration(LM Flash loader+TM4C129X development board +Jtag)with erase necessary pages option.

    But nothing is displayed.

    Attaching the file of project for reference. 

    Where I am doing wrong in process?

    Boot_Project.zip

  • Hello Abhijit,

    You need to set the APP_BASE address in the .cmd file for the Program you are loading with the boot loader to match the APP_START_ADDRESS defined in your bl_config.h file.

    We just released a new document that has a section which describes this is great detail. Have a look at Section 6 of our TivaWare's Getting Started User's Guide: https://www.ti.com/lit/pdf/SPMU373

    It will walk you through all the modifications you need to make.

  • Dear Ralph,

    Thanks. Its working 

    I had modified the cmd and now its working . I am  also able to upload my code through UART .

    If I want to change UART from 0 to 1 what are the modification require . Boot_serial also need to change ?

  • Hello Abhijit,

    Correct, you'd need to change everything using UART0_BASE to UART1_BASE and you will need to change the pin configurations in bl_config.h to reflect the new pins for UART1.

  • Dear Ralph ,

    I am dumping the code through uart .During the process suddenly power goes off then not able to communicate with LM flash loader tool.

    What is the way or precaution to be take in the programming. What need to be modify to avoid this condition.

    Why it will not hold the previous code because code is not completely dump to controller.

  • Hello Abhijit,

    The boot loader operation does not have a means to restore the original firmware. If the boot loader process is interrupted and the image is corrupted as a result, then the boot loader needs a means to recover from that. In the case of the ROM boot loader, it is possible to configure a GPIO to manually trigger the boot loader on power up. In the case of the Flash boot loader, there is a CRC feature used to check the validity of the image and if the image is not valid, re-start the boot loader process.

    Once enabled, then on each power up or device reset the boot loader will check if the image loaded has the correct CRC value. If it finds that value is incorrect, then it will trigger the boot load process again so you can write a new image.

    The details of this are covered in Section 10 of the TivaWare Boot Loader's User Guide under the CHECK_CRC configuration: https://www.ti.com/lit/pdf/spmu301