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.

application - bootloader memory cc3200

Other Parts Discussed in Thread: CC3200

Hi,

    I am studying the application bootloader with cc3200.

    I set the bootmgr.cmd:

/* Application uses internal RAM for program and data */
SRAM_CODE (RWX) : origin = 0x20000000, length = 0x9fff
SRAM_DATA (RWX) : origin = 0x2000a000, length = 0x0fff

#define APP_IMG_SRAM_OFFSET     0x2000b000

The mcuimg1.bin is the blinky demo.I set the cc3200v1p32.cmd :

SRAM_CODE (RWX) : origin = 0x2000b000, length = 0x10000 
SRAM_DATA (RWX) : origin = 0x2001b000, length = 0x10000 

After i download this file(mcuimg.bin : Application_bootloader    .  mcuimg1.bin : blinky.bin)

It can run well.

But, I want to add some application to dowmload the mcuing1.bin through httpserver before run the bootloader.After i add this application  ,when i debug using ccs,it run well(it can download this mcuimg1.bin and run it).But after i write this bin file to sflash,it does not run.

1、I want to ask,is there some differents between debug and download to sflash.

2、where should i set about this project,if i want to add application.

3、I have to use the address 0x20000000-0x20004000?

  • Hi,

    So you have two things :

    1. mcuimg.bin : Application_bootloader (without any change) and mcuimg1.bin : blinky.bin in sFlash, it works fine.
    2. You extended 'Application_bootloader' to have a http client. When you run this from debugger it downloads the mcuimg1.bin to sFlash and also able to load it back and run. But same thing doesn't happen when you flash it.

    Am I missing something here ?

    Regarding Application bootloader is a concatenation of two binaries relocator and bootmgr. When loaded from sFlash this concatenated binary is loaded to 0x2000_4000 and executed. Here the relocator copies max 16 KB of bootmgr to region 0x2000_0000 to 0x2000_4000.

    Once you added the http client, the bootmger might have become larger than 16 KB. So make sure that relocator is also modified for this.

    When using debugger, the relocator doesn't comes into picture. the bootmgr is downloaded directly to 0x20000000 base.


    Thanks and Regards,
    Praveen
  • As you say ,the max size of the application bootloader is 16KB?
  • what do you mean the "relocator".I have change the bootmgr.cmd:
    SRAM_CODE (RWX) : origin = 0x20000000, length = 0x9fff
    SRAM_DATA (RWX) : origin = 0x2000a000, length = 0x0fff

    #define APP_IMG_SRAM_OFFSET 0x2000b000

    The mcuimg1.bin is the blinky demo.I set the cc3200v1p32.cmd :

    SRAM_CODE (RWX) : origin = 0x2000b000, length = 0x10000
    SRAM_DATA (RWX) : origin = 0x2001b000, length = 0x10000
  • Hi,

    This is how how the application_bootloader.bin will look like

    Relocator.bin is created by application_bootloader\relocator\ewarm project.

    Bootmgr.bin is created by application_bootloader\ewarm\Release\Exe project. This same project creates the application_bootloader.bin also as post build action by concatenating Relocator.bin and Bootmgr.bin.

    Changing the bootmgr.cmd only affects Bootmgr.bin image.

    This whole image, application_bootloader.bin, gets loaded into the SRAM at  0x2000_4000 from sFlash. The lower relocator copies the 16 KB starting at offset 256 bytes (i.e. 0x2000_0100) to 0x2000_0000


    The bootmgr is responsible for copying mcuimg1.bin from sFlash SRAM at , in your case, at 0x2000b000 and execute.

    If the bootmgr is greater than 16 KB the relocator will end up copying partial code to  0x2000_0000.

    Thanks and Regards,

    Praveen

    Edit : Image re-uploaded

  • Can you tell me what should i set the relocation.bin and bootmgr.bin ,if i add application up size 16KB.Like 0x2000b000.
  • Hi,

    Apologies, I missed a point here, your bootmgr.bin can't be bigger than 16 KB.

    As I had previously posted, the relocator code runs at 0x2000_4000, it copies the bootmgr to 0x2000_0000. If the bootmgr is larger than 16 KB it will overwrite/corrupt the relocator.

    What is the size of your bootmgr.bin ?

    Thanks and Regards,
    Praveen
  • Now my bootmgr.bin is bigger than 16KB.

    Can i change the relocator.bin to fit the bootmgr.bin that is bigger than 16KB.

    if it can,what should i change.

  • Hi,

    You will need to modify the bootmgr.cmd ranges such that it starts from 0x2000_4000 instead of 0x2000_0000.

    You will also need to move the #define APP_IMG_SRAM_OFFSET     0x2000b000 location accordingly. Like you had done previously.

    Then once you compile, use the bootmgr.bin itself not application_bootloader.bin.


    Try and let me know if that helps

    Thanks and Regards,

    Praveen

  • Thanks,it can work well.
    But ,in this way, the 16 k ram(0x2000 0000 -0x2000 4000) space is wasted and it is not used.
  • You can use this space for data, let say packet buffer use a pointer to point to this region.

    Thanks and Regards,
    Praveen
  • Hi Praveen,

    I am using application - boot loader for my application, whenever I choose that project is always copied into work space, how to avoid that ?

    So I created a separate project and there I copied the source files of bootmgr project, It is compiling and am getting this error "program will not fit into available memory "  ?

    I understand that here the project I created is not  concatenating the relocater and bootmgr , what settings I need to do in ccs for that settings,

    Thanks in Advance,

  • Hi,
    "program will not fit into available memory" shows your application is more than 0x37ff,
    check this:
    MEMORY
    {
    /* Application uses internal RAM for program and data */
    SRAM_CODE (RWX) : origin = 0x20000000, length = 0x37FF
    SRAM_DATA (RWX) : origin = 0x20003800, length = 0x0800
    }
  • Hi ,

    Thanks for your reply ,

    My problem is not that error, and I want to know how to concatenate my own bootloader with the relocator in a separate project . I want to run the application bootloader project without copying into workspace