From 261e07101343a554400851483b6b9a7ef32c5e28 Mon Sep 17 00:00:00 2001 From: Janne Kiiskila Date: Wed, 12 Jun 2019 11:47:36 +0300 Subject: [PATCH 1/2] Make ARMC5 develop profile also size optimized Due to some historical reasons ARMC 5 compiler behaves very differently compared to others (GCC, IAR, ARM C 6) as it optimizes performance rather than size (like the others). All compilers should behave the same way with the same profile, thus ARM C 5 should also drive towards size (space). --- tools/profiles/develop.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/profiles/develop.json b/tools/profiles/develop.json index c0b9f3802b..49b1a9bfa0 100644 --- a/tools/profiles/develop.json +++ b/tools/profiles/develop.json @@ -27,7 +27,7 @@ "ld": ["--show_full_path", "--legacyalign", "--keep=os_cb_sections"] }, "ARM": { - "common": ["-c", "--gnu", "-Otime", "--split_sections", + "common": ["-c", "--gnu", "-Ospace", "--split_sections", "--apcs=interwork", "--brief_diagnostics", "--restrict", "--multibyte_chars", "-O3", "-DMBED_TRAP_ERRORS_ENABLED=1"], "asm": [], @@ -36,7 +36,7 @@ "ld": ["--show_full_path", "--keep=os_cb_sections"] }, "uARM": { - "common": ["-c", "--gnu", "-Otime", "--split_sections", + "common": ["-c", "--gnu", "-Ospace", "--split_sections", "--apcs=interwork", "--brief_diagnostics", "--restrict", "--multibyte_chars", "-O3", "-D__MICROLIB", "--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD", From 7bfe0be43ffa116f84030d393da9b1b14453aca2 Mon Sep 17 00:00:00 2001 From: Janne Kiiskila Date: Wed, 12 Jun 2019 13:54:34 +0300 Subject: [PATCH 2/2] Align also IAR - develop profile to be size optimized IAR is also performance optimizing instead of size optimizing in develop profile. Align also that (review feedback). --- tools/profiles/develop.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/profiles/develop.json b/tools/profiles/develop.json index 49b1a9bfa0..78e18a47a6 100644 --- a/tools/profiles/develop.json +++ b/tools/profiles/develop.json @@ -49,7 +49,7 @@ "IAR": { "common": [ "--no_wrap_diagnostics", "-e", - "--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Oh", "--enable_restrict", + "--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Ohz", "--enable_restrict", "-DMBED_TRAP_ERRORS_ENABLED=1"], "asm": [], "c": ["--vla", "--diag_suppress=Pe546"],