micro-ROS / micro-ROS/micro_ros_renesas_demos

Porting RA6T2 micro_ros library to RX26T

Open
#155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
8
Forks
8
PR merge metrics
No merged PRs in 30d

Description

## Issue template

- Hardware description:
- RTOS:
- Installation type:
- Version or commit hash:

#### Steps to reproduce the issue

I did following changes in library_generation.sh
1、change arm-none-eabi-gcc to rx-elf-gcc
in libmicroros.mk
1、change
X_CC := arm-none-eabi-gcc
X_CXX := arm-none-eabi-g++
into
X_CC := rx-elf-gcc
X_CXX := rx-elf-g++
#### Expected behavior
generate a microros library for RX26T

#### Actual behavior
build error
Extracting support files...
16:58:07 **** Incremental Build of configuration HardwareDebug for project MicroROS_RX26T2 ****
make -r --output-sync -j4 all
make --no-print-directory pre-build
cd ../micro_ros_renesas2estudio_component/library_generation && ./library_generation.sh "-Og -ffunction-sections -fdata-sections -fno-strict-aliasing -fdiagnostics-parseable-fixits -Wstack-usage=100 -g2 -misa=v3 -mlittle-endian-data"
Found CFLAGS:
-------------
-Og -ffunction-sections -fdata-sections -fno-strict-aliasing -fdiagnostics-parseable-fixits -Wstack-usage=100 -g2 -misa=v3 -mlittle-endian-data
-------------
Using:
-------------
/home/feng/.local/share/renesas/e2_studio/toolchains/gcc-14.2.0.202505-GNURX-ELF/gcc_14.2.0.202505_rx_elf/bin//rx-elf-gcc
Version: 14.2.0.202505-GNURX
-------------
~/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/extra_packages ~/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation
~/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation
rm -f /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/toolchain.cmake; \
mkdir -p /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros; \
cat /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/toolchain.cmake.in | \
sed "s/@CMAKE_C_COMPILER@/rx-elf-gcc/g" | \
sed "s/@CMAKE_CXX_COMPILER@/rx-elf-g++/g" | \
sed "s/@CFLAGS@/-Og -ffunction-sections -fdata-sections -fno-strict-aliasing -fdiagnostics-parseable-fixits -Wstack-usage=100 -g2 -misa=v3 -mlittle-endian-data -w -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='/g" | \
sed "s/@CXXFLAGS@/-Og -ffunction-sections -fdata-sections -fno-strict-aliasing -fdiagnostics-parseable-fixits -Wstack-usage=100 -g2 -misa=v3 -mlittle-endian-data -w -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='/g" \
> /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/toolchain.cmake
rm -rf /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/micro_ros_dev; \
mkdir /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/micro_ros_dev; cd /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/micro_ros_dev; \
git clone -b kilted https://github.com/ament/ament_cmake src/ament_cmake; \
git clone -b kilted https://github.com/ament/ament_lint src/ament_lint; \
git clone -b kilted https://github.com/ament/ament_package src/ament_package; \
git clone -b kilted https://github.com/ament/googletest src/googletest; \
git clone -b kilted https://github.com/ros2/ament_cmake_ros src/ament_cmake_ros; \
git clone -b kilted https://github.com/ament/ament_index src/ament_index; \
touch src/ament_cmake_ros/rmw_test_fixture_implementation/COLCON_IGNORE; \
colcon build --cmake-args -DBUILD_TESTING=OFF;
Starting >>> ament_package
Starting >>> ament_lint
Starting >>> gtest_vendor
Finished <<< gtest_vendor [0.50s]
Starting >>> gmock_vendor
Finished <<< gmock_vendor [0.13s]
Finished <<< ament_package [0.79s]
Starting >>> ament_cmake_core
Finished <<< ament_lint [0.79s]
Starting >>> ament_flake8
Finished <<< ament_cmake_core [0.36s]
Starting >>> ament_cmake_python
Starting >>> ament_cmake_libraries
Starting >>> ament_cmake_export_libraries
Finished <<< ament_flake8 [0.68s]
Starting >>> ament_pep257
Finished <<< ament_cmake_python [0.57s]
Starting >>> ament_cmake_test
Finished <<< ament_cmake_export_libraries [0.62s]
Starting >>> ament_cmake_include_directories
Finished <<< ament_cmake_libraries [0.65s]
Starting >>> ament_cmake_export_dependencies
Finished <<< ament_pep257 [0.76s]
Starting >>> ament_copyright
Finished <<< ament_cmake_export_dependencies [0.66s]
Starting >>> ament_cmake_export_definitions
Finished <<< ament_cmake_include_directories [0.74s]
Starting >>> ament_cmake_export_include_directories
Finished <<< ament_cmake_test [1.29s]
Starting >>> ament_cmake_gtest
Finished <<< ament_cmake_export_definitions [0.69s]
Starting >>> ament_cmake_export_link_flags
Finished <<< ament_copyright [0.93s]
Starting >>> ament_xmllint
Finished <<< ament_cmake_export_include_directories [1.04s]
Starting >>> ament_cmake_version
Finished <<< ament_cmake_gtest [0.85s]
Starting >>> ament_cmake_export_interfaces
Finished <<< ament_cmake_export_link_flags [0.77s]
Starting >>> ament_cmake_export_targets
Finished <<< ament_cmake_version [0.60s]
Starting >>> ament_cmake_target_dependencies
Finished <<< ament_xmllint [1.10s]
Starting >>> ament_lint_cmake
Finished <<< ament_cmake_export_interfaces [0.87s]
Starting >>> ament_pycodestyle
Finished <<< ament_cmake_export_targets [0.87s]
Starting >>> ament_cpplint
Finished <<< ament_cmake_target_dependencies [1.14s]
Starting >>> ament_cmake_gen_version_h
Finished <<< ament_lint_cmake [1.32s]
Starting >>> ament_cmake_lint_cmake
Finished <<< ament_pycodestyle [1.36s]
Starting >>> ament_cppcheck
Finished <<< ament_cpplint [1.77s]
Starting >>> ament_uncrustify
Finished <<< ament_cmake_lint_cmake [1.30s]
Starting >>> ament_cmake_copyright
Finished <<< ament_cmake_gen_version_h [1.62s]
Starting >>> ament_lint_auto
Finished <<< ament_cmake_copyright [0.70s]
Starting >>> ament_cmake_cpplint
Finished <<< ament_uncrustify [1.06s]
Starting >>> ament_cmake_flake8
Finished <<< ament_cppcheck [1.55s]
Starting >>> ament_cmake_cppcheck
Finished <<< ament_lint_auto [0.81s]
Starting >>> ament_cmake_pep257
Finished <<< ament_cmake_flake8 [0.69s]
Starting >>> ament_cmake_uncrustify
Finished <<< ament_cmake_pep257 [0.72s]
Starting >>> ament_cmake_xmllint
Finished <<< ament_cmake_cpplint [0.90s]
Starting >>> ament_cmake
Finished <<< ament_cmake_cppcheck [0.96s]
Starting >>> ament_cmake_gmock
Finished <<< ament_cmake_uncrustify [0.88s]
Starting >>> ament_mypy
Finished <<< ament_cmake [0.78s]
Starting >>> ament_cmake_pytest
Finished <<< ament_cmake_xmllint [1.16s]
Starting >>> ament_lint_common
Finished <<< ament_cmake_gmock [1.08s]
Starting >>> ament_clang_format
Finished <<< ament_cmake_pytest [1.00s]
Starting >>> ament_clang_tidy
Finished <<< ament_mypy [1.42s]
Starting >>> ament_pclint
Finished <<< ament_lint_common [1.04s]
Starting >>> ament_cmake_ros_core
Finished <<< ament_clang_format [1.27s]
Starting >>> ament_pyflakes
Finished <<< ament_clang_tidy [1.46s]
Starting >>> ament_cmake_google_benchmark
Finished <<< ament_cmake_ros_core [1.17s]
Starting >>> ament_cmake_vendor_package
Finished <<< ament_pclint [1.30s]
Starting >>> domain_coordinator
Finished <<< ament_pyflakes [1.49s]
Starting >>> ament_index_python
Finished <<< ament_cmake_vendor_package [1.13s]
Starting >>> ament_cmake_auto
Finished <<< ament_cmake_google_benchmark [1.39s]
Starting >>> ament_cmake_clang_format
Finished <<< domain_coordinator [1.56s]
Starting >>> ament_cmake_clang_tidy
Finished <<< ament_index_python [1.26s]
Starting >>> ament_cmake_mypy
Finished <<< ament_cmake_auto [1.10s]
Starting >>> ament_cmake_pclint
Finished <<< ament_cmake_clang_format [1.10s]
Starting >>> ament_cmake_pycodestyle
Finished <<< ament_cmake_mypy [0.82s]
Starting >>> ament_cmake_pyflakes
Finished <<< ament_cmake_clang_tidy [1.11s]
Starting >>> ament_index_cpp
Finished <<< ament_cmake_pclint [0.87s]
Starting >>> ament_cmake_ros
Finished <<< ament_cmake_pycodestyle [0.79s]
Starting >>> rmw_test_fixture
Finished <<< ament_cmake_pyflakes [1.09s]
Finished <<< ament_cmake_ros [0.89s]
Finished <<< rmw_test_fixture [0.95s]
Finished <<< ament_index_cpp [3.36s]

Summary: 62 packages finished [18.2s]
2 packages had stderr output: gmock_vendor gtest_vendor
rm -rf /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/micro_ros_src; \
mkdir /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/micro_ros_src; cd /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/micro_ros_src; \
git clone -b ros2 https://github.com/eProsima/micro-CDR src/micro-CDR; \
git clone -b ros2 https://github.com/eProsima/Micro-XRCE-DDS-Client src/Micro-XRCE-DDS-Client; \
git clone -b kilted https://github.com/micro-ROS/rcl src/rcl; \
git clone -b kilted https://github.com/ros2/rclc src/rclc; \
git clone -b kilted https://github.com/micro-ROS/rcutils src/rcutils; \
git clone -b kilted https://github.com/micro-ROS/micro_ros_msgs src/micro_ros_msgs; \
git clone -b kilted https://github.com/micro-ROS/rmw-microxrcedds src/rmw-microxrcedds; \
git clone -b kilted https://github.com/micro-ROS/rosidl_typesupport src/rosidl_typesupport; \
git clone -b kilted https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds; \
git clone -b kilted https://github.com/ros2/rosidl src/rosidl; \
Cloning into 'geometry2'...
make[2]: warning: -j1 forced in submake: resetting jobserver mode.
Cloning into 'src/ament_cmake'...
git clone -b kilted https://github.com/ros2/rosidl_dynamic_typesupport src/rosidl_dynamic_typesupport; \
git clone -b kilted https://github.com/ros2/rmw src/rmw; \
Cloning into 'src/ament_lint'...
Cloning into 'src/ament_package'...
Cloning into 'src/googletest'...
Cloning into 'src/ament_cmake_ros'...
Cloning into 'src/ament_index'...
--- stderr: gtest_vendor
CMake Warning:
Manually-specified variables were not used by the project:

BUILD_TESTING

---
--- stderr: gmock_vendor
git clone -b kilted https://github.com/ros2/rcl_interfaces src/rcl_interfaces; \
git clone -b kilted https://github.com/ros2/rosidl_defaults src/rosidl_defaults; \
CMake Warning:
Manually-specified variables were not used by the project:

BUILD_TESTING

---
Cloning into 'src/micro-CDR'...
Cloning into 'src/Micro-XRCE-DDS-Client'...
Cloning into 'src/rcl'...
Cloning into 'src/rclc'...
Cloning into 'src/rcutils'...
Cloning into 'src/micro_ros_msgs'...
Cloning into 'src/rmw-microxrcedds'...
Cloning into 'src/rosidl_typesupport'...
Cloning into 'src/rosidl_typesupport_microxrcedds'...
Cloning into 'src/rosidl'...
Cloning into 'src/rosidl_dynamic_typesupport'...
Cloning into 'src/rmw'...
Cloning into 'src/rcl_interfaces'...
Cloning into 'src/rosidl_defaults'...
Cloning into 'src/unique_identifier_msgs'...
Cloning into 'src/common_interfaces'...
Cloning into 'src/test_interface_files'...
Cloning into 'src/rmw_implementation'...
git clone -b kilted https://github.com/ros2/unique_identifier_msgs src/unique_identifier_msgs; \
git clone -b kilted https://github.com/ros2/common_interfaces src/common_interfaces; \
Cloning into 'src/rcl_logging'...
Cloning into 'src/ros2_tracing'...
Cloning into 'src/micro_ros_utilities'...
Cloning into 'src/example_interfaces'...
Cloning into 'src/rosidl_core'...
--- stderr: rcutils
git clone -b kilted https://github.com/ros2/test_interface_files src/test_interface_files; \
git clone -b kilted https://github.com/ros2/rmw_implementation src/rmw_implementation; \
git clone -b kilted https://github.com/ros2/rcl_logging src/rcl_logging; \
git clone -b kilted https://github.com/ros2/ros2_tracing src/ros2_tracing; \
git clone -b kilted https://github.com/micro-ROS/micro_ros_utilities src/micro_ros_utilities; \
git clone -b kilted https://github.com/ros2/example_interfaces src/example_interfaces; \
git clone -b kilted https://github.com/ros2/rosidl_core src/rosidl_core; \
touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \
touch src/ros2_tracing/test_tracetools/COLCON_IGNORE; \
touch src/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE; \
touch src/rclc/rclc_examples/COLCON_IGNORE; \
touch src/rcl/rcl_yaml_param_parser/COLCON_IGNORE; \
touch src/ros2_tracing/lttngpy/COLCON_IGNORE; \
cp -rf /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/extra_packages src/extra_packages || :;
cd /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/micro_ros_src; \
unset AMENT_PREFIX_PATH; \
unset RMW_IMPLEMENTATION; \
PATH=/home/feng/.local/share/renesas/e2_studio/toolchains/gcc-14.2.0.202505-GNURX-ELF/gcc_14.2.0.202505_rx_elf/bin/:/home/feng/.local/share/renesas/e2_studio/toolchains/gcc-14.2.0.202505-GNURX-ELF/gcc_14.2.0.202505_rx_elf/libexec/gcc/gcc_14.2.0.202505_rx_elf/:/home/feng/.local/share/renesas/e2_studio/eclipse/plugins/com.renesas.ide.exttools.gnumake.linux.x86_64_1.0.1.v20240909-0854/mk/:/home/feng/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin; \
. ../micro_ros_dev/install/local_setup.sh; \
colcon build \
--merge-install \
--packages-ignore-regex=.*_cpp \
--metas /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/colcon.meta /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../../app_colcon.meta \
--cmake-force-configure \
--cmake-clean-cache \
--cmake-args \
"--no-warn-unused-cli" \
--log-level=ERROR \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=OFF \
-DTHIRDPARTY=ON \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=/home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/toolchain.cmake \
-DCMAKE_VERBOSE_MAKEFILE=OFF;
Starting >>> rcutils
Starting >>> rosidl_cli
Starting >>> rosidl_typesupport_interface
Starting >>> microcdr
Finished <<< rosidl_cli [0.86s]
Starting >>> rosidl_adapter
Finished <<< rosidl_typesupport_interface [1.25s]
Starting >>> test_interface_files
Finished <<< test_interface_files [0.85s]
Starting >>> rmw_implementation_cmake
Finished <<< rosidl_adapter [1.80s]
Starting >>> rosidl_parser
Finished <<< rmw_implementation_cmake [0.79s]
Starting >>> tracetools
Finished <<< microcdr [4.03s]
Starting >>> microxrcedds_client
Finished <<< rosidl_parser [1.44s]
Starting >>> rosidl_pycommon
Aborted <<< tracetools [1.51s]
Aborted <<< rosidl_pycommon [0.30s]
Aborted <<< microxrcedds_client [0.39s]

Summary: 7 packages finished [4.81s]
1 package failed: rcutils
3 packages aborted: microxrcedds_client rosidl_pycommon tracetools
1 package had stderr output: rcutils
65 packages not processed

make --no-print-directory main-build
/home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/libmicroros/micro_ros_src/src/rcutils/src/time_unix.c: In function ‘rcutils_system_time_now’:
/home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/libmicroros/micro_ros_src/src/rcutils/src/time_unix.c:65:7: error: implicit declaration of function ‘clock_gettime’ [-Wimplicit-function-declaration]
65 | if (clock_gettime(CLOCK_REALTIME, ×pec_now) < 0) {
| ^~~~~~~~~~~~~
gmake[5]: *** [CMakeFiles/rcutils.dir/build.make:446: CMakeFiles/rcutils.dir/src/time_unix.c.obj] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:192: CMakeFiles/rcutils.dir/all] Error 2
gmake[3]: *** [Makefile:146: all] Error 2
---
Failed <<< rcutils [4.42s, exited with code 2]
make[2]: *** [libmicroros.mk:80: /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/micro_ros_src/install] Error 2
make[1]: [makefile:118: pre-build] Error 2 (ignored)
In file included from ../src/canfd_transport.c:1:
/home/feng/RoboticHandProject/MicroROS_RX26T2/src/microros_transports.h:4:10: fatal error: uxr/client/transport.h: No such file or directory
4 | #include
| ^~~~~~~~~~~~~~~~~~~~~~~~
Building file: ../src/canfd_transport.c
compilation terminated.
make[1]: *** [src/subdir.mk:41: src/canfd_transport.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Building file: ../src/microros_time.c
../src/microros_time.c:2:10: fatal error: r_agt.h: No such file or directory
2 | #include "r_agt.h"
| ^~~~~~~~~
Building file: ../src/microros_allocators.c
compilation terminated.
make[1]: *** [src/subdir.mk:41: src/microros_time.o] Error 1
In file included from ../src/microros_allocators.c:2:
/home/feng/RoboticHandProject/MicroROS_RX26T2/src/microros_allocators.h:6:10: fatal error: r_bsp_common.h: No such file or directory
6 | #include "r_bsp_common.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [src/subdir.mk:41: src/microros_allocators.o] Error 1
make: *** [makefile:94: all] Error 2
"make -r --output-sync -j4 all" terminated with exit code 2. Build might be incomplete.

16:59:39 Build Failed. 13 errors, 0 warnings. (took 1m:32s.311ms)

Image

#### Additional information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with library_generation.sh, libmicroros.mk, and toolchain.cmake.in, then rerun the library_generation.sh command shown in the report using the RX26T toolchain. Investigate the reported build failure and verify that the process completes and generates a micro-ROS library for RX26T.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake, shell
Domain
build-system, embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.