split w6300 into its own static library to enforce layer isolation
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
add_subdirectory(w6300)
|
||||
|
||||
add_library(limen STATIC
|
||||
src/arp.cpp
|
||||
src/dispatch.cpp
|
||||
@@ -11,28 +13,21 @@ add_library(limen STATIC
|
||||
src/net.cpp
|
||||
src/test_handlers.cpp
|
||||
src/udp.cpp
|
||||
w6300/w6300.cpp
|
||||
)
|
||||
|
||||
target_include_directories(limen PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/w6300
|
||||
)
|
||||
|
||||
target_compile_options(limen PRIVATE -Wall -Wextra -Wno-unused-parameter)
|
||||
|
||||
target_link_libraries(limen PUBLIC
|
||||
w6300
|
||||
pico_stdlib
|
||||
pico_sha256
|
||||
pico_unique_id
|
||||
hardware_pio
|
||||
hardware_spi
|
||||
hardware_dma
|
||||
hardware_clocks
|
||||
)
|
||||
|
||||
pico_generate_pio_header(limen ${CMAKE_CURRENT_SOURCE_DIR}/w6300/qspi.pio)
|
||||
|
||||
set(LIMEN_PARTITION_TABLE ${CMAKE_CURRENT_SOURCE_DIR}/partition_table.json CACHE INTERNAL "")
|
||||
|
||||
# Apply per-executable limen setup: pt embed, binary hash, extras, copy-to-ram,
|
||||
|
||||
15
w6300/CMakeLists.txt
Normal file
15
w6300/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
add_library(w6300 STATIC w6300.cpp)
|
||||
|
||||
target_include_directories(w6300 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_compile_options(w6300 PRIVATE -Wall -Wextra -Wno-unused-parameter)
|
||||
|
||||
target_link_libraries(w6300 PUBLIC
|
||||
pico_stdlib
|
||||
hardware_pio
|
||||
hardware_spi
|
||||
hardware_dma
|
||||
hardware_clocks
|
||||
)
|
||||
|
||||
pico_generate_pio_header(w6300 ${CMAKE_CURRENT_SOURCE_DIR}/qspi.pio)
|
||||
Reference in New Issue
Block a user