-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (31 loc) · 1.2 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
# Set minimum required version of CMake
cmake_minimum_required(VERSION 3.12)
# Include build functions from Pico SDK
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pico_sdk_import.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/FreeRTOS_Kernel_import.cmake)
project(ethernet C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Creates a pico-sdk subdirectory in our project for the libraries
pico_sdk_init()
add_subdirectory(enc28j60)
add_subdirectory(hal)
add_compile_definitions(ENC_DEBUG_OFF=1 NO_SYS=0)
add_executable(${PROJECT_NAME}
main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/app/enc_os_lwip_glue.cpp
${CMAKE_CURRENT_SOURCE_DIR}/app/hooks.c
)
# Create map/bin/hex/uf2 files
pico_add_extra_outputs(${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} PUBLIC
pico_stdlib hardware_spi hardware_irq hal enc28j60_driver pico_lwip pico_lwip_contrib_freertos
FreeRTOS-Kernel-Heap4
)
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/app
${CMAKE_CURRENT_SOURCE_DIR}/FreeRTOS_port
)
# disable usb output, disable uart output
pico_enable_stdio_usb(${PROJECT_NAME} 0)
pico_enable_stdio_uart(${PROJECT_NAME} 0)