ARMmbed / mbed-os-example-lorawan

Simple LoRaWAN example application for mbed OS
Apache License 2.0
79 stars 93 forks source link

CMake build fails with `error: inline assembly requires more registers than available` #220

Closed LDong-Arm closed 3 years ago

LDong-Arm commented 3 years ago

Description of defect

The build command

mbed-tools compile -t ARM -m DISCO_L072CZ_LRWAN1

fails with

../../../../mbed-os/connectivity/mbedtls/source/bignum.c:1563:9: error: inline assembly requires more registers than available                                                                                    
        MULADDC_INIT                                                                                                                                                                                              
        ^

Note: This failure happens when compiling Mbed TLS for any STM32L0 targets, with the Arm Compiler and mbed-tools.

Target(s) affected by this defect ?

DISCO_L072CZ_LRWAN1

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

Arm Compiler 6.14

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

mbed-os-6.9.0

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

mbed-tools: 7.8.0

How is this defect reproduced ?

Run the command in the description above.

ciarmcom commented 3 years ago

Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers. Internal Jira reference: https://jira.arm.com/browse/IOTOSM-3810

LDong-Arm commented 3 years ago

Same issue as https://github.com/ARMmbed/mbedtls/issues/1077 The workaround in Mbed CLI 1 is define -DMULADDC_CANNOT_USE_R7.

LDong-Arm commented 3 years ago

Fix: https://github.com/ARMmbed/mbed-os/pull/14529