Unable to hit main() on boot

Hi !
I am trying to get mbed-os on my board which is very similar to the nucleo, but with a different pin layout. It uses the same M4 as the nucleo.
However, I am unable to achieve the sequence in: https://os.mbed.com/docs/mbed-os/v6.15/program-setup/bootstrap.html. Basically, _start in the startup_stm32.S file under TOOLCHAIN_ARM_GCC never leads to the main getting called. When I replace _start by main in that file, it obviously works.
How do I get mbed-os to initialize successfully without my having to make these changes?
Thank you and Best regards
Shrikumar

Hello,

take a look, it may help

BR, Jan

Hi Jan
Thank you. I followed the steps given here and I still was not able to get it to work.
Thank you and Best regards
-S.

Hi,

I had previously _start issues. There could be few things incorrect. I would start checking linker and regions defined there. Some docs I could quickly find that explains what is happening during the startup sequence: Documentation – Arm Developer (related to gcc arm as well).

If main is not reached, the sequence could not complete. I would review regions - if they are defined with correct ranges and addresses (could be misalignment there, or jumping to incorrect address).

you should be able to debug it and find out where it at least stops or what fault is invoked.