2023-01-04 01:14:54 +08:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
include(pico-sdk/pico_sdk_init.cmake)
|
|
|
|
|
2023-03-01 05:18:26 +08:00
|
|
|
project(firmware)
|
2023-01-04 01:14:54 +08:00
|
|
|
pico_sdk_init()
|
|
|
|
|
|
|
|
add_executable(firmware
|
2023-03-01 05:18:26 +08:00
|
|
|
driver_rp2040_rmii.c
|
|
|
|
main.c
|
|
|
|
mongoose.c)
|
2023-01-04 01:14:54 +08:00
|
|
|
|
2023-02-01 02:34:15 +08:00
|
|
|
target_include_directories(firmware PUBLIC
|
2023-03-01 05:18:26 +08:00
|
|
|
.)
|
2023-01-04 01:14:54 +08:00
|
|
|
|
|
|
|
target_link_libraries(firmware hardware_pio hardware_dma pico_stdlib)
|
2023-03-01 05:18:26 +08:00
|
|
|
pico_add_extra_outputs(firmware) # create map/bin/hex file etc.
|
|
|
|
|
|
|
|
pico_enable_stdio_usb(firmware 1) # Route stdio
|
|
|
|
pico_enable_stdio_uart(firmware 0) # to USB
|
|
|
|
|
|
|
|
# Mongoose build flags
|
|
|
|
add_definitions(-DMG_ENABLE_TCPIP=1)
|
|
|
|
add_definitions(-DMG_ENABLE_PACKED_FS=1)
|