File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ else()
1515 set (FLAGS "-mlongcalls -ffunction-sections -fdata-sections" CACHE STRING "" FORCE )
1616endif ()
1717
18+ include ("@BUILD_CONFIG_DIR@/sdkconfig.cmake" OPTIONAL )
19+ if (CONFIG_LIBC_PICOLIBC)
20+ set (FLAGS "${FLAGS} --specs=picolibc.specs" CACHE STRING "" FORCE )
21+ endif ()
22+
1823set (CMAKE_CROSSCOMPILING 1)
1924set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
2025set (PLATFORM_NAME "LwIP" )
@@ -26,10 +31,11 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
2631set (CMAKE_C_COMPILER @CMAKE_C_COMPILER @)
2732set (CMAKE_CXX_COMPILER @CMAKE_CXX_COMPILER @)
2833
29- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS } ${ FLAGS} ${IDF_INCLUDES} " )
30- set (CMAKE_CXX_FLAGS "${ CMAKE_CXX_FLAGS } -fno-exceptions -fno-rtti ${FLAGS} ${IDF_INCLUDES} " )
34+ set (CMAKE_C_FLAGS "${FLAGS} ${IDF_INCLUDES} " CACHE STRING "" FORCE )
35+ set (CMAKE_CXX_FLAGS "-fno-exceptions -fno-rtti ${FLAGS} ${IDF_INCLUDES} " CACHE STRING "" FORCE )
3136
32- add_compile_definitions (ESP_PLATFORM LWIP_IPV4 LWIP_IPV6 PLATFORM_NAME_FREERTOS )
37+ # Workaround for https://github.com/ros2/rcutils/issues/552
38+ add_compile_definitions (ESP_PLATFORM LWIP_IPV4 LWIP_IPV6 PLATFORM_NAME_FREERTOS __STDC_WANT_LIB_EXT1__=1 )
3339
3440include_directories (
3541 "@BUILD_CONFIG_DIR@"
Original file line number Diff line number Diff line change @@ -85,7 +85,11 @@ static void wifi_init_sta(void)
8585 },
8686 };
8787 ESP_ERROR_CHECK (esp_wifi_set_mode (WIFI_MODE_STA ) );
88+ #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL (6 , 0 , 0 )
89+ ESP_ERROR_CHECK (esp_wifi_set_config (WIFI_IF_STA , & wifi_config ) );
90+ #else
8891 ESP_ERROR_CHECK (esp_wifi_set_config (ESP_IF_WIFI_STA , & wifi_config ) );
92+ #endif
8993 ESP_ERROR_CHECK (esp_wifi_start () );
9094
9195 ESP_LOGI (TAG , "wifi_init_sta finished." );
You can’t perform that action at this time.
0 commit comments