move w6300/dispatch/net stack to limen submodule
This commit is contained in:
@@ -9,48 +9,20 @@ set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
pico_sdk_init()
|
||||
|
||||
set(LIB_SOURCES
|
||||
lib/arp.cpp
|
||||
lib/dispatch.cpp
|
||||
lib/flash.cpp
|
||||
lib/handlers.cpp
|
||||
lib/icmp.cpp
|
||||
lib/igmp.cpp
|
||||
lib/ipv4.cpp
|
||||
lib/net.cpp
|
||||
lib/udp.cpp
|
||||
w6300/w6300.cpp
|
||||
)
|
||||
add_subdirectory(limen)
|
||||
|
||||
set(LIB_DEPS pico_stdlib pico_sha256 pico_unique_id hardware_pio hardware_spi hardware_dma hardware_clocks)
|
||||
|
||||
add_executable(picomap firmware.cpp ${LIB_SOURCES})
|
||||
target_include_directories(picomap PRIVATE include w6300)
|
||||
target_compile_options(picomap PRIVATE -Wall -Wextra -Wno-unused-parameter)
|
||||
pico_generate_pio_header(picomap ${CMAKE_CURRENT_LIST_DIR}/w6300/qspi.pio)
|
||||
pico_enable_stdio_usb(picomap 0)
|
||||
pico_enable_stdio_uart(picomap 0)
|
||||
pico_set_binary_type(picomap copy_to_ram)
|
||||
string(TIMESTAMP BUILD_EPOCH "%s" UTC)
|
||||
math(EXPR VERSION_MAJOR "${BUILD_EPOCH} >> 16")
|
||||
math(EXPR VERSION_MINOR "${BUILD_EPOCH} & 65535")
|
||||
|
||||
add_executable(picomap firmware.cpp)
|
||||
target_link_libraries(picomap PRIVATE limen)
|
||||
pico_set_binary_version(picomap MAJOR ${VERSION_MAJOR} MINOR ${VERSION_MINOR})
|
||||
target_compile_definitions(picomap PRIVATE BUILD_EPOCH=${BUILD_EPOCH})
|
||||
pico_hash_binary(picomap)
|
||||
pico_embed_pt_in_binary(picomap ${CMAKE_CURRENT_LIST_DIR}/partition_table.json)
|
||||
pico_add_extra_outputs(picomap)
|
||||
target_link_libraries(picomap ${LIB_DEPS})
|
||||
limen_configure_executable(picomap)
|
||||
|
||||
add_executable(picomap_test test.cpp lib/test_handlers.cpp ${LIB_SOURCES})
|
||||
target_include_directories(picomap_test PRIVATE include w6300)
|
||||
target_compile_options(picomap_test PRIVATE -Wall -Wextra -Wno-unused-parameter)
|
||||
pico_generate_pio_header(picomap_test ${CMAKE_CURRENT_LIST_DIR}/w6300/qspi.pio)
|
||||
pico_enable_stdio_usb(picomap_test 0)
|
||||
pico_enable_stdio_uart(picomap_test 0)
|
||||
pico_set_binary_type(picomap_test copy_to_ram)
|
||||
add_executable(picomap_test test.cpp)
|
||||
target_link_libraries(picomap_test PRIVATE limen)
|
||||
pico_set_binary_version(picomap_test MAJOR ${VERSION_MAJOR} MINOR ${VERSION_MINOR})
|
||||
target_compile_definitions(picomap_test PRIVATE BUILD_EPOCH=${BUILD_EPOCH})
|
||||
pico_hash_binary(picomap_test)
|
||||
pico_embed_pt_in_binary(picomap_test ${CMAKE_CURRENT_LIST_DIR}/partition_table.json)
|
||||
pico_add_extra_outputs(picomap_test)
|
||||
target_link_libraries(picomap_test ${LIB_DEPS})
|
||||
limen_configure_executable(picomap_test)
|
||||
|
||||
Reference in New Issue
Block a user