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

Jumping to a fixed memory address

Hello,

I'm working on an application where I need a firmware update. I wrote a bootloader, but I don't get a right solution how to jump to a fixed memory address. I read many forums but those solution wasn't good.
I check with my bootlader, that if the uploaded binary file (stored in the flash memory of microcontroller) is a new firmware?, need a firmware update?, if yes the program sholud jump to the application code address in the memory. If isn't new firmware the program should jump in default to the application address.

Can You tell me how can I implement it in C, or better in inline assembly?

Please help me to find a good solution,
Kind regards,
Szabolcs

P.s.: I'm working with STM32F407 microcontroller, and I use the Keil environment with ARM C51 compiler

Parents
  • Jumping to a fixed address shows a basic lack of understanding of the Cortex-M4 with multiple firmware images, I'd suggest you start by reading some technical manuals so you know a little bit about how it functions. Review the other forum answers until you do understand them.

    Review ST's IAP Examples, there are ones using the USART, others for the STM32F4-DISCO that use USB Flash Sticks (fw_upgrade), and check for new images, etc.

    In C use function pointers to transfer control.

    typedef  void (*pFunction)(void);
    pFunction Jump_To_Fixed;
    Jump_To_Fixed = (pFunction) 0x08012345; // ODD Thumb Addr
    Jump_To_Fixed();
    

Reply
  • Jumping to a fixed address shows a basic lack of understanding of the Cortex-M4 with multiple firmware images, I'd suggest you start by reading some technical manuals so you know a little bit about how it functions. Review the other forum answers until you do understand them.

    Review ST's IAP Examples, there are ones using the USART, others for the STM32F4-DISCO that use USB Flash Sticks (fw_upgrade), and check for new images, etc.

    In C use function pointers to transfer control.

    typedef  void (*pFunction)(void);
    pFunction Jump_To_Fixed;
    Jump_To_Fixed = (pFunction) 0x08012345; // ODD Thumb Addr
    Jump_To_Fixed();
    

Children