File tree 5 files changed +33
-3
lines changed
5 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 3
3
build
4
4
* .user
5
5
CMakeLists.txt.old
6
+ pico-sdk
Original file line number Diff line number Diff line change @@ -13,10 +13,19 @@ endif()
13
13
set (CMAKE_C_STANDARD 11)
14
14
set (CMAKE_CXX_STANDARD 17)
15
15
16
+ if (CMAKE_HOST_WIN32 )
17
+ set (SIMPLE_FS_BUILDER_EXE ${CMAKE_CURRENT_SOURCE_DIR} /../tools/SimpleFSBuilder/SimpleFSBuilder.exe)
18
+ else ()
19
+ set (SIMPLE_FS_BUILDER_EXE ${CMAKE_CURRENT_SOURCE_DIR} /../tools/SimpleFSBuilder/build /SimpleFSBuilder)
20
+ endif ()
21
+
22
+ if (NOT EXISTS ${SIMPLE_FS_BUILDER_EXE} )
23
+ message (FATAL_ERROR "Missing ${SIMPLE_FS_BUILDER_EXE} . Please build it before building this project." )
24
+ endif ()
16
25
17
26
function (add_resource_folder target name path )
18
27
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /${name} .fs ${CMAKE_CURRENT_BINARY_DIR} /__rerun_${name} .fs
19
- COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /../tools/SimpleFSBuilder/SimpleFSBuilder
28
+ COMMAND ${SIMPLE_FS_BUILDER_EXE}
20
29
ARGS ${path} ${CMAKE_CURRENT_BINARY_DIR} /${name} .fs
21
30
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
22
31
COMMENT "Generating ${name} .fs" )
@@ -61,6 +70,11 @@ target_link_libraries(PicoHTTPServer
61
70
pico_cyw43_arch_lwip_sys_freertos
62
71
pico_stdlib
63
72
pico_lwip_iperf
64
- FreeRTOS-Kernel-Heap4
65
- Profiler)
73
+ FreeRTOS-Kernel-Heap4)
74
+
75
+ if (TARGET Profiler)
76
+ target_link_libraries (PicoHTTPServer
77
+ Profiler)
78
+ endif ()
79
+
66
80
pico_add_extra_outputs(PicoHTTPServer)
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ mkdir -p tools/SimpleFSBuilder/build
3
+ mkdir -p tools/PicoHTTPServer/build
4
+ cmake -S tools/SimpleFSBuilder -B tools/SimpleFSBuilder/build
5
+ make -C tools/SimpleFSBuilder/build || exit 1
6
+
7
+ test -d pico-sdk || git clone --recursive https://github.com/raspberrypi/pico-sdk
8
+ test -d pico-sdk/FreeRTOS || git clone --recursive https://github.com/FreeRTOS/FreeRTOS-Kernel pico-sdk/FreeRTOS
9
+ grep -e ip4_secondary_ip_address pico-sdk/lib/lwip/src/core/ipv4/ip4.c || patch -p1 -d pico-sdk/lib/lwip < lwip_patch/lwip.patch || (echo " Failed to apply patch" && exit 1)
10
+
11
+
12
+ cmake -S PicoHTTPServer -B PicoHTTPServer/build -DPICO_SDK_PATH=` pwd` /pico-sdk -DPICO_GCC_TRIPLE=arm-none-eabi -DPICO_BOARD=pico_w -DWIFI_SSID=" PicoHTTP" -DWIFI_PASSWORD=" "
13
+ make -C PicoHTTPServer/build || exit 1
Original file line number Diff line number Diff line change 4
4
cmake_minimum_required (VERSION 2.7)
5
5
project (SimpleFSBuilder)
6
6
add_executable (SimpleFSBuilder SimpleFSBuilder.cpp)
7
+ set_property (TARGET SimpleFSBuilder PROPERTY CXX_STANDARD 17)
7
8
target_link_libraries (SimpleFSBuilder -static -static -libgcc -static -libstdc++)
Original file line number Diff line number Diff line change 7
7
#include < memory.h>
8
8
#include < string.h>
9
9
#include < map>
10
+ #include < vector>
10
11
#include " SimpleFS.h"
11
12
12
13
using namespace std ;
You can’t perform that action at this time.
0 commit comments