Skip to content

Commit 82287f9

Browse files
committed
Work around ARM and IAR optimization issue
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` (ARM) and `-Ol` (IAR), rather than the default of `-Os` (ARM) and `-Ohz` (IAR), 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
1 parent 58ee0a9 commit 82287f9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

getting-started/mbed_profile.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"ARMC6": {
3+
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-O1",
4+
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
5+
"-Wno-reserved-user-defined-literal", "-Wno-deprecated-register",
6+
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
7+
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
8+
"-fshort-enums", "-fshort-wchar", "-DMBED_TRAP_ERRORS_ENABLED=1"]
9+
},
10+
"IAR": {
11+
"common": [
12+
"--no_wrap_diagnostics", "-e",
13+
"--diag_suppress=Pa050,Pa084,Pa093,Pa082,Pe540", "-Ol", "--enable_restrict",
14+
"-DMBED_TRAP_ERRORS_ENABLED=1"]
15+
}
16+
}

0 commit comments

Comments
 (0)