-
Notifications
You must be signed in to change notification settings - Fork 25
/
config_zephyr_imx8mp_ca53.cmake
45 lines (34 loc) · 1.48 KB
/
config_zephyr_imx8mp_ca53.cmake
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
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/local_config_${TARGET}.cmake)
include(local_config_${TARGET}.cmake)
endif()
if(NOT CMAKE_TOOLCHAIN_FILE)
message(FATAL_ERROR "No toolchain specified, make sure the correct one is selected")
else()
message(STATUS "Toolchain: ${CMAKE_TOOLCHAIN_FILE}")
endif()
set(TARGET_OS rtos)
set(TARGET_ARCH armv8a)
if(NOT DEFINED MCUX_SDK)
message(WARNING "Undefined MCUX_SDK")
endif()
if(NOT DEFINED RTOS_DIR)
message(WARNING "Undefined RTOS_DIR")
endif()
if(NOT DEFINED RTOS_APPS)
message(WARNING "Undefined RTOS_APPS, default used")
endif()
if(NOT DEFINED RTOS_ABSTRACTION_LAYER_DIR)
message(WARNING "Undefined RTOS_ABSTRACTION_LAYER_DIR")
endif()
set(APP_GENAVB_SDK_INCLUDE ${AppPath}/common/boards/evkmimx8mp)
set(MCUX_SDK_DEVICE_DIRS ${MCUX_SDK}/devices/MIMX8ML8 ${MCUX_SDK}/devices/MIMX8ML8/drivers)
set(MCUX_SDK_TARGET_DIRS ${MCUX_SDK}/CMSIS/Core_AArch64/Include ${MCUX_SDK}/drivers/cache/armv8-a)
set(MCUX_SDK_DRIVERS_DIRS ${MCUX_SDK}/drivers ${MCUX_SDK}/drivers/common ${MCUX_SDK}/drivers/enet_qos ${MCUX_SDK}/drivers/gpt)
set(INCLUDE_DIR ${RTOS_DIR}/include)
# Include the zephyr toolchain definitions early in source files
add_compile_options("-DCONFIG_ARM64=1")
add_compile_options(-isystem "${ZEPHYR_BASE}/include")
# "SHELL" prefix to prevent de-duplication feature
add_compile_options(SHELL:-include "${ZEPHYR_BASE}/include/zephyr/toolchain.h")
add_compile_options(-O2 -Wall -g -Werror -Wpointer-arith -std=c99)
add_compile_options(-march=armv8-a)