Skip to content

Commit 5e26727

Browse files
Introduced REDUCE_LVGL_BINARY_SIZE option for switching between LVGL with Os and without any optimizations
1 parent aace0cc commit 5e26727

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
125125
cmakeListsTxtPath: ${{ github.workspace }}/Firmware/CMakeLists.txt
126126
cmakeBuildType: Debug
127-
cmakeAppendedArgs : '-DTARGET_PLATFORM:STRING="ARM_CORTEX" -DEXECUTE_MCU_FLASHING=OFF -DCMAKE_BUILD_TYPE:STRING=Debug -DPACKAGE_TESTS=OFF -DNRF5_SDK_PATH=${{ github.workspace }}/Nrf52SDKv16_0 -DARM_NONE_EABI_TOOLCHAIN_PATH:PATH=${{ github.workspace }}/gcc_toolchain_10_2_q4/gcc-arm-none-eabi-10-2020-q4-major'
127+
cmakeAppendedArgs : '-DTARGET_PLATFORM:STRING="ARM_CORTEX" -DEXECUTE_MCU_FLASHING=OFF -DCMAKE_BUILD_TYPE:STRING=Debug -DREDUCE_LVGL_BINARY_SIZE=ON -DPACKAGE_TESTS=OFF -DNRF5_SDK_PATH=${{ github.workspace }}/Nrf52SDKv16_0 -DARM_NONE_EABI_TOOLCHAIN_PATH:PATH=${{ github.workspace }}/gcc_toolchain_10_2_q4/gcc-arm-none-eabi-10-2020-q4-major'
128128
buildWithCMake: true
129129

130130
# # Runs a set of commands using the runners shell

Firmware/graphics/lvgl_lib/lvgl_library/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cmake_minimum_required(VERSION 3.14)
2+
option(REDUCE_LVGL_BINARY_SIZE OFF)
23

34
set (TARGET_NAME lvgl_lib)
45

@@ -355,3 +356,10 @@ target_compile_options(
355356
PUBLIC
356357
${COMMON_FLAGS}
357358
)
359+
if(REDUCE_LVGL_BINARY_SIZE)
360+
target_compile_options(
361+
${TARGET_NAME}
362+
PUBLIC
363+
-Os
364+
)
365+
endif()

0 commit comments

Comments
 (0)