2023-01-03 03:49:15 +08:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
include(pico-sdk/pico_sdk_init.cmake)
|
|
|
|
|
2023-01-21 21:42:25 +08:00
|
|
|
project(firmware)
|
2023-01-03 03:49:15 +08:00
|
|
|
pico_sdk_init()
|
|
|
|
|
|
|
|
add_executable(firmware
|
2023-01-21 21:42:25 +08:00
|
|
|
main.c
|
2023-02-08 23:00:48 +08:00
|
|
|
msc_disk.c
|
|
|
|
usb_descriptors.c
|
2023-03-01 05:18:26 +08:00
|
|
|
mongoose.c
|
|
|
|
net.c
|
|
|
|
packed_fs.c
|
2023-01-21 21:42:25 +08:00
|
|
|
pico-sdk/lib/tinyusb/lib/networking/rndis_reports.c)
|
2023-01-03 03:49:15 +08:00
|
|
|
|
|
|
|
target_include_directories(firmware PUBLIC
|
2023-01-21 21:42:25 +08:00
|
|
|
.
|
|
|
|
pico-sdk/lib/tinyusb/lib/networking)
|
2023-01-03 03:49:15 +08:00
|
|
|
|
2023-01-21 21:42:25 +08:00
|
|
|
target_link_libraries(firmware pico_stdlib hardware_spi tinyusb_device)
|
2023-03-01 05:18:26 +08:00
|
|
|
pico_add_extra_outputs(firmware) # create map/bin/hex file etc.
|
2023-01-03 03:49:15 +08:00
|
|
|
|
2023-01-21 21:42:25 +08:00
|
|
|
pico_enable_stdio_usb(firmware 0) # Route stdio
|
|
|
|
pico_enable_stdio_uart(firmware 1) # to the UART
|
2023-01-03 03:49:15 +08:00
|
|
|
|
2023-01-21 21:42:25 +08:00
|
|
|
# Mongoose build flags
|
2023-02-08 05:16:42 +08:00
|
|
|
add_definitions(-DMG_ENABLE_TCPIP=1)
|
2023-01-21 21:42:25 +08:00
|
|
|
add_definitions(-DMG_ENABLE_PACKED_FS=1)
|
|
|
|
add_definitions(-DMG_ENABLE_FILE=0)
|
|
|
|
add_definitions(-DDISABLE_ROUTING=1)
|
2023-02-08 23:00:48 +08:00
|
|
|
|
2023-05-30 05:38:49 +08:00
|
|
|
# Example build options
|
|
|
|
add_definitions(-DHTTP_URL="http://0.0.0.0/")
|
|
|
|
|
2023-02-08 23:00:48 +08:00
|
|
|
# Extra build flags (enable if needed)
|
|
|
|
add_definitions(-DDUAL_CONFIG=0)
|