fixes dhrystone compile options
This commit is contained in:
@@ -2,12 +2,21 @@ cmake_minimum_required(VERSION 3.21)
|
|||||||
project(dhrystone C)
|
project(dhrystone C)
|
||||||
set(TARGET dhrystone)
|
set(TARGET dhrystone)
|
||||||
|
|
||||||
set(ITERATIONS 50000)
|
set(ITERATIONS 50000 CACHE STRING "")
|
||||||
|
set(FREQ 100e6 CACHE STRING "")
|
||||||
|
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE -O3)
|
||||||
|
|
||||||
add_executable(${TARGET} dhry_1.c dhry_2.c dhry_stubs.c)
|
add_executable(${TARGET} dhry_1.c dhry_2.c dhry_stubs.c)
|
||||||
target_include_directories(${TARGET} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
target_include_directories(${TARGET} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
||||||
target_compile_options(${TARGET} PRIVATE -fno-inline -fno-builtin-printf -fno-common -Wno-implicit -funroll-loops -fpeel-loops -fgcse-sm -fgcse-las)
|
target_compile_options(${TARGET} PRIVATE
|
||||||
target_compile_definitions(${TARGET} PRIVATE ITERATIONS=${ITERATIONS} HZ=32768 TIME NO_INIT)
|
-Wno-implicit -fno-builtin-printf
|
||||||
|
-finline -fno-common -funroll-loops -fpeel-loops
|
||||||
|
-finline-functions -finline-limit=1000
|
||||||
|
-fgcse-sm -fgcse-las
|
||||||
|
-falign-functions=16 -falign-jumps=4 -falign-loops=4
|
||||||
|
-freorder-blocks-and-partition -fno-if-conversion2 -fno-crossjumping)
|
||||||
|
target_compile_definitions(${TARGET} PRIVATE ITERATIONS=${ITERATIONS} HZ=${FREQ} TIME NO_INIT)
|
||||||
|
|
||||||
set(BOARD "iss" CACHE STRING "Target board")
|
set(BOARD "iss" CACHE STRING "Target board")
|
||||||
add_subdirectory(../../bare-metal-bsp bsp)
|
add_subdirectory(../../bare-metal-bsp bsp)
|
||||||
@@ -17,3 +26,4 @@ target_link_options(${TARGET} PRIVATE LINKER:-Map=${TARGET}.map -Wl,--wrap=scanf
|
|||||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||||
COMMAND ${CMAKE_OBJDUMP} -S ${TARGET}.elf > ${TARGET}.dis
|
COMMAND ${CMAKE_OBJDUMP} -S ${TARGET}.elf > ${TARGET}.dis
|
||||||
COMMENT "Creating disassembly for ${TARGET}")
|
COMMENT "Creating disassembly for ${TARGET}")
|
||||||
|
#[I] [ 6.005415 ms] tb : tohost send 'Dhrystones per Second: 219735.7 '
|
Reference in New Issue
Block a user