Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
idf_target: [esp32, esp32s2, esp32s3, esp32c3, esp32c6]
idf_version: [v5.2, v5.3, v5.4, v5.5]
idf_version: [v5.2, v5.3, v5.4, v5.5, v6.0]

container:
image: "espressif/idf:release-${{ matrix.idf_version }}"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# micro-ROS component for ESP-IDF

This component has been tested in ESP-IDF v5.2, v5.3, v5.4, and v5.5 with ESP32, ESP32-S2, ESP32-S3, ESP32-C3 and ESP32-C6.
This component has been tested in ESP-IDF v5.2, v5.3, v5.4, v5.5, and v6.0 with ESP32, ESP32-S2, ESP32-S3, ESP32-C3 and ESP32-C6.

## Dependencies

Expand Down Expand Up @@ -67,7 +67,7 @@ docker run -it --rm --net=host microros/micro-ros-agent:rolling udp4 --port 8888
It's possible to build this example application using the official Espressif [docker images](https://hub.docker.com/r/espressif/idf), following the same steps:

```bash
docker run --name micro-ros-espidf-component -it espressif/idf:release-v5.5 bash
docker run --name micro-ros-espidf-component -it espressif/idf:release-v6.0 bash

git clone -b rolling https://github.com/micro-ROS/micro_ros_espidf_component.git
cd micro_ros_espidf_component/
Expand Down
15 changes: 12 additions & 3 deletions esp32_toolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ else()
set(FLAGS "-mlongcalls -ffunction-sections -fdata-sections" CACHE STRING "" FORCE)
endif()

include("@BUILD_CONFIG_DIR@/sdkconfig.cmake" OPTIONAL)
if(CONFIG_LIBC_PICOLIBC)
set(FLAGS "${FLAGS} --specs=picolibc.specs" CACHE STRING "" FORCE)
endif()

set(CMAKE_CROSSCOMPILING 1)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(PLATFORM_NAME "LwIP")
Expand All @@ -26,10 +31,14 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_C_COMPILER @CMAKE_C_COMPILER@)
set(CMAKE_CXX_COMPILER @CMAKE_CXX_COMPILER@)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAGS} ${IDF_INCLUDES}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti ${FLAGS} ${IDF_INCLUDES}")
if(NOT MICROROS_TOOLCHAIN_FLAGS_APPLIED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAGS} ${IDF_INCLUDES}" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti ${FLAGS} ${IDF_INCLUDES}" CACHE STRING "" FORCE)
set(MICROROS_TOOLCHAIN_FLAGS_APPLIED TRUE CACHE INTERNAL "micro-ROS toolchain flags were applied")
endif()

add_compile_definitions(ESP_PLATFORM LWIP_IPV4 LWIP_IPV6 PLATFORM_NAME_FREERTOS)
# Keep `__STDC_WANT_LIB_EXT1__=1` until micro-ROS/rcutils includes ros2/rcutils#555.
add_compile_definitions(ESP_PLATFORM LWIP_IPV4 LWIP_IPV6 PLATFORM_NAME_FREERTOS __STDC_WANT_LIB_EXT1__=1)

include_directories(
"@BUILD_CONFIG_DIR@"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp_tinyusb: "^1.4.4"
espressif/usb:
version: "*"
rules:
- if: "idf_version >=6.0.0"
## Required IDF version
idf:
version: ">=5.0"
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp_tinyusb: "^1.4.4"
espressif/usb:
version: "*"
rules:
- if: "idf_version >=6.0.0"
## Required IDF version
idf:
version: ">=5.0"
4 changes: 4 additions & 0 deletions network_interfaces/uros_wlan_netif.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ static void wifi_init_sta(void)
},
};
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config) );
#else
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
#endif
ESP_ERROR_CHECK(esp_wifi_start() );

ESP_LOGI(TAG, "wifi_init_sta finished.");
Expand Down
Loading