2024-07-12 04:08 AM
Hi,
I am using stm32h745 dual core microcontroller. I want to bootloader application in this processor. The same process does not work with applications made with single core. Can anyone share a sample code for this? Or can you help me on how to apply bootloader in dualcore?
2024-07-12 06:39 AM
There's not much that needs to be different for a dual core bootloader compared to a single core chip. You'll have two programs to flash instead of one, but otherwise the concept is identical.
2024-07-12 06:43 AM
If you think this is the case, can you share a working example code? Dual core is also a bootloader application. Because there is no sample application for dual core in the literature and the ones for single core do not work either.
2024-07-12 09:07 AM
If you think people want to do your job for you, ascribe some value to the work involved..
One core is certainly capable of writing the entire FLASH space, where both core images reside. Each core can also update it's own image, or chose which image it wants to run. You can't have both cores write concurrently so you'll need to arbitrate that.
If the primary core starts the secondary, it can apply the update/recovery processes before doing so.
2024-07-12 10:32 AM
I tire of the "i tried but it doesn't work" excuse with little effort and no evidence behind it. If you couldn't get one example to work, providing another doesn't seem worthwhile.
If you want to work through why something doesn't work, post your code and issues and expectation and we can work from there. Getting new free code for something as complex as a bootloader when examples already exist, probably not going to get any takers here for that.
2024-07-15 11:30 PM
First of all, I would like you to leave the discussion aspect. I think such a suggestion should not be a problem on a platform where many people share the github link and this is normal.
To make the issue clearer, the FLASH linker of my application code is below for m4 and m7. My application code is LED blink running on m7. Configurations and bootloader code are below. The problem is that it cannot jump to the application code.
M4:
M7: I reserved 0x40000 space for the bootloader.
The bootloader code is below.
In my application code, I gave vector offset for m7.
2024-07-16 05:24 AM
Your bootloader is running on the M7, right?
It stops the M4 core, erases the M4 code, restarts the M4 core, and then it jumps to the M4 application that it just flash? That doesn't make sense. The M7 core can't run the M4 code.
2024-07-16 05:42 AM
Yes, bootloader m7 also works. Application code also works on m7.
Even if I call the goto_application() function directly without stopping the M4 core, deleting the M4 core and restarting the M4 core, the bootloader does not work.
This was the bootloader I wanted to develop as the first step. If this worked, I would develop a bootloader for my application code on both m7 and m4.
2024-12-25 03:42 AM
Hello @HS ,
I also want same application. and also facing same issue. can you help me if you have solved this challenge.
2025-01-23 10:03 AM - edited 2025-01-23 10:22 AM
I need the exactly the same dual core bootloader in STM32H745 in my project now. Here are what I have done in the experiment. However, it does not reach the goal yet.
1) My application has two apps which can be up and running in M4(flash address 0x0810 0000) and M7(address 0x0800 0000) successfully now. There are communications between two apps in normal.
2) The bootloader has two apps too. They are in M4(flash address 0x081D 0000) and M7(address 0x080D 0000). The app in M7 can do download images using UART and flash images into 0x0810 0000 and 0x0800 0000. There are communications between two apps when needed.
3) After change the boot address using Cube Programmer, both application and bootloader can be up and running successfully from their own address during the boot.
4) Here is my goal now I want to achieve. Jump to the application address when needed to start the application inside the bootloader. The bootloader can be up and running now. However, application jump seems not successful.
I browsed the relevant topics in this community and prepared the code below for application jump. Each bootloader app in M4 and M7 jump to its own app address (M4 0x0810 0000 and M7 0x0800 0000) is synced using ipc message. The system looks like dead after the jump.
In application app, systemInit() is added at the start of the main() to insure the SCB->VTOR is initialized correctly in both M4 and M7 main.c. systemInit() is called initially in the .s start code in regular boot.
void gotoFirmware(uint32_t fwFlashStartAdd)
{
pFunction appEntry;
appEntry = (pFunction) *(__IO uint32_t*) (fwFlashStartAdd + 4);
__set_MSP(*(__IO uint32_t*)fwFlashStartAdd);
appEntry();
}
In bootloader M7 side
bool cliEchoCmd(..)
{
...
ipc_send_msg(buf, len+1, IPC_MSG_ECHO); // ipc to CM4
tx_thread_sleep(TX_MS_2_TICKS(1000));
gotoFirmware(APP_M7_ADD); //0x0800 0000
}
In bootloader M4 side
bool ipcMsg_Echo(void *pData, uint32_t length)
{
...
//received ipc msg from M7
gotoFirmware(APP_M4_ADD); //0x0810 0000
..
}
I am looking forward to any advices. Thank you in advance.