Skip to content

Support for Arduino Uno R4 #1461

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

Closed
james-yoo opened this issue Jul 18, 2023 · 16 comments
Closed

Support for Arduino Uno R4 #1461

james-yoo opened this issue Jul 18, 2023 · 16 comments

Comments

@james-yoo
Copy link

Are there any plans to support a new Arduino UNO R4 (Renesas RA4M1 Arm® Cortex®-M4)?

@pablogs9
Copy link
Member

Hello, there is no plan for integrating Arduino UNO R4, but it is easy to integrate new platforms in this repo, and community contributions are very welcomed.

@patrickwasp
Copy link

hi @pablogs9 can you point me to any documentation for integrating new platforms? Thanks

@pablogs9
Copy link
Member

Hello, there is no official documentation for making new ports, but you can see some PR that have integrated new platforms:

In general, you will need to:

  • Determine which compiler (version specific) uses Arduino for the target platform
  • If not available in the building docker, add it here and PR changes.
  • Update the library_generation.sh script to use the compiler to build the micro-ROS static library and put it in the correct folder
  • Update CI to test your changes

In general, this is not a trivial process, but handling it with care should be possible to do it.


IMPORTANT

It is very important to check if one of the already precompiled libraries actually works for the platform.

For example, R4 uses a Cortex-M4 and we already have a precompiled Cortex-M4 library: https://github.com/micro-ROS/micro_ros_arduino/tree/iron/src/cortex-m4

Have you check if adding it as supported plaftorm it works out of the box?

@gbr1
Copy link
Contributor

gbr1 commented Mar 21, 2024

Hi! I have just checked this issue. I made a PR to get Arduino UNO R4 working over USB

@gbr1
Copy link
Contributor

gbr1 commented Nov 14, 2024

Now it is supported 😃

@james-yoo
Copy link
Author

Love it

@anhdong2194
Copy link

anhdong2194 commented Dec 7, 2024

Now it is supported 😃

First of all, thank you very much for supporting micro_ros on the Arduino Uno R4. I have tested Micro-ROS on the Arduino UNO R4 WiFi, but it was unsuccessful. I tried uploading the example of a publisher node, and while it could build and load successfully,But it automatically jumps into the error loop about a minute later. Could you please help me check this?

@hippo5329
Copy link

@anhdong2194 It might be time out on micro-ros connection. You can try reset R4 and start the micro-ros agent immediately.

@anhdong2194
Copy link

@anhdong2194 It might be time out on micro-ros connection. You can try reset R4 and start the micro-ros agent immediately.

Thank you for your response. Yes, I tried resetting, but the result remains the same. I have tested with both Docker and micro_ros_agent built from source. Additionally, when debugging, I noticed that changing the baud rate from 115200 to 921600 ( change at "default_transport.cpp" ) causes the error_loop to hang at the publish node creation function. Below are the screenshots for baud rates 115200 and 921600.
github
image

@gbr1
Copy link
Contributor

gbr1 commented Dec 7, 2024

About wifi, just to be sure, did you run the agent with wifi? Did you write the right IP address in your sketch?

@hippo5329
Copy link

The Uno R4 main cpu core is 48MHz, and very limited 256 kB Flash, 32 kB RAM. I would not suggest this board. You should use pico, which has more resources for robotics.

@anhdong2194
Copy link

About wifi, just to be sure, did you run the agent with wifi? Did you write the right IP address in your sketch?

Yes, I also tried using WiFi, but it couldn't connect. After some time, it timed out, and the LED started blinking (entered the error_loop)
image
image
image

@gbr1
Copy link
Contributor

gbr1 commented Jan 3, 2025

@anhdong2194 the IP into your sketch must be the one of your PC not the one of the Arduino board

@WinetheLe
Copy link

@gbr1, hi, I'm having the same problem with Anhdong2194 when I'm trying to test the code. After troubleshooting, it seems the problem lies with the first initialisation. I placed a serial.print function between the RCCcheck and this one seems to have lead to it:

Image

the serial stoped at the 0 and afterward the LED starts blinking so I think this might be it. though I'm inspecting the code to see what went wrong, as of right now I also dont know what's the cause.

@gbr1
Copy link
Contributor

gbr1 commented Feb 26, 2025

@WinetheLe , you are right. I'm investingating on what could be. It seems to happen on USB, too. So probably it is something on how is managed the bytestream.

@sdaerasd
Copy link

How to configure Micro-ROS on Arduino UNO R4 WiFi?

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

8 participants