ARMmbed / mbed-os-example-mbed-crypto

Mbed Crypto example for Mbed OS 5
Apache License 2.0
5 stars 19 forks source link

Work around ARM and IAR optimization issue #48

Closed Patater closed 5 years ago

Patater commented 5 years ago

Add a custom profile to work around an issue with the ARM and IAR compilers, where the example appears to hang without any error. Building the example with -O1, rather than the default of -Os, works as a workaround.

To use the custom profile with mbed-cli, use the --profile option.

mbed compile -m CY8CKIT_062_WIFI_BT -t ARMC6 --profile mbed_profile.json

Arm internal reference: SDCTRESPONSE-3550

Patater commented 5 years ago

New patch set lists all toolchains explicitly, for users who want to always pass --profile even to non-affected toolchains. The new patch set also is no longer standalone and requires passing of another profile first to be overridden.

Tested working with CY8CKIT_062_WIFI_BT: develop profile and ARMC6, develop profile and GCC_ARM, release profile and ARMC6, debug profile and ARMC6.

Patater commented 5 years ago

Took approach of reducing stack usage of the example instead.

https://github.com/ARMmbed/mbed-os-example-mbed-crypto/pull/49