This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32F415 factory programmed bootloader

Hi,

Urgently needed

I am writing a custom bootloader for my company's product , which is using STM32F415RGTx micro-controller. My intention is that my bootloader should be able to jump to corresponding memory location or sector , which stores the new incoming firmware files. These files are coming over the air.

My question is:

Should I erase the factory programmed bootloader of ST, which is residing at address 0x0000000 and place my custom bootloader over there, is the factory bootloader re-programmable or is it just One-time programmable.

If it's One-Time programmable then I guess there's no point of erasing it and writing my custom bootloader. In that case I am planning to go with the concept of secondary bootloader.
Then what should be the memory address where the second bootloader should reside.
Can anyone give me a link to find more about it.

Thank you
Abhi

Parents
  • Hi ,

    So I successfully implemented the bootloader , which I am keeping at an address starting form 0x08000000, basically it occupies Sector 0 , Sector 1 and Sector 2 of ST internal flash memory.
    I am keeping my main application program starting form address 0x0800C000, which is at Sector 3.

    Now my bootloader is able to jump to my main application, but when I see my main application getting executed I noticed it doesn't execute completely. It stops at the very first HAL_Delay(10) statement.

    Can anyone please tell me how to fix this? or where I am mistaken.

    Below is my bootloader code snippet

    #define FIRMWARE_1_FLASH_ADDRESS 0x0800C000
    #define FIRMWARE_1_CODE_ENTRY FIRMWARE_1_FLASH_ADDRESS

    int main(void)
    { //printf("Hello World\n"); if(BlueBrain_SysInit()){ DEBUG_UART.println("I am a Bootloader\n"); }

    FUNC_PTR *func;

    func = (FUNC_PTR *)(*(uint32_t *)(FIRMWARE_1_CODE_ENTRY+4));

    __set_MSP(*(uint32_t *)FIRMWARE_1_FLASH_ADDRESS);

    func();

    }

Reply
  • Hi ,

    So I successfully implemented the bootloader , which I am keeping at an address starting form 0x08000000, basically it occupies Sector 0 , Sector 1 and Sector 2 of ST internal flash memory.
    I am keeping my main application program starting form address 0x0800C000, which is at Sector 3.

    Now my bootloader is able to jump to my main application, but when I see my main application getting executed I noticed it doesn't execute completely. It stops at the very first HAL_Delay(10) statement.

    Can anyone please tell me how to fix this? or where I am mistaken.

    Below is my bootloader code snippet

    #define FIRMWARE_1_FLASH_ADDRESS 0x0800C000
    #define FIRMWARE_1_CODE_ENTRY FIRMWARE_1_FLASH_ADDRESS

    int main(void)
    { //printf("Hello World\n"); if(BlueBrain_SysInit()){ DEBUG_UART.println("I am a Bootloader\n"); }

    FUNC_PTR *func;

    func = (FUNC_PTR *)(*(uint32_t *)(FIRMWARE_1_CODE_ENTRY+4));

    __set_MSP(*(uint32_t *)FIRMWARE_1_FLASH_ADDRESS);

    func();

    }

Children
No data