-
Notifications
You must be signed in to change notification settings - Fork 1
/
sdk.cmake
74 lines (64 loc) · 4.24 KB
/
sdk.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
add_lib_files(${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/drivers/*.c)
set(fsl_bsp_drivers_files ${LIB_FILES})
set(LIB_FILES "" CACHE STRING "Lib Files" FORCE)
add_lib_files(${CMAKE_CURRENT_SOURCE_DIR}/variants/${BOARD}/xip/*.c)
set(fsl_xip_drivers_files ${LIB_FILES})
set(LIB_FILES "" CACHE STRING "Lib Files" FORCE)
add_library(fsl_xip_drivers STATIC ${fsl_xip_drivers_files})
target_include_directories(fsl_xip_drivers PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/CMSIS/Include
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/drivers
${CMAKE_CURRENT_SOURCE_DIR}/cores/arduino
)
add_lib_files(${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/*.c)
set(fsl_usb_drivers_files ${LIB_FILES})
set(LIB_FILES "" CACHE STRING "Lib Files" FORCE)
add_library(fsl_usb_drivers STATIC ${fsl_usb_drivers_files})
target_include_directories(fsl_usb_drivers PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/CMSIS/Include
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/drivers
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/include
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/osa
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/device
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/phy
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/host
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/utilities/debug_console
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/components/serial_manager
${CMAKE_CURRENT_SOURCE_DIR}/cores/arduino/USB
${CMAKE_CURRENT_SOURCE_DIR}/cores/arduino
)
add_library(fsl_bsp STATIC ${fsl_bsp_drivers_files}
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/system_MIMXRT1052.c
)
target_include_directories(fsl_bsp PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/CMSIS/Include
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/drivers
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/xip
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/utilities/str
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/utilities/debug_console
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/components/uart
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/components/serial_manager
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/components/lists
)
add_lib_files(${CMAKE_CURRENT_SOURCE_DIR}/cores/*.c)
add_lib_files(${CMAKE_CURRENT_SOURCE_DIR}/cores/*.cpp)
set(arduinocore_files ${LIB_FILES})
set(LIB_FILES "" CACHE STRING "Lib Files" FORCE)
add_library(arduinocore STATIC ${arduinocore_files})
target_include_directories(arduinocore PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/CMSIS/Include
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/drivers
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/include
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/osa
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/device
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/phy
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/middleware/usb/host
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/devices/MIMXRT1052/utilities/debug_console
${CMAKE_CURRENT_SOURCE_DIR}/tools/sdk/components/serial_manager
${CMAKE_CURRENT_SOURCE_DIR}/cores/arduino/USB
${CMAKE_CURRENT_SOURCE_DIR}/cores/arduino
)