Why does MBED hang when it boots due to Fatal Error?

Wondering why board does not recover (i.e. reboot and come back up running from reset vector) after an MbedOS error such as shown below. We’ve had other errors (out of stack space) with same result. It seems MBED generates an error such as below, then board requires hard power cycle to begin running again. Is this to be expected with MBED OS? Is MBED hung in some loop? Perhaps we have a bug (good chance), but I am accustomed to a reboot, board comes back up running, after such a fatal error, on other RTOS I have worked on. Maybe there is some MBED parameters, settings we need to configure to allow for auto reboot, come back up running? Thanks.

++ MbedOS Error Info ++

Error Status: 0x80FF013D Code: 317 Module: 255

Error Message: Fault exception

Location: 0x804D3EA

Error Value: 0x2001230C

Current Thread: xxxx_host Id: 0x200055A0 Entry: 0x803EE09 StackSize: 0xFE8 StackMem: 0x20004540 SP: 0x20005310

For more info, visit: mbedos-error

Hello,

yes, this is standard Mbed OS behavior. The Os will save data in specific part of memory when an exception occured, then restart it self. After restart it will print out the error, and stay in a loop with specific led blinking patern.

I won’t say what is correct or best, but for me the behavior is OK. I do not want release a program with auto crash restart I want to identify and solve the issue. But it depends on situation and I can imagine it can be like temporary workaround.

Yes of course it is possible. Please be so kind and take a look to post below.

Hope this helps and happy bug hunting.
BR, Jan

Thanks everyone for your replies. The issue is, we do not want to deploy a unit in field that can boot due to MBED OS error and hang. The unit is then bricked, must be replaced in field. While we do not expect to have such issues go to field, the hope is we find and fix all such issues before deployment, but is very undesirable to have a unit hung in field and results in a truck roll to replace unit in field.

I will definitely look into this: you can handle MbedOS crash according to Error handling - API references and tutorials | Mbed OS 6 Documentation and additional info is here.

I would like to enable filename and line number per below, but can’t locate file where this is enabled. Please advise.

You can enable the file name capture by setting the configuration option MBED_CONF_PLATFORM_ERROR_FILENAME_CAPTURE_ENABLED to true.

How this works is written here - The configuration system - Program setup | Mbed OS 6 Documentation.

Simply saying, definition of this macro can be found in ProjectName\BUILD\TargetName\mbed_config.h file, but can not be changed here because it is auto generated by build system.
Macro like this, with MBED_CONF_, have to be changed via mbed_lib.json file. According to part PLATFORM its location will be mbed-os\platform\mbed_lib.json and according to its name ERROR_FILENAME_CAPTURE_ENABLED it will be the the settings on line 54.

These settings can be overridden with mbed_app.json file. If you do not already have it in your project, then create same file with this name in root folder of your project and place necassary settings inside.

Mbed_app.json could look like

{
    "target_overrides": {
      "*": {
        "platform.error-filename-capture-enabled": true
      }
    }
}

BR, Jan

THANK YOU BR, Jan. I do have those cfg files in my project, just did not understand where to add/set error-filename-capture-enabled.