Hi everyone,I am working on two devices: stm32f446RETx and stm32f446RCTx, the only difference between these devices is the flash memory size (512K and 256K).I am trying to get a same executable code on both references for double sourcing matters. I have a code with a bootloader and an application.The application runs with RTX os.I have a scatter file for the application code which limits the application location in order to keep a compatible hex file for STM32f446RCT (which have the smallest memory).Everything works correctly when I set the project device with stm32f446RETx and on run it on a stm32f446RETx .However when I compiled the project seting stm32f446RCT device and runs it on the stm32f446RET (which should not be a problem since only the flash memory size is different) the os_sys_init function jump into the weak SVC interrupt of the bootloader.I do not use this interrupt in any case, and I do not have this issue when I compile for stm32f446RET and runs the code on stm32f446RET.I will soon get a board with stm32f446RCT to try the opposite (stm32f446RET compilation running on stm32f446RCT device).I am sure it is not a memory size issue, but I am wondering what could be the cause of it ?When I compile the same application for stm32f446RCT without the use of the bootloader and runs it on the stm32f446RET device it works perfectly as well.The bootloader itself works on stm32f446RET either it was compiled for stm32f446RET or stm32f446RCT.I do not realy know how to solve this. Any ideas ?Best regards
Perhaps try minimizing the application to see if it still fails (just empty main toggling an LED or similar).
If it does not fail, try enabling other pieces of code until you get it to fail and see what seems to be the cause.
Hi and thanks for the answer, I did try to run my code step by step, and it always failed in os_sys_init function. I have some initialization functions before which seem not to cause any problem. Since last post, I got an STM32F446RCT microcontroller, and the code compiled for STM32F446RET seems to run correctly on this device. So I will go for this colution: Keep compiling for STM32F446RETx and limit the memory size to the STM32F446RCTx with the scatter file.