Arm Mbed OS support forum

Crash capture does not work with bare-metal profile

I noticed that the crash capture feature (documented in Error handling - API references and tutorials | Mbed OS 6 Documentation) does not work with bare-metal profile as mbed_error_initialize() is not called on startup. With RTOS, this is called in mbed_start(). Is it possible to add this somewhere in the bare-metal startup routine? Is there a pre-main function in bare-metal? I could not find any documentation about this.

As a workaround I am calling mbed_error_initialize() from my main function.