diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-01-04 23:53:44 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-01-04 23:53:44 +0100 |
commit | ec96951943921b57ef9c1e9dacb63e34716fe5b7 (patch) | |
tree | c85d1c0a063712459ad12144900eb522b39ef7a0 /cmake/stm32.toolchain.cmake | |
parent | baedda497d16c5096971eee83a0c467fe663fe6d (diff) | |
download | stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.tar.gz stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.tar.bz2 stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.tar.xz stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.zip |
o Actually working implementation of context switching.
It is important to remember to update the stack to the task descriptor on every switch!
Diffstat (limited to 'cmake/stm32.toolchain.cmake')
-rw-r--r-- | cmake/stm32.toolchain.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmake/stm32.toolchain.cmake b/cmake/stm32.toolchain.cmake index ab73d90..e595ec9 100644 --- a/cmake/stm32.toolchain.cmake +++ b/cmake/stm32.toolchain.cmake @@ -22,13 +22,13 @@ set(CMAKE_SYSTEM_PROCESSOR arm) set(CMAKE_CROSSCOMPILING 1) set(TARGET_FLAGS "-mcpu=cortex-m3 -mthumb") -set(BASE_FLAGS "-Wall -g -ffunction-sections -fdata-sections ${TARGET_FLAGS}") +set(BASE_FLAGS "-O3 -ffreestanding -nostdlib -Wall -Wextra -g -ffunction-sections -fdata-sections ${TARGET_FLAGS}") -set(CMAKE_C_FLAGS "${BASE_FLAGS}" CACHE STRING "c flags") # XXX Generate TIME_T dynamically. +set(CMAKE_C_FLAGS "${BASE_FLAGS}" CACHE STRING "c flags") set(CMAKE_CXX_FLAGS "${BASE_FLAGS} -fno-exceptions -fno-rtti -felide-constructors -std=c++14" CACHE STRING "c++ flags") -set(LINKER_FLAGS "-O3 ${TARGET_FLAGS}") -set(LINKER_LIBS "-larm_cortexM4l_math -lm") +set(LINKER_FLAGS "-O3 -Wl,--gc-sections ${TARGET_FLAGS}") +#set(LINKER_LIBS "-larm_cortexM4l_math -lm") set(CMAKE_EXE_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE) |