From 194f26aa73b2431265bf80218257dba8e6005679 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Fri, 8 Sep 2023 17:54:01 +0100 Subject: [PATCH] Test: Add -Os to target.json c/cpp flags. --- target-locked.json | 4 ++-- target.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target-locked.json b/target-locked.json index d99569dd..f6423df2 100644 --- a/target-locked.json +++ b/target-locked.json @@ -1,7 +1,7 @@ { "architecture": "CORTEX_M4F", "asm_flags": "-fno-exceptions -fno-unwind-tables --specs=nosys.specs -mcpu=cortex-m4 -mthumb", - "c_flags": "-std=c99 --specs=nosys.specs -Warray-bounds", + "c_flags": "-Os -std=c99 --specs=nosys.specs -Warray-bounds", "cmake_definitions": { "MBED_LEGACY_TOOLCHAIN": "GCC_ARM;" }, @@ -42,7 +42,7 @@ "TOUCH_BUTTON_SENSITIVITY": 5, "USE_ACCEL_LSB": 0 }, - "cpp_flags": "-std=c++11 -fwrapv -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment -Wno-array-bounds", + "cpp_flags": "-Os -std=c++11 -fwrapv -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment -Wno-array-bounds", "cpu_opts": "-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp", "definitions": "-DAPP_TIMER_V2 -DAPP_TIMER_V2_RTC1_ENABLED -DNRF_DFU_TRANSPORT_BLE=1 -DNRF52833_XXAA -DNRF52833 -DTARGET_MCU_NRF52833 -DNRF5 -DNRF52833 -D__CORTEX_M4 -DS113 -DTOOLCHAIN_GCC -D__START=target_start", "device": "MICROBIT", diff --git a/target.json b/target.json index 32981b8b..f5c22f45 100644 --- a/target.json +++ b/target.json @@ -51,8 +51,8 @@ }, "cpu_opts":"-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp", "asm_flags":"-fno-exceptions -fno-unwind-tables --specs=nosys.specs -mcpu=cortex-m4 -mthumb", - "c_flags":"-std=c99 --specs=nosys.specs -Warray-bounds", - "cpp_flags":"-std=c++11 -fwrapv -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment -Wno-array-bounds", + "c_flags":"-Os -std=c99 --specs=nosys.specs -Warray-bounds", + "cpp_flags":"-Os -std=c++11 -fwrapv -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment -Wno-array-bounds", "linker_flags":"-Wl,--no-wchar-size-warning -Wl,--gc-sections -Wl,--wrap,atexit -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group", "libraries":[ {