11cmake_minimum_required (VERSION 3.13 )
22
33# Pull in Pico and FreeRTOS
4- include ($ENV{PICO_SDK_PATH} /external/pico_sdk_import.cmake )
4+ include (pico_sdk_import.cmake )
5+ include (pico_extras_import_optional.cmake )
56#include($ENV{FREERTOS_KERNEL_PATH}/portable/ThirdParty/GCC/RP2040/FreeRTOS_Kernel_import.cmake)
67
78
89if (PICO_SDK_VERSION_STRING VERSION_LESS "1.3.0" )
910 message (FATAL_ERROR "Raspberry Pi Pico SDK version 1.3.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING} " )
1011endif ()
1112
12- project (wolf_pico_examples)
13+ project (wolf_pico_examples C CXX ASM )
1314set (CMAKE_C_STANDARD 11)
1415set (CMAKE_CXX_STANDARD 17)
1516
@@ -30,6 +31,8 @@ include_directories(config)
3031include_directories (include )
3132include_directories (${PICO_SDK_PATH} /src/rp2_common/pico_lwip/include )
3233include_directories (${PICO_SDK_PATH} /lib/lwip/contrib/ports/freertos/include )
34+ include_directories (${PICO_SDK_PATH} /lib/lwip/src/include )
35+ include_directories (${PICO_SDK_PATH} /src/rp2_common/pico_async_context/include )
3336
3437add_subdirectory (wolfssl )
3538target_link_libraries (wolfssl PRIVATE
@@ -54,3 +57,54 @@ target_link_libraries(benchmark
5457 #FreeRTOS-Kernel-Heap4 # FreeRTOS kernel and dynamic heap
5558)
5659pico_add_extra_outputs (benchmark )
60+
61+ if (1)
62+ add_executable (TCPclient
63+ src/blink.c
64+ # src/TCPclient.c
65+ src/TCPclient_main.c
66+ )
67+
68+ # enable usb output, disable uart output
69+ pico_enable_stdio_usb (TCPclient 1 )
70+ pico_enable_stdio_uart (TCPclient 0 )
71+
72+ target_compile_definitions (TCPclient PRIVATE
73+
74+ # CYW43_NETUTILS
75+ # PICO_CYW43_ARCH_FREERTOS
76+ TEST_TCP_SERVER_IP= "192.168.11.28"
77+ PICO_CYW43_ARCH_POLL
78+ NO_SYS=1
79+
80+ # SYS_LIGHTWEIGHT_PROT=1
81+ )
82+
83+ target_link_libraries (TCPclient
84+ pico_stdlib
85+ pico_rand
86+
87+ # pico_cyw43_arch_lwip_sys_freertos
88+ # pico_cyw43_arch_lwip_poll
89+ # pico_cyw43_arch_none
90+
91+ pico_lwip
92+ # pico_lwip_core4
93+ # pico_lwip_core6
94+ pico_cyw43_arch
95+ pico_lwip_nosys
96+ pico_async_context_poll
97+ # pico_lwip_iperf
98+
99+ # pico_lwip_freertos
100+ # pico_async_context_freertos
101+ # pico_lwip_port
102+ # pico_cyw43_driver
103+ # pico_lwip_api
104+ pico_lwip_netif
105+ # FreeRTOS-Kernel
106+ # FreeRTOS-Kernel-Heap4 # FreeRTOS kernel and dynamic heap
107+ )
108+
109+ pico_add_extra_outputs (TCPclient )
110+ endif ()
0 commit comments