diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2025-09-30 13:06:16 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2025-09-30 13:06:16 -0600 |
| commit | 290d784950b6248782b049cd9831bd6e034fd538 (patch) | |
| tree | c231c02e92ed83a02b234a85b3c07bcc5e44b168 /CMakeLists.txt | |
| parent | f89f75b5616de99865448f41b068a2783cd3648e (diff) | |
| download | ch573-main.tar.gz ch573-main.tar.bz2 ch573-main.zip | |
Add many different patterns, and organize it.
Add a voltage discovery subsystem to allow the ch573 to detect if it's
on 12v or 5v lights.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index be194aa..554dfa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,8 +49,8 @@ project (ch537 LANGUAGES C ASM) # Set compiler and linker flags file(GLOB LINKER_SCRIPT "linker/*.ld") -set(CMAKE_C_FLAGS "-march=rv32imac_zicsr -mabi=ilp32 -lgcc -static -O -std=gnu99" CACHE INTERNAL "C Compiler options") -set(CMAKE_ASM_FLAGS "-march=rv32imac_zicsr -mabi=ilp32 -lgcc -static -O -std=gnu99" CACHE INTERNAL "C Compiler options") +set(CMAKE_C_FLAGS "-march=rv32imac_zicsr -mabi=ilp32 -lgcc -static -Os -std=gnu99" CACHE INTERNAL "C Compiler options") +set(CMAKE_ASM_FLAGS "-march=rv32imac_zicsr -mabi=ilp32 -lgcc -static -Os -std=gnu99" CACHE INTERNAL "C Compiler options") set(CMAKE_EXE_LINKER_FLAGS "-static -L ${CMAKE_BINARY_DIR}/lib -lmain -T ${LINKER_SCRIPT}" CACHE INTERNAL "Linker options") include_directories(include linker ${CMAKE_BINARY_DIR}/generated/fdl) @@ -78,7 +78,7 @@ add_dependencies(libmain fdl_headers) set(fdl_headers) file(GLOB_RECURSE fdl_files "${CMAKE_SOURCE_DIR}/fdl/*.fdl") fiddle_sources(fdl_headers "${fdl_files}") -add_custom_target( fdl_headers DEPENDS ${fdl_headers}) +add_custom_target(fdl_headers DEPENDS ${fdl_headers}) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/main.elf @@ -87,6 +87,7 @@ add_custom_command( COMMAND ${CMAKE_C_COMPILER} -nostartfiles -lgcc -static -L ${CMAKE_BINARY_DIR}/lib -T ${LINKER_SCRIPT} -o ${CMAKE_BINARY_DIR}/main.elf + -Xlinker -Map=${CMAKE_BINARY_DIR}/main.map -Wl,--no-whole-archive -Wl,--whole-archive ${CMAKE_BINARY_DIR}/lib/libmain.a -Wl,--no-whole-archive |