Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

Is platform.txt patch needed for Arduino Zero? #1144

Closed
madgrizzle opened this issue Aug 16, 2022 · 3 comments
Closed

Is platform.txt patch needed for Arduino Zero? #1144

madgrizzle opened this issue Aug 16, 2022 · 3 comments

Comments

@madgrizzle
Copy link

madgrizzle commented Aug 16, 2022

Issue template

  • Hardware description: Arduino Zero
  • RTOS: Arduino
  • Installation type: Arduino 1.8.19 IDE (Windows), micro-ros-agent (built from source and tried docker) on Ubuntu 20.04
  • Version or commit hash: galactic

The Issue

I am able to compile and upload the simple publisher example to the Arduino zero, however, when I plug it into the ubuntu machine running ROS2 galactic, the micro-ros-agent sits there at init and never connects (I added a blinky LED to the error section and I can see the zero eventually errors out). Compiling and uploading the exact same code to a teensy 4.0 from the same IDE and then plugged into the same ubuntu machine works fine (connects right away).

The Question

When I setup the Arduino IDE initially and installed the SAMD board files for the Arduino Zero, it grabbed the latest version and it successfully compiled and uploaded the code without having to patch the platform.txt file. Does this file need to be patched for the Arduino Zero (or at all if it compiles without it)? I assumed it was just for compilation, but I went ahead and tried it and upon doing so got errors during compilation. The patch file is for 1.6.12 and isn't compatible with the latest board files so I had to edit it to find g++. After that, I kept getting messages about not being able to find samd.h (iirc). I then tried downgrading the board file to 1.6.12 to match and then patched the platform.txt file but then got message about not being able to find sam.h (iirc). I'm not sure if I'm heading down a rabbit hole with this platform.txt file. Is it just for compilation?

@Acuadros95
Copy link
Contributor

Acuadros95 commented Aug 17, 2022

You should not modify your SAMD platform.txt. The platform.txt patch is used to included support for pre-compiled libraries on SAM (Arduino Due), check arduino/ArduinoCore-sam#115 and #34.

As for the communication, check that you are using the correct serial port. micro-ROS uses the regular Serial as the default output port: detail.

@madgrizzle
Copy link
Author

madgrizzle commented Aug 17, 2022

Thanks for the response. I was confused about the platform.txt because it says SAMD but the folder was sam, maybe some nuance I'm missing..

### Patch SAMD

As for serial port.. you are correct. I'll close this :)

@Acuadros95
Copy link
Contributor

Indeed, fixing that section here #1146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants