2023-01-02 16:24:27 +00:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
include(pico-sdk/pico_sdk_init.cmake)
|
|
|
|
|
2023-01-21 01:36:25 +00:00
|
|
|
project(firmware)
|
2023-01-02 16:24:27 +00:00
|
|
|
pico_sdk_init()
|
2024-02-14 11:38:42 +00:00
|
|
|
add_executable(firmware main.c mongoose.c net.c packed_fs.c)
|
|
|
|
target_include_directories(firmware PUBLIC .)
|
2023-01-29 22:39:01 +00:00
|
|
|
|
2023-12-06 09:10:46 +00:00
|
|
|
target_link_libraries(firmware pico_stdlib hardware_spi pico_rand)
|
2023-02-28 18:18:26 -03:00
|
|
|
pico_add_extra_outputs(firmware) # create map/bin/hex file etc.
|
2023-01-02 16:24:27 +00:00
|
|
|
|
2023-12-10 12:17:54 +00:00
|
|
|
pico_enable_stdio_usb(firmware 0) # Route stdio
|
|
|
|
pico_enable_stdio_uart(firmware 1) # to the UART, for remote testing
|
2023-01-02 16:24:27 +00:00
|
|
|
|
|
|
|
# Mongoose build flags
|
2023-02-07 21:16:42 +00:00
|
|
|
add_definitions(-DMG_ENABLE_TCPIP=1)
|
2024-03-12 14:03:29 -03:00
|
|
|
add_definitions(-DMG_ENABLE_DRIVER_W5500=1)
|
2023-01-21 01:36:25 +00:00
|
|
|
add_definitions(-DMG_ENABLE_PACKED_FS=1)
|
2023-02-14 15:03:52 +00:00
|
|
|
add_definitions(-DMG_ENABLE_CUSTOM_RANDOM=1)
|
2024-01-22 14:48:01 -03:00
|
|
|
add_definitions(-DMG_ENABLE_POSIX_FS=0)
|
2023-05-29 18:38:49 -03:00
|
|
|
|
|
|
|
# Example build options
|
|
|
|
add_definitions(-DHTTP_URL="http://0.0.0.0/")
|
|
|
|
add_definitions(-DHTTPS_URL="https://0.0.0.0/")
|