2023-12-09 04:21:06 +08:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
include(pico-sdk/pico_sdk_init.cmake)
|
|
|
|
|
|
|
|
project(firmware)
|
|
|
|
pico_sdk_init()
|
|
|
|
|
|
|
|
add_executable(firmware
|
|
|
|
main.c
|
|
|
|
usb_descriptors.c
|
|
|
|
mongoose.c
|
|
|
|
net.c
|
|
|
|
pico-sdk/lib/tinyusb/lib/networking/rndis_reports.c)
|
|
|
|
|
|
|
|
target_include_directories(firmware PUBLIC
|
|
|
|
.
|
|
|
|
pico-sdk/lib/tinyusb/lib/networking)
|
|
|
|
|
|
|
|
target_link_libraries(firmware pico_stdlib hardware_spi tinyusb_device)
|
|
|
|
pico_add_extra_outputs(firmware) # create map/bin/hex file etc.
|
|
|
|
|
|
|
|
pico_enable_stdio_usb(firmware 0) # Route stdio
|
|
|
|
pico_enable_stdio_uart(firmware 1) # to the UART
|
|
|
|
|
|
|
|
# Mongoose build flags
|
|
|
|
add_definitions(-DMG_ENABLE_TCPIP=1)
|
2024-03-13 01:03:29 +08:00
|
|
|
add_definitions(-DMG_ENABLE_TCPIP_DRIVER_INIT=0)
|
2024-01-23 01:48:01 +08:00
|
|
|
add_definitions(-DMG_ENABLE_POSIX_FS=0)
|
2023-12-09 04:21:06 +08:00
|
|
|
|
|
|
|
# Example build options
|