-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06b31ad
commit 4b1f601
Showing
2 changed files
with
21 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
set(CMAKE_SYSTEM_NAME Generic) | ||
set(CMAKE_SYSTEM_PROCESSOR arm) | ||
|
||
# Some default GCC settings | ||
# arm-none-eabi- must be part of path environment | ||
set(TOOLCHAIN_PREFIX arm-none-eabi-) | ||
set(FLAGS "-fdata-sections -ffunction-sections --specs=nano.specs -Wl,--gc-sections") | ||
set(CPP_FLAGS "-fno-rtti -fno-exceptions -fno-threadsafe-statics") | ||
|
||
# Define compiler settings | ||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc ${FLAGS}) | ||
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) | ||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++ ${FLAGS} ${CPP_FLAGS}) | ||
set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy) | ||
set(CMAKE_SIZE ${TOOLCHAIN_PREFIX}size) | ||
|
||
set(CMAKE_EXECUTABLE_SUFFIX_ASM ".elf") | ||
set(CMAKE_EXECUTABLE_SUFFIX_C ".elf") | ||
set(CMAKE_EXECUTABLE_SUFFIX_CXX ".elf") | ||
|
||
set(CMAKE_SYSTEM_NAME Generic) | ||
set(CMAKE_SYSTEM_PROCESSOR arm) | ||
|
||
# Some default GCC settings | ||
# arm-none-eabi- must be part of path environment | ||
set(TOOLCHAIN_PREFIX arm-none-eabi-) | ||
set(C_FLAGS "-fdata-sections -ffunction-sections --specs=nano.specs -Wl,--gc-sections") | ||
set(CPP_FLAGS "-fno-rtti -fno-exceptions -fno-threadsafe-statics") | ||
|
||
# Define compiler settings | ||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc ${C_FLAGS}) | ||
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) | ||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++ ${C_FLAGS} ${CPP_FLAGS}) | ||
set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy) | ||
set(CMAKE_SIZE ${TOOLCHAIN_PREFIX}size) | ||
|
||
set(CMAKE_EXECUTABLE_SUFFIX_ASM ".elf") | ||
set(CMAKE_EXECUTABLE_SUFFIX_C ".elf") | ||
set(CMAKE_EXECUTABLE_SUFFIX_CXX ".elf") | ||
|
||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) |