Export to uvision failing with missing context fault handler

5
closed
Eulenbaer
Eulenbaer
Posted 2 months ago

Export to uvision failing with missing context fault handler #15170

Description of defect

When exporting a uVision6 project for ARMC6 toolchain on NUCLEO_F746ZG target, the build fails with the following error.

linking...
.\BUILD\mbed-os-example-blinky.axf: Warning: L3912W: Option 'legacyalign' is deprecated.
.\BUILD\mbed-os-example-blinky.axf: Error: L6218E: Undefined symbol mbed_fault_context (referred from .\build\except.o).

Target(s) affected by this defect ?

Only tried to export to NUCLEO_F746ZG target, but probably others as well.

Toolchain(s) (name and version) displaying this defect ?

uVision6 / ARMClang6

What version of Mbed-os are you using (tag or sha) ?

tag: mbed-os-6.15.0 sha: 4cfbea43cabe86bc3ed7a5287cd464be7a218938

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli

How is this defect reproduced ?

  1. Create a new project or take an existing one (e.g. blinky).
  2. Export the project for uVision6 by using
    mbed export -i uvision6 -m NUCLEO_F746ZG --source .
    
  3. Build the project
0xc0170
0xc0170
Created 2 months ago

I am closing this as won't fix. Exporters were deprecated and are no longer maintained.

I've seen the error. the problem might be with not defining MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED ? If its not defined the symbol is undefined.

jeromecoutant
jeromecoutant
Created 2 months ago

I can reproduce the issue, and I don't have any more patch except to remove the crash feature.

In Keil uvision, open mbed_config.h file and upate: #0

ATM-HSW
ATM-HSW
Created 2 months ago

I am closing this as won't fix. Exporters were deprecated and are no longer maintained.

Is this somewhere documented, that exporters are deprecated? I'm reading this the first time and tried to find the deprecation warning but was not successful.

It would be crucial to know this.

ATM-HSW
ATM-HSW
Created 2 months ago

I can reproduce the issue, and I don't have any more patch except to remove the crash feature.

In Keil uvision, open mbed_config.h file and upate: #0

Changing the mbed_config.h is not neccessary, just adding

"platform.crash-capture-enabled": false 

to mbed_app.json.

Eulenbaer
Eulenbaer
Created 2 months ago

Another option is to modify the except.S assambly to explicitly include the mbed_config.h. The mbed_config.h is only included for C/C++ files by Keil uVision projects.

In Keil uVision this might look like this: G1eY0g96F3d20TcQ

Please be sure to add the location where mbed_config.h might be found. In my case it is 'mbed_I2CEEPROM'.

EDIT Note the missing "-include mbed_config.h" in Misc Controls for assembly files