cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Embedded Software

anonymous.8
Senior II
Posted on May 09, 2018 at 10:21

Hi !

I have 2 binary files for 2 different function, I'm wondering if there is a stm32 embedded software who can help me to choose which binary run, through the UART ? I want to select the application I run andchange from one to another.

Regards,

Thomas

#embedded-softwares

Note: this post was migrated and contained many threaded conversations, some content may be missing.
14 REPLIES 14
Posted on May 09, 2018 at 19:25

The 'documentation' I use is the CPU technical reference manual as this gives clarity about how it behaves and what it expects.

This provides an example of copying code to RAM, and jumping to it via a standard function pointer.

 

Multiple applications can co-exist in FLASH. The IAP (In Application Programming) examples are illustrative of the methods.

I have update routines I move and run from RAM in order to avoid the processor stalling during Erase and Write operations.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 15, 2018 at 10:27

Ok, so if I can put multiple applications in FLASH, I can program the STM32 these two applications in different part of FLASH and make a JumpToApplication() like in the IAP example ! 

Regards, 

Thomas

Posted on May 15, 2018 at 14:17

Turvey.Clive.002

meyer.frank

If I do aNVIC_SystemReset(), is there a way to choose where the program pointer start in FLASH ? Normaly it's start at 0x80000000, (right ?) can we change this value ?

In this case I'm able to switch applications by doing a reset.

Regards

Posted on May 15, 2018 at 14:39

It is normally zero, and this maps/shadows to 0x08000000 using the BOOTx pins to control the initial mapping.

It will not point to 0x08008000 (or whatever), you instead have to have code (loader) in the 0x08000000 region that transfers control elsewhere (apps)

If you have two apps, one at 0x08008000 and another at 0x08010000 (for example), each of these will have it's own vector table, and you'll point at that and pull the 'function pointer' per the IAP JumpToApplication() method.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
henry.dick
Senior II
Posted on May 16, 2018 at 13:23

No easy solution, as the binaries are compiled assuming a memory lay out that is not going to be true in your setup.

The best is to find the source files and code them accordingly.

Short of that, have two chips each running one of the binaries and switch in and out of each of them on demand.

You can also write a custom boitloader that loads in one of the binaries on demand. 

....