-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCMakeLists.txt
65 lines (54 loc) · 2.46 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project("WAV-LPDDR-SW" C ASM)
cmake_minimum_required(VERSION 3.13)
# Set the output folder where your program will be created
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Make sure everything is built for correct architecture
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
# Build configuration
include(${CMAKE_CURRENT_LIST_DIR}/CMake.in)
# Build versioning
set(VERSION_UPDATE_FROM_GIT TRUE)
find_package(BuildInfo REQUIRED)
add_compile_options(
-O2
-g
-Wall
-Wextra
-Werror
-Wno-unused-parameter
-fdata-sections
-ffunction-sections
-std=c11
)
endif()
################################################################################
## CONFIGURATIONS
################################################################################
# Set flag for skipping PLL calibration at boot
set(CONFIG_CALIBRATE_PLL true CACHE BOOL "Flag to indicate if PLL calibration is performed at boot.")
message("PLL CAL: ${CONFIG_CALIBRATE_PLL}")
# Set flag for skipping ZQCAL calibration at boot
set(CONFIG_CALIBRATE_ZQCAL true CACHE BOOL "Flag to indicate if ZQCAL calibration is performed at boot.")
message("ZQCAL CAL: ${CONFIG_CALIBRATE_ZQCAL}")
# Set flag for skipping Sense Amp calibration at boot
set(CONFIG_CALIBRATE_SA true CACHE BOOL "Flag to indicate if SA calibration is performed at boot.")
message("SA CAL: ${CONFIG_CALIBRATE_SA}")
# Set flag for skipping DRAM training at boot
set(CONFIG_DRAM_TRAIN false CACHE BOOL "Flag to indicate if DRAM training is performed at boot.")
message("DRAM_TRAIN: ${CONFIG_DRAM_TRAIN}")
# Set flag for performing periodic calibration
set(CONFIG_CAL_PERIODIC false CACHE BOOL "Flag to indicate if periodic calibraiton is performed.")
message("PERIODIC CAL: ${CONFIG_CAL_PERIODIC}")
################################################################################
## SOURCE DIRECTORIES
################################################################################/
# Build subdirectories
add_subdirectory(${WAV_RTOS_TOP_LEVEL})
add_subdirectory(drivers)
add_subdirectory(dev)
add_subdirectory(firmware)
add_subdirectory(app)