@小鱼 我根据这篇CSDN的步骤添加Adafruit BusIO依赖库
lib_deps =
https://gitee.com/ohhuo/micro_ros_platformio.git
adafruit/Adafruit SSD1306@^2.5.7
adafruit/Adafruit BusIO@^1.14.1```
删除.pio/libdeps/featheresp32/micro_ros_platformio/libmicroros文件夹
不是pio/libdeps/featheresp32/micro_ros_platformio文件夹,这样文件会在重新编译后重新生成该文件
重新编译出现下面问题
Processing featheresp32 (platform: espressif32; board: featheresp32; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/featheresp32.html
PLATFORM: Espressif 32 (5.2.0) > Adafruit ESP32 Feather
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20005.220925 (2.0.5)
- tool-esptoolpy @ 1.40201.0 (4.2.1)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Installing pyyaml with pip at PlatformIO environment
/home/xhy/.platformio/penv/bin/python -m pip install pyyaml
Requirement already satisfied: pyyaml in /home/xhy/.platformio/penv/lib/python3.10/site-packages (6.0)
[notice] A new release of pip is available: 23.0 -> 23.0.1
[notice] To update, run: pip install --upgrade pip
Installing markupsafe==2.0.1 with pip at PlatformIO environment
/home/xhy/.platformio/penv/bin/python -m pip install markupsafe==2.0.1
Requirement already satisfied: markupsafe==2.0.1 in /home/xhy/.platformio/penv/lib/python3.10/site-packages (2.0.1)
[notice] A new release of pip is available: 23.0 -> 23.0.1
[notice] To update, run: pip install --upgrade pip
Configuring featheresp32 with transport serial
Downloading micro-ROS dev dependencies
- Downloaded ament_cmake
- Downloaded ament_lint
- Downloaded ament_package
- Downloaded googletest
- Downloaded ament_cmake_ros
- Downloaded ament_index
Building micro-ROS dev dependencies
Downloading micro-ROS library
- Downloaded microcdr
- Downloaded microxrcedds_client
- Downloaded rcl
- Downloaded rcl_yaml_param_parser (ignored)
- Downloaded rcl_lifecycle
- Downloaded rcl_action
- Downloaded rclc
- Downloaded rclc_parameter
- Downloaded rclc_examples (ignored)
- Downloaded rclc_lifecycle
- Downloaded micro_ros_utilities
- Downloaded rcutils
- Downloaded micro_ros_msgs
- Downloaded rmw_microxrcedds
- Downloaded rosidl_typesupport_cpp (ignored)
- Downloaded rosidl_typesupport_c
- Downloaded rosidl_typesupport_microxrcedds_cpp_tests
- Downloaded rosidl_typesupport_microxrcedds_test_msg
- Downloaded rosidl_typesupport_microxrcedds_c_tests
- Downloaded rosidl_typesupport_microxrcedds_cpp (ignored)
- Downloaded rosidl_typesupport_microxrcedds_c
- Downloaded rosidl_parser
- Downloaded rosidl_generator_cpp (ignored)
- Downloaded rosidl_cmake
- Downloaded rosidl_generator_c
- Downloaded rosidl_adapter
- Downloaded rosidl_typesupport_introspection_cpp (ignored)
- Downloaded rosidl_runtime_c
- Downloaded rosidl_typesupport_introspection_c
- Downloaded rosidl_typesupport_interface
- Downloaded rosidl_typesupport_introspection_tests
- Downloaded rosidl_cli
- Downloaded rosidl_runtime_cpp (ignored)
- Downloaded rmw_implementation_cmake
- Downloaded rmw
- Downloaded rcl_interfaces
- Downloaded action_msgs
- Downloaded test_msgs
- Downloaded lifecycle_msgs
- Downloaded rosgraph_msgs
- Downloaded builtin_interfaces
- Downloaded composition_interfaces
- Downloaded statistics_msgs
- Downloaded rosidl_default_generators
- Downloaded rosidl_default_runtime
- Downloaded unique_identifier_msgs
- Downloaded std_msgs
- Downloaded std_srvs
- Downloaded diagnostic_msgs
- Downloaded actionlib_msgs
- Downloaded nav_msgs
- Downloaded sensor_msgs_py
- Downloaded sensor_msgs
- Downloaded shape_msgs
- Downloaded trajectory_msgs
- Downloaded stereo_msgs
- Downloaded common_interfaces
- Downloaded visualization_msgs
- Downloaded geometry_msgs
- Downloaded test_interface_files
- Downloaded rmw_implementation
- Downloaded test_rmw_implementation
- Downloaded rcl_logging_interface
- Downloaded rcl_logging_noop
- Downloaded rcl_logging_spdlog (ignored)
- Downloaded tracetools_trace
- Downloaded test_tracetools
- Downloaded test_tracetools_launch
- Downloaded tracetools
- Downloaded tracetools_launch
- Downloaded tracetools_test
- Downloaded tracetools_read
- Downloaded ros2trace
- Downloaded example_interfaces
Checking extra packages
- Adding fishbot_interfaces
Checking extra packages
- Adding fishbot_interfaces
Building micro-ROS library
Build mcu micro-ROS environment failed:
--- stderr: rosidl_typesupport_interface
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_POSITION_INDEPENDENT_CODE
THIRDPARTY
---
--- stderr: rosidl_cli
/home/xhy/.platformio/penv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
---
--- stderr: rmw_implementation_cmake
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_POSITION_INDEPENDENT_CODE
THIRDPARTY
---
--- stderr: microcdr
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_TESTING
THIRDPARTY
---
--- stderr: rosidl_adapter
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_POSITION_INDEPENDENT_CODE
THIRDPARTY
---
--- stderr: tracetools
CMake Warning:
Manually-specified variables were not used by the project:
THIRDPARTY
---
--- stderr: rcutils
CMake Warning:
Manually-specified variables were not used by the project:
ENABLE_TESTING
THIRDPARTY
In function 'rcutils_char_array_strncat',
inlined from 'rcutils_char_array_strcat' at /home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/char_array.c:239:10:
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/char_array.c:224:3: warning: 'strncat' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncat(char_array->buffer, src, n);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/char_array.c: In function 'rcutils_char_array_strcat':
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/char_array.c:239:10: note: length computed here
return rcutils_char_array_strncat(char_array, src, strlen(src));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/error_handling.c: In function 'rcutils_get_error_string':
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/error_handling.c:240:38: warning: initializer-string for array of chars is too long
return (rcutils_error_string_t) {"error not set"}; // NOLINT(readability/braces)
^~~~~~~~~~~~~~~
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/error_handling.c:240:38: note: (near initialization for '(anonymous).str')
In file included from /home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/error_handling.c:35:
At top level:
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/./error_handling_helpers.h:109:1: warning: '__rcutils_convert_uint64_t_into_c_str' defined but not used [-Wunused-function]
__rcutils_convert_uint64_t_into_c_str(uint64_t number, char * buffer, size_t buffer_size)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/./error_handling_helpers.h:91:1: warning: '__rcutils_reverse_str' defined but not used [-Wunused-function]
__rcutils_reverse_str(char * string_in, size_t string_len)
^~~~~~~~~~~~~~~~~~~~~
---
--- stderr: rosidl_parser
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_POSITION_INDEPENDENT_CODE
THIRDPARTY
---
--- stderr: tracetools_trace
/home/xhy/.platformio/penv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
---
--- stderr: rosidl_cmake
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_POSITION_INDEPENDENT_CODE
THIRDPARTY
---
--- stderr: rosidl_runtime_c
CMake Warning at /home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
CMakeLists.txt:15 (find_package)
CMake Warning:
Manually-specified variables were not used by the project:
THIRDPARTY
---
--- stderr: rcl_logging_interface
CMake Warning at /home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
CMakeLists.txt:19 (find_package)
CMake Warning:
Manually-specified variables were not used by the project:
THIRDPARTY
---
--- stderr: microxrcedds_client
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_TESTING
THIRDPARTY
---
--- stderr: test_interface_files
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_POSITION_INDEPENDENT_CODE
THIRDPARTY
---
--- stderr: rcl_logging_noop
CMake Warning at /home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcl_logging_interface/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcl_logging_interface/cmake/rcl_logging_interfaceConfig.cmake:41 (include)
CMakeLists.txt:15 (find_package)
CMake Warning:
Manually-specified variables were not used by the project:
THIRDPARTY
---
--- stderr: rosidl_typesupport_introspection_c
CMake Warning:
Manually-specified variables were not used by the project:
THIRDPARTY
---
--- stderr: rosidl_generator_c
CMake Warning:
Manually-specified variables were not used by the project:
THIRDPARTY
---
--- stderr: rmw
CMake Warning at /home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
/home/xhy/Documents/PlatformIO/Projects/oled_interface/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
CMakeLists.txt:21 (find_package)
CMake Warning:
Manually-specified variables were not used by the project:
THIRDPARTY
---
--- stderr: tracetools_launch
/home/xhy/.platformio/penv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
---
--- stderr: tracetools_read
/home/xhy/.platformio/penv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
---
--- stderr: fishbot_interfaces
CMake Error at CMakeLists.txt:26 (find_package):
By not providing "Findrosidl_default_generators.cmake" in CMAKE_MODULE_PATH
this project has asked CMake to find a package configuration file provided
by "rosidl_default_generators", but CMake did not find one.
Could not find a package configuration file provided by
"rosidl_default_generators" with any of the following names:
rosidl_default_generatorsConfig.cmake
rosidl_default_generators-config.cmake
Add the installation prefix of "rosidl_default_generators" to
CMAKE_PREFIX_PATH or set "rosidl_default_generators_DIR" to a directory
containing one of the above files. If "rosidl_default_generators" provides
a separate development package or SDK, be sure it has been installed.
---
Failed <<< fishbot_interfaces [3.79s, exited with code 1]
=========================================================================== [FAILED] Took 271.51 seconds ===========================================================================
* 终端进程“platformio 'run'”已终止,退出代码: 1。
* 终端将被任务重用,按任意键关闭。