Closed henriksod closed 1 year ago
Hello @henriksod I see that you have a solution, could you open a PR with a proposal for fixing this issue?
Hi! Maybe I am confusing things here. The solution I mention is not related to micro_ros_arduino. The solution is what causes me to have issues with micro_ros_arduino.
I had two issues:
I have added some clarifying information in the topic.
Update:
So I ran the following command strings src/cortex-m3/libmicroros.a | grep "GCC: ("
and got this:
GCC: (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
Seems like it is the correct gcc version was used after all. Maybe the error messages I got from running the docker container were misleading.
I will try to use this static library and come back.
Update 2:
I moved the generated static library file to a fresh 2.0.7-humble
under src/cortex-m3/libmicroros.a
and zipped the repo before installing the library again using the steps mentioned above.
Compiling the arduino sketch towards Arduino DUE from an aarch64 host now works! :rocket:
Issue template
Steps to reproduce the issue
I want to compile an arduino sketch using micro_ros_arduino for Arduino DUE on a aarch64 host system (rpi 4 model B). The SAM board gcc toolchain is very old and is not officially supported on aarch64 systems by arduino. The solution is to compile using a later version (
arm-none-eabi-gcc-7-2017q4
) of arm-none-eabi-gcc https://github.com/arduino/arduino-cli/issues/1339--> I need to update micro_ros_arduino to compile using
arm-none-eabi-gcc-7-2017q4
when targettingcortex_m3
. I am following the steps mentioned here: https://github.com/micro-ROS/micro_ros_arduino/issues/315On a x86_64 linux machine:
arduino-cli core update-index --additional-urls https://per1234.github.io/ArduinoCore-sam/package_per1234_samarm64_index.json
export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS=https://per1234.github.io/ArduinoCore-sam/package_per1234_samarm64_index.json
arduino-cli core install per1234:sam
git clone -b 2.0.7-humble https://github.com/micro-ROS/micro_ros_arduino.git && cd micro_ros_arduino
sed -i 's/4_8-2014q1/7-2017q4/g' extras/library_generation/library_generation.sh
export ARDUINO_PATH=[Your Arduino path]
docker run -it --rm -v $ARDUINO_PATH/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4:/toolchain -v $(pwd):/project --env MICROROS_LIBRARY_FOLDER=extras microros/micro_ros_static_library_builder:humble -p cortex_m3
Expected behavior
Should be able to compile
micro_ros_arduino-2.0.7-humble
usingarm-none-eabi-gcc-7-2017q4
.Actual behavior