2024-04-30 13:10:11 +03:00
|
|
|
set(LWIP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lwip)
|
|
|
|
set(LWIP_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/lwip/src/include)
|
|
|
|
set(LWIP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/lwip/src/core)
|
2024-04-08 14:21:04 +03:00
|
|
|
|
2024-04-30 13:10:11 +03:00
|
|
|
# file(GLOB_RECURSE LWIP_SOURCES
|
|
|
|
# ${LWIP_SOURCE_DIR}/src/core/*.c
|
|
|
|
# ${LWIP_SOURCE_DIR}/src/netif/*.c
|
|
|
|
# )
|
2024-04-08 14:21:04 +03:00
|
|
|
|
2024-04-30 13:10:11 +03:00
|
|
|
add_library(bsp STATIC
|
2024-04-08 14:21:04 +03:00
|
|
|
bsp.c
|
2024-04-30 13:10:11 +03:00
|
|
|
# syscalls.c
|
|
|
|
# lwip/lwip.c
|
|
|
|
# ${LWIP_SOURCES}/init.c
|
2024-04-11 21:53:16 +03:00
|
|
|
# ${LWIP_SOURCES}
|
2024-04-08 14:21:04 +03:00
|
|
|
)
|
|
|
|
|
2024-04-30 13:10:11 +03:00
|
|
|
target_include_directories(bsp PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
# ${CMAKE_SOURCE_DIR}/bsp/lwip
|
|
|
|
# ${CMAKE_SOURCE_DIR}/bsp/lwip/system
|
|
|
|
# ${LWIP_INCLUDES}
|
|
|
|
# ${LWIP_INCLUDES}/lwip
|
|
|
|
# ${LWIP_INCLUDES}/netif
|
2024-04-08 14:21:04 +03:00
|
|
|
)
|
|
|
|
|
2024-04-30 13:10:11 +03:00
|
|
|
target_link_libraries(bsp PUBLIC
|
|
|
|
stm32f4xx
|
2024-04-08 14:21:04 +03:00
|
|
|
)
|
|
|
|
|
2024-04-30 13:10:11 +03:00
|
|
|
target_compile_definitions(bsp PUBLIC STM32F439xx)
|