stm32_serDes_protobuf_project/bsp/CMakeLists.txt
2024-05-13 15:02:23 +03:00

45 lines
1.3 KiB
CMake

set(LWIP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lwip/src)
set(LWIP_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/lwip/src/include)
set(LWIP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/lwip/src/core)
add_library(bsp STATIC
bsp.c
ring_buffer.c
stm32f4xx_it.c
lwip/lwip.c
lwip/ethernetif.c
lwip/stm32f4xx_hal_eth.c
${LWIP_SOURCE_DIR}/api/err.c
${LWIP_SOURCE_DIR}/core/def.c
${LWIP_SOURCE_DIR}/core/init.c
${LWIP_SOURCE_DIR}/core/ip.c
${LWIP_SOURCE_DIR}/core/mem.c
${LWIP_SOURCE_DIR}/core/memp.c
${LWIP_SOURCE_DIR}/core/netif.c
${LWIP_SOURCE_DIR}/core/pbuf.c
${LWIP_SOURCE_DIR}/core/timeouts.c
${LWIP_SOURCE_DIR}/core/udp.c
${LWIP_SOURCE_DIR}/core/ipv4/dhcp.c
${LWIP_SOURCE_DIR}/core/ipv4/etharp.c
${LWIP_SOURCE_DIR}/core/ipv4/icmp.c
${LWIP_SOURCE_DIR}/core/ipv4/ip4.c
${LWIP_SOURCE_DIR}/core/ipv4/ip4_addr.c
${LWIP_SOURCE_DIR}/core/ipv4/ip4_frag.c
${LWIP_SOURCE_DIR}/netif/ethernet.c
)
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
)
target_link_libraries(bsp PUBLIC
stm32f4xx
)
target_compile_definitions(bsp PUBLIC STM32F439xx)