添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account
$ sudo apt install gcc-arm-none-eabi
$ arm-none-eabi-nm -C --defined-only -g cortex-m3/libmicroros.a | grep __ctype_ptr__
$ # Indeed, there is no output of __ctype_ptr__

Additional information

I notice that the gcc version being used to generate libmicroros.a is 5.4, which is a little outdated.

This could cause the error undefined reference to __ctype_ptr__ if someone uses a newer version of gcc.

https://stackoverflow.com/questions/54940410/gnu-toolchain-newlib-compatibility-between-toolchain-versions-undefined-symb

Hello,

As you can see on the lib generation script, we use the same compiler version as the Arduino IDE for each board.

Your board is not currently supported by the library generator, but you can modify the script to use your own gcc version:

Clone this repo and modify this line to: export TOOLCHAIN_PREFIX=/toolchain/bin/arm-none-eabi-
micro_ros_arduino/extras/library_generation/library_generation.sh Line 88 94cb206

Set the local path of the desired compiler:
export GCC_PATH=/local_path/gcc-arm-none-eabi-10-2020-q4-major (Use your own local path)

Call the docker generator from the repo folder:
docker run -it --rm -v ${GCC_PATH}:/toolchain -v $(pwd):/project --env MICROROS_LIBRARY_FOLDER=extras microros/micro_ros_static_library_builder:foxy -p cortex_m3

The generated library should be on src/cortex-m3/libmicroros.a:

~/workspace/micro_ros_arduino$ strings src/cortex-m3/libmicroros.a | grep "GCC: ("
$ GCC: (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
          

Thanks for your help. Now both ROS1 (rosserial) and ROS2 (micro_ros) works on RT-Thread (RTOS).

https://github.com/wuhanstudio/micro_ros

ROS1 (rosserial):