Skip to content

Commit aa89156

Browse files
author
Marcus Chang
committed
Update Mbed OS compile profiles to include Arm Compiler 6
Compiler profiles are only necessary for GCC but with updated profiles the user can choose to use either.
1 parent 3a76cba commit aa89156

File tree

3 files changed

+60
-20
lines changed

3 files changed

+60
-20
lines changed

features/minimal-printf/profiles/debug.json

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,57 @@
55
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin",
66
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
77
"-MMD", "-fno-delete-null-pointer-checks",
8-
"-fomit-frame-pointer", "-O0", "-g3"],
8+
"-fomit-frame-pointer", "-O0", "-g3", "-DMBED_DEBUG",
9+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
910
"asm": ["-x", "assembler-with-cpp"],
1011
"c": ["-std=gnu99"],
1112
"cxx": ["-std=gnu++98", "-fno-rtti", "-Wvla"],
1213
"ld": ["-Wl,--gc-sections", "-Wl,--wrap,main", "-Wl,--wrap,_malloc_r",
13-
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r",
14+
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r", "-Wl,--wrap,_memalign_r",
1415
"-Wl,--wrap,_calloc_r", "-Wl,--wrap,exit", "-Wl,--wrap,atexit",
1516
"-Wl,-n", "-Wl,--wrap,printf", "-Wl,--wrap,snprintf",
1617
"-Wl,--wrap,sprintf", "-Wl,--wrap,vsnprintf", "-Wl,--wrap,vprintf"]
1718
},
19+
"ARMC6": {
20+
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-g", "-O1",
21+
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
22+
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
23+
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
24+
"-fshort-enums", "-fshort-wchar", "-DMBED_DEBUG",
25+
"-DMBED_TRAP_ERRORS_ENABLED=1", "--ide=mbed"],
26+
"asm": ["--ide=mbed"],
27+
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
28+
"cxx": ["-fno-rtti", "-std=gnu++98"],
29+
"ld": ["--verbose", "--remove", "--show_full_path", "--legacyalign", "--keep=os_cb_sections"]
30+
},
1831
"ARM": {
1932
"common": ["-c", "--gnu", "-Otime", "--split_sections",
2033
"--apcs=interwork", "--brief_diagnostics", "--restrict",
21-
"--multibyte_chars", "-O0", "-g"],
34+
"--multibyte_chars", "-O0", "-g", "-DMBED_DEBUG",
35+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
2236
"asm": [],
2337
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
2438
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
25-
"ld": []
39+
"ld": ["--show_full_path", "--keep=os_cb_sections"]
2640
},
2741
"uARM": {
2842
"common": ["-c", "--gnu", "-Otime", "--split_sections",
2943
"--apcs=interwork", "--brief_diagnostics", "--restrict",
3044
"--multibyte_chars", "-O0", "-D__MICROLIB", "-g",
31-
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD"],
45+
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD", "-DMBED_DEBUG",
46+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
3247
"asm": [],
3348
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
3449
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
3550
"ld": ["--library_type=microlib"]
3651
},
3752
"IAR": {
3853
"common": [
39-
"--no_wrap_diagnostics", "-e",
40-
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-On", "-r"],
54+
"--no_wrap_diagnostics", "-e",
55+
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-On", "-r", "-DMBED_DEBUG",
56+
"-DMBED_TRAP_ERRORS_ENABLED=1", "--enable_restrict"],
4157
"asm": [],
42-
"c": ["--vla"],
58+
"c": ["--vla", "--diag_suppress=Pe546"],
4359
"cxx": ["--guard_calls", "--no_static_destruction"],
4460
"ld": ["--skip_dynamic_initialization", "--threaded_lib"]
4561
}

features/minimal-printf/profiles/develop.json

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,42 @@
55
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin",
66
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
77
"-MMD", "-fno-delete-null-pointer-checks",
8-
"-fomit-frame-pointer", "-Os", "-g"],
8+
"-fomit-frame-pointer", "-Os", "-g1", "-DMBED_TRAP_ERRORS_ENABLED=1"],
99
"asm": ["-x", "assembler-with-cpp"],
1010
"c": ["-std=gnu99"],
1111
"cxx": ["-std=gnu++98", "-fno-rtti", "-Wvla"],
1212
"ld": ["-Wl,--gc-sections", "-Wl,--wrap,main", "-Wl,--wrap,_malloc_r",
13-
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r",
13+
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r", "-Wl,--wrap,_memalign_r",
1414
"-Wl,--wrap,_calloc_r", "-Wl,--wrap,exit", "-Wl,--wrap,atexit",
1515
"-Wl,-n", "-Wl,--wrap,printf", "-Wl,--wrap,snprintf",
1616
"-Wl,--wrap,sprintf", "-Wl,--wrap,vsnprintf", "-Wl,--wrap,vprintf"]
1717
},
18+
"ARMC6": {
19+
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Os",
20+
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
21+
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
22+
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
23+
"-fshort-enums", "-fshort-wchar", "-DMBED_TRAP_ERRORS_ENABLED=1", "--ide=mbed"],
24+
"asm": ["--ide=mbed"],
25+
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
26+
"cxx": ["-fno-rtti", "-std=gnu++98"],
27+
"ld": ["--show_full_path", "--legacyalign", "--keep=os_cb_sections"]
28+
},
1829
"ARM": {
1930
"common": ["-c", "--gnu", "-Otime", "--split_sections",
2031
"--apcs=interwork", "--brief_diagnostics", "--restrict",
21-
"--multibyte_chars", "-O3"],
32+
"--multibyte_chars", "-O3", "-DMBED_TRAP_ERRORS_ENABLED=1"],
2233
"asm": [],
2334
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
2435
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
25-
"ld": []
36+
"ld": ["--show_full_path", "--keep=os_cb_sections"]
2637
},
2738
"uARM": {
2839
"common": ["-c", "--gnu", "-Otime", "--split_sections",
2940
"--apcs=interwork", "--brief_diagnostics", "--restrict",
3041
"--multibyte_chars", "-O3", "-D__MICROLIB",
31-
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD"],
42+
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD",
43+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
3244
"asm": [],
3345
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
3446
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
@@ -37,9 +49,10 @@
3749
"IAR": {
3850
"common": [
3951
"--no_wrap_diagnostics", "-e",
40-
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Oh"],
52+
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Oh", "--enable_restrict",
53+
"-DMBED_TRAP_ERRORS_ENABLED=1"],
4154
"asm": [],
42-
"c": ["--vla"],
55+
"c": ["--vla", "--diag_suppress=Pe546"],
4356
"cxx": ["--guard_calls", "--no_static_destruction"],
4457
"ld": ["--skip_dynamic_initialization", "--threaded_lib"]
4558
}

features/minimal-printf/profiles/release.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,35 @@
55
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin",
66
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
77
"-MMD", "-fno-delete-null-pointer-checks",
8-
"-fomit-frame-pointer", "-Os", "-DNDEBUG", "-g"],
8+
"-fomit-frame-pointer", "-Os", "-DNDEBUG", "-g1"],
99
"asm": ["-x", "assembler-with-cpp"],
1010
"c": ["-std=gnu99"],
1111
"cxx": ["-std=gnu++98", "-fno-rtti", "-Wvla"],
1212
"ld": ["-Wl,--gc-sections", "-Wl,--wrap,main", "-Wl,--wrap,_malloc_r",
13-
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r",
13+
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r", "-Wl,--wrap,_memalign_r",
1414
"-Wl,--wrap,_calloc_r", "-Wl,--wrap,exit", "-Wl,--wrap,atexit",
1515
"-Wl,-n", "-Wl,--wrap,printf", "-Wl,--wrap,snprintf",
1616
"-Wl,--wrap,sprintf", "-Wl,--wrap,vsnprintf", "-Wl,--wrap,vprintf"]
1717
},
18+
"ARMC6": {
19+
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Oz",
20+
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
21+
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
22+
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
23+
"-fshort-enums", "-fshort-wchar", "-DNDEBUG", "--ide=mbed"],
24+
"asm": ["--ide=mbed"],
25+
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
26+
"cxx": ["-fno-rtti", "-std=gnu++98"],
27+
"ld": ["--show_full_path", "--legacyalign"]
28+
},
1829
"ARM": {
1930
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
2031
"--apcs=interwork", "--brief_diagnostics", "--restrict",
2132
"--multibyte_chars", "-O3", "-DNDEBUG"],
2233
"asm": [],
2334
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
2435
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
25-
"ld": []
36+
"ld": ["--show_full_path", "--keep=os_cb_sections"]
2637
},
2738
"uARM": {
2839
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
@@ -37,9 +48,9 @@
3748
"IAR": {
3849
"common": [
3950
"--no_wrap_diagnostics", "-e",
40-
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Ohz", "-DNDEBUG"],
51+
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Ohz", "-DNDEBUG", "--enable_restrict"],
4152
"asm": [],
42-
"c": ["--vla"],
53+
"c": ["--vla", "--diag_suppress=Pe546"],
4354
"cxx": ["--guard_calls", "--no_static_destruction"],
4455
"ld": ["--skip_dynamic_initialization", "--threaded_lib"]
4556
}

0 commit comments

Comments
 (0)