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.

CCS/TM4C1294NCPDT: Bootloader

Part Number: TM4C1294NCPDT


Tool/software: Code Composer Studio

Hi, I've been reviewing the bootloader that comes as part of TivaWare as I would like to use it in my application. I'm just trying to understand how it works. The part that I'm stuck at is the location in flash that the bootloader and the main application both use. Looking at "boot_demo1_ccs.cmd" and "bl_link_ccs.cmd" it looks like they will overlap with each other in flash memory. The bootloader starts at address 0x00000000 and its length is 0x00010000. The main application starts at 0x00004000 and its length is 0x000fc000. So I'd just like to get an explanation of the overlap in memory of these 2 pieces of code.

Thanks,
Doug Burrell

  • Hi Doug,

      Even though the length was specified for 0x10000 (64kB) but the actual size of the bootloader never exceeded a few kilobytes. You can find the actual size in the map file. Below is the map file info about the size of the bootloader. The flash memory is divided into different physical sectors. Each sector is 16kB (0x4000). This is the reason the application will need to start at 0x4000 or higher rather than somewhere between 0-16kB in which case a program erase operation would have erased not just the application code but also the bootloader itself.

    MODULE SUMMARY
    
           Module               code   ro data   rw data
           ------               ----   -------   -------
        .\boot_loader\
           bl_main.obj          1448   0         93     
           bl_packet.obj        456    8         0      
           bl_startup_ccs.obj   304    136       0      
           bl_uart.obj          176    0         0      
           bl_check.obj         92     0         0      
           bl_flash.obj         88     0         0      
        +--+--------------------+------+---------+---------+
           Total:               2564   144       93     
                                                        
           Stack:               0      0         192    
        +--+--------------------+------+---------+---------+
           Grand Total:         2564   144       285    

  • Great, thanks for the info Charles. Why then does the boot_serial application use 0x00010000 as the length and not 0x00004000?
  • Hi Doug,

    The bootloader was never envisioned to occupy 64kB. It is just to inform the linker the maximum amount of flash to allocate the different sections. You can change it to 0x4000 but as is should not create any problem. Unless you instruct the linker to specifically allocate the sections to a memory range (say between 16k-64k) the linker will try to allocate starting from the 0x0.
  • Thanks for the info Charles!