STM32 Embedded Software
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 1:21 AM
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 1:44 AM
You might want to look at the IAP examples, and how they transfer control. The processor can jump to any code in memory.
You will need to build/link your applications for specific addresses at which they are going to operate, as the vector table contains absolute addresses.
The alternative is to write a loader which can take object files where the linker hasn't bound them to specific addresses.
Sort of things covered in courses/texts on Assemblers, Compilers, Linkers and Loaders..
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 1:46 AM
Hi
thomas.petrimaux
,You can use the STM32 Flash loader demonstrator (
) is a free software PC utility from ST, which runs on Microsoft® OSs and communicates through the RS232 with the STM32 system memory bootloader.-Nesrine-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 1:50 AM
Sounds like both 'applications' are supposed to be present in Flash anyway.
The simplest option would really be to make both projects into one application, and choose at runtime which part to run. Perhaps per UART, or jumper, or button press.
That would save you a lot of hassle.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 1:58 AM
As also suggested by
meyer.frank
you canmake
both projects into one application, and choose at runtime which part to run.You can refer to this example it may helps you:STM32Cube_FW_L4_V1.0\Projects\NUCLEO-L476RG\Examples\PWR\PWR_ModesSelection
-Nesrine-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 4:57 AM
meyer.frank
‌ exactly I forget to mention that my two applications need to be present in Flash !ELMHIRI.Syrine
‌ thanks for the example this is what I need,I will take inspiration from this example !thanks to all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 8:41 AM
ELMHIRI.Syrine
‌ In this example, the program select a function (who are describe in the program) What i want to do is replace this function by a binary file that I compile from another project. Can I do this ? Make a call of a binary file in another project. (That's sound weird^^)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 8:47 AM
You tend to need to make things free-standing.
One can do it at a subroutine level, and call via function pointers, but it requires an understanding of the micro-controller and the calling conventions, and what other functions and library routines it might touch.
One can load and execute code in RAM also.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 9:27 AM
Turvey.Clive.002
‌ Yes exactly !I want to make 2 boot, place one in flash and the second one in RAM, in order to be able to switch from one to another when it's neccessary. Kind of a dual boot (windows/linux) but with 2 different program.
Where can I find documentation about run code from RAM ?
thanks for your time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-09 11:13 AM
Execution from RAM is useful mostly for debuggers.
RAM loses it's contents with power-off, so it's not really helpful in your case.
Bootloaders for firmware update are another scenarion were execution from RAM is quite handy.
You can access arbitrary Flash regions, and are not hampered by code fetch stalls.
In almost all implementations, you cannot execute code from Flash banks you are about to program.
The IAR Workbench supports execution from RAM nicely - just add a keyword and the toolchain does the rest (if the target supports it at all).
