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.

UART BootLoader

Hi

I recently purchased the TIVA TN4C123GXL launchpad. I am trying to famaliarize myself with each and every peripheral on launchpad. My query is about the UART bootloader. I want to implement UART boot loader in my application. I not much famaliar with the Bootloader implementatiuon. I have found the boot serial sample code but I don't know how I need to put the bootloader code in my application.

Kindly could you provide me some simple sample code along with the UART bootloader code.

Lastly do I need to use LM flash programmer and configure the serial UART interface to test the firmware update process?

Regards,

Moz

  • Hi Moz,

        The boot_serial works with the application programs, boot_demo1 and boot_demo2. These programs are not present at the folders of my Tivaware for Tiva Launchpad.

    -kel

  • Hi Kel, Thanks for your reply. My problem is that I want to add UART boot loader in my application such that I can update my firmware via UART. Kindly confirm me, Do I need to add boot serial code and config the blconfig file for UART and add the required code in blmain. I think I need to add linker file as well. Kindly explain me how I need to create the linker file as I need to assign application address and boot loader address in linker file such that when we send a request from UART, it will prompt to update the firmware and once finished, it will return to application address. Regards Moz
  • Hi Moz,

         You can find the answers to your questions at the Tivaware Bootloader User's Guide. You can find this at the docs folder of your Tivaware. Also, do a search in the forum for similar post.

    -kel

  • http://www.ti.com/lit/ug/spmu301/spmu301.pdf

  • hi...

    To make the bootloader working for your application rather than the example, below mentioned is the way to do it.

    if you refer the boot_demo1 & boot_demo2 code, you will find  a function which calls Bootloader.

    You can find this function just above your while(1) loop. 

    you need to copy paste that routine into your application.

    next step will be: If you are using the Code Composer Studio, use point 1 OR if you are using Keil, use point 2.

    1) For CCS users, you need to change the application base address to the program offset addr in the .cmd file in the below

    #define APP_BASE .

    2) For Keil users, follow the below step: U need to change the linker script.

    go to the linker script file in your application .srt file . To modify it, go to Project -> Options for Target "appln name", at linker tab, edit appln name .sct. Modify the file as below. Build the project after modifying the .sct file.

    LR_IROM 0x00002800 0x00040000
    {
    ;
    ; Specify the Execution Address of the code and the size.
    ;
    ER_IROM 0x00002800 0x00040000
    {
    *.o (RESET, +First)
    * (InRoot$$Sections, +RO)
    }

    ;
    ; Specify the Execution Address of the data area.
    ;
    RW_IRAM 0x20000000 0x00008000
    {
    ;
    ; Uncomment the following line in order to use IntRegister().
    ;
    ;* (vtable, +First)
    * (+RW, +ZI)
    }
    }

    --------------------------------------------

    Then follow the regular step through LM Flash Programmer & load the .bin file. 

    THIS WILL WORK FOR SURE..

    Regards

    Mandar

  • So this is setting the starting point in memory for the code you want to load via the chips bootloader? That part makes sense, but I don't understand why we need to call the bootloader...

  • Hello James,

    The Flash based bootloader is a more flexible bootloader, especially if someone wants to set up other system functions. This cannot be done by the ROM based boot loader.

    One of the examples I commonly see on the forum is the user wants to have two images and have a selection flag via the EEPROM or USERCONFIG registesr to decide which one to boot with. Setting up of these registers is not done by ROM Boot Loader. So it makes it easier to have a Flash Based boot loader which can setup these resources and then call the actual boot loader.

    Regards

    Amit

  • Now I'm really confused.

    So you are saying that you make a little program that is bootloaded by the chip, which is a better bootloader, and then you use that to bootload your programs?

    It's not possible to just use the ROM bootloader that comes in the chip to load regular programs?

  • Hello James,

    The ROM Based bootloader can be used along with the the BOOTCFG register to indicate when the ROM Boot loader needs to be called.

    The Flash based bootloader can be made to jump to the ROM Boot Loader on other system events like the user using a LCD Screen or another switch press other than those available in the BOOTCFG register. On top of it some housekeeping activity can as well be done by the Flash based boot loader.

    Regards

    Amit

  • Mandar

    I'm haveing simlar problem. I'm using IAR debuger. What should I cange in the linker script?

    Shmuel