--good
This commit is contained in:
@@ -121,6 +121,29 @@ else()
|
||||
endif()
|
||||
set(ENV{COMPILE_OPTIONS} "${COMPILE_OPTIONS}")
|
||||
set(ENV{COMPILE_DEF} "${COMPILE_DEF}")
|
||||
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
message(STATUS "Maximum optimization for speed")
|
||||
add_definitions(-DWATCHDOG_IWDG)
|
||||
if (BOOT)
|
||||
add_compile_options(-Os -g)
|
||||
else()
|
||||
add_compile_options(-Ofast -g)
|
||||
endif()
|
||||
|
||||
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||
message(STATUS "Maximum optimization for speed, debug info included")
|
||||
add_compile_options(-Ofast -g)
|
||||
|
||||
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
|
||||
message(STATUS "Maximum optimization for size")
|
||||
add_compile_options(-Os)
|
||||
else ()
|
||||
message(STATUS "Minimal optimization, debug info included")
|
||||
add_definitions(-DWATCHDOG_IWDG)
|
||||
add_compile_options(-Os -g)
|
||||
endif ()
|
||||
|
||||
if (BOOT)
|
||||
set (ENV{HAL_DRIVER_CONFIG} ${CMAKE_CURRENT_SOURCE_DIR}/Boot/Core/Inc/stm32g0xx_hal_conf.h)
|
||||
FUNC_CREATE_MEMORY_MAP("${MEM_MAP_FILE}" "128" "8" "4" )
|
||||
|
||||
Reference in New Issue
Block a user