How to customize startup file?
I am a newbie in embedded programming. My idea is to build 3 applications with 3 separate project file. These 3 applications will work together in 1 CPU as shown in the image below:

To jump from App to another APP, I do the same way bootloader jumps to application:
#define ADDR_APP_2_PROGRAM 0x08120000
#define ADDR_APP_3_PROGRAM 0x08140000
typedef void (*pJumpFunc)(void);
pJumpFunc Jump_To_App;
void Jum_To_APP_2(void);
int main(void)
{
Jum_To_APP_2();
}
void Jum_To_APP_2(void)
{
Jump_To_App = (pJumpFunc)*(volatile uint32_t*)(ADDR_APP_2_PROGRAM + 4);
// __disable_irq();
__set_MSP(*(volatile uint32_t*) ADDR_APP_2_PROGRAM);
Jump_To_App();
}
Jump from one application to another was successful. But the obvious problem here is that data segment initializers copy from flash to SRAM of APP_2 and APP_3 will be performed repeatedly in a loop. I thought of a few ideas like: skipping the copy instructions in the startup code from the 2nd loop onwards, but I'm stuck. I don't find any commands related to _sdata, _sidata... or bss in the startup file generated by STM32CubeMX. Is there some hidden code associated with the current startup file? Can I create a custom startup file to replace the current startup file?
If you can I would love for you to give me an idea! Thank you very much!
(I'm using Keil.I used the label STM32CubeIDE because I couldn't find a more suitable label.)
