2026-04-19 17:28:44 -07:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
|
|
2026-04-30 23:14:17 -07:00
|
|
|
add_subdirectory(w6300)
|
2026-05-01 10:33:39 -07:00
|
|
|
add_subdirectory(debug_log)
|
2026-04-30 23:14:17 -07:00
|
|
|
|
2026-04-19 17:28:44 -07:00
|
|
|
add_library(limen STATIC
|
|
|
|
|
src/arp.cpp
|
|
|
|
|
src/dispatch.cpp
|
|
|
|
|
src/flash.cpp
|
|
|
|
|
src/handlers.cpp
|
|
|
|
|
src/icmp.cpp
|
|
|
|
|
src/igmp.cpp
|
|
|
|
|
src/ipv4.cpp
|
|
|
|
|
src/net.cpp
|
|
|
|
|
src/test_handlers.cpp
|
|
|
|
|
src/udp.cpp
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_include_directories(limen PUBLIC
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_compile_options(limen PRIVATE -Wall -Wextra -Wno-unused-parameter)
|
|
|
|
|
|
|
|
|
|
target_link_libraries(limen PUBLIC
|
2026-04-30 23:14:17 -07:00
|
|
|
w6300
|
2026-05-01 10:33:39 -07:00
|
|
|
debug_log
|
2026-04-19 17:28:44 -07:00
|
|
|
pico_stdlib
|
|
|
|
|
pico_sha256
|
|
|
|
|
pico_unique_id
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
# version, disable stdio. Callers still do pico_add_executable + link-libs.
|
|
|
|
|
function(limen_configure_executable target)
|
|
|
|
|
pico_enable_stdio_usb(${target} 0)
|
|
|
|
|
pico_enable_stdio_uart(${target} 0)
|
|
|
|
|
pico_set_binary_type(${target} copy_to_ram)
|
|
|
|
|
pico_hash_binary(${target})
|
|
|
|
|
pico_embed_pt_in_binary(${target} ${LIMEN_PARTITION_TABLE})
|
|
|
|
|
pico_add_extra_outputs(${target})
|
|
|
|
|
target_compile_options(${target} PRIVATE -Wall -Wextra -Wno-unused-parameter)
|
|
|
|
|
endfunction()
|