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.
Hi,
I'm new to bootloader and related stuff.Now I have to use bootloader to load the Hex file using UART while application is running.
I got all source file related to Boot loader and two example code which explains how to jump to bootloader.Since I have very basic knowledge about bootloader,could not able to use these files properly.
Is there any detailed example code to start with ?
Or any document which explains implementation?
Note:-Source code and example code found in TivaWare_C_Series-2.1.4.178
Regards,
Satheesh
The ROM UART bootloader on the TM4C1294N device does not load hex files. It loads binary files. The same is true for the flash bootloader examples in TivaWare. You can make a flash bootloader that will load a hex file of your choice of format, but I suspect your current questions are more basic.
Import the projects boot_serial, boot_demo1 and boot_demo2 into your workspace from:
C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c1294xl
Using Code Composer Studio, load and run the boot_serial program. Reset the board.
Open LM Flash Programmer. Set it to manual configuration, Serial (UART), and 115200 baud. Set the COM Port to the "Stellaris Virtual Serial Port" number found in your device manager. You can use the "Device Manager" button on LM Flash Programmer to open the Device Manager. It should look like this:
Now on the program tab, browse to the boot_demo1.bin file. (C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c1294xl\boot_demo1\ccs\Debug\boot_demo1.bin) Set the program address offset to 4000.
Press the reset button on the board again. You will now see LED D1 blink. You have successfully used a flash bootloader to load new code into the device.
Press SW1, The LED stops blinking because the CPU is now back running the bootloader again. Go back to LM Flash Programmer and load boot_demo2. Press reset on the board. Now D2 is blinking.
You can examine the three projects and see how the flash based UART bootloader was built and how the two application codes were done. Here are some links to more detailed information.
Details about how the bootloaders work:
http://www.ti.com/lit/ug/spmu301d/spmu301d.pdf
Details of how the loader (PC side) is implemented:
Greetings Bob,
Your care, detail & resulting clarity here has enabled crack, young staff to note, "Even cb1 could do that!" ..... (maybe)
You may note that, "Staff & I have chronically observed forum users', "Need for bootloader" - yet "Never/Ever" is such "NEED" justified/detailed!" And their project's completion is pushed out & out - and sometimes (even) abandoned...
Posters may prove wise to consider if their "project's proper performance" should "come before" - their "pressing" (yet never explained) "Need for the bootloader..."
Hi Bob,
Thank you very much for your detailed and simplified answer.I have done it and it is working.Now we will go in to its details and let you know if we stuck somewhere
This is our first step towards making our product OTA compatible.
Project requirement
We have to program our device from our factory itself without going to customer site.So in this project we are going to use WIFI to UART converter,it will receive Hex file transmitted from Our system and give it to UART of our target(which is at customer site) and target should itself update the program without any manual intervention.
This project is at initial stage.your help enabled us to start in right direction.
Finally we have to use Hex file instead of binary file.If we get some document,example code or application code on this regard,Will be a great help
Regards,
Satheesh
I suggest that you become familiar with the serial update protocol used by the TivaWare bootloader first. It is documented in:
C:\ti\TivaWare_C_Series-2.1.4.178\docs\SW-TM4C-BOOTLDR-UG-2.1.4.178.pdf
The important point is that you want to make sure that there are no errors or omissions in the new code that was programmed before starting to execute that code. An error could prevent the CPU from ever returning to the bootloader and that would mean the device would require a field service or be returned.
There are several formats of hex files. Look at the ReceivePacket() function in "C:\ti\TivaWare_C_Series-2.1.4.178\boot_loader\bl_packet.c". You could convert the hex input received by the UART to raw data in this function.