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.

Test serial bootloader via UART on TM4C123gxl

Other Parts Discussed in Thread: EK-TM4C123GXL, LMFLASHPROGRAMMER, TM4C123AE6PM

Excuse me for asking maybe a dumb question, but I am now very much confused with this.

I was trying to adopt serial bootloader from DK-TM4C123 to EK-TM4C123gxl. UART would be used. I use CCS so I downloaded this bootloader code "usual" way I do it via debug option in CCS. Now I want to test it, I would like just to load blinky example for this board using this bootloader with UART. How to do this? Where to place bin file? 

I made this with USB and that is clear for me now, but for this I'm confused, where to put blinky.bin file? How to force UART transfer of this file from PC to EK. 

Thank you! And I'm quite sorry if this is some dumb question. 

Kind regards!

  • Hello Djedjica,

    You would need a host program running on the PC to read the bin file and download it to the device using the UART interface supported by the bootloader. TivaWare includes some Windows based source that could be used in developing your own interface program (C:\ti\TivaWare_C_Series-2.1.2.111\tools\sflash) but the more practical method for your purposes is to use LMFlashProgrammer and select the UART interface in the interface section of the tool. For the bin file, you can place this anywhere on your PC and browse to it to select it for download by LMFlashProgrammer.
  • Hello Chuck,
    thank you for your quick reply, I downloaded this LMFlashProgrammer and now it seems everything works fine.
    Firstly I use "oldfashoned" Debug from CCS to burn boot_serial to the evaluation kit and than in blinky I moved APP_START address and used LMFlashProgrammer to burn it on board and now it blinks.
    Those steps seem fine to you?
    I also want to test it on EK-TM4C1294 board and proceed to use this code in our systems which are based on those two MCUs or TM4C123AE6PM.
    Kind regards
  • Those steps seem fine if they're working for you. You could alternatively, use LMFlashProgrammer in UART mode to program the boot code as well provided they are starting from an erased state. The ROM based boot loader supports the UART interface too and will kick in when the flash is completely erased. If you're considering production, this is probably a more reasonable approach since CCS would be overkill in a production scenario.
  • Morning Mr. Davenport,
    Still one check with You. Sorry for bothering You this much.
    So, if I understood right, I used this boot_demo as an example and adjusted my code of blinky to give controll to the bootloader program on some button press (JumpToBootLoader()), this way I am able to have LM flash Programmer program new code to the board, after control is given to the bootloader code (button pressed). That is the way usually how this is done or?
    I'm not sure I understand which way I can use LM Flash Programmer for brand new chip, Than I would have to embed all of the bootloader code in my application code or? Just for notice, I would use this serial UART for bootloader update.
  • Hello Djedjica,

    On a new chip the ROM based UART boot loader would be active. So you can use the default boot loader to move in a flash based boot loader which in turn would bring in the application.

    Regards
    Amit
  • Hello Amit,
    yes I think I figured it out searching documentation and forums, but since I have done it in your evaluation kit, I can only hope that it would work on our system boards. What I have done is that I used LM Flash programmer to erase Flash (select TM4C123G Lounchpad in quick set) and than used UART connection to burn boot_serial to the address 0x0, and after that I can easly use LM Flash Programmer to burn blinky , for example, on address 0x2800. I suppose if I get empty chip I can burn boot_serial first using this method and after that I can do offset code burn, code which will be updated later on?
    Also I planned to have some kind of button which will give control to the bootloader code when update is needed. Is that done that way or? Since when I click on button, code halts, goes to bootloader and waits for new "firmware" after update MCU is reset and system is back on with new code.
    Kind regards,
    Djedjica
  • Hello Djedjica,

    Make sure that there is an external crystal on the board. The UART is very sensitive to timing.

    Yes, that is possible for a button to be used for download mode. Please refer to the Serial Boot Loader Application Note.

    www.ti.com/.../spma074.pdf

    Regards
    Amit