micro-ROS / micro_ros_setup

Support macros for building micro-ROS-based firmware.
Apache License 2.0
376 stars 137 forks source link

How to specify an override for the default serial port used for flashing firmware via flash_firmware.sh? #450

Open alikureishy opened 2 years ago

alikureishy commented 2 years ago

Issue template

Steps to reproduce the issue

Running ros2 run micro_ros_setup flash_firmware.sh defaults to the first available USB serial port. However, if I have a few MCUs connected -- say USB0, USB1, USB2 -- and I only want to flash the one connected to USB1, how would I go about doing this?

Expected behavior

flash_firmware.sh should offer an option (eg, --dev /dev/ttyUSB1) to flash to a particular port

Actual behavior

No such option exists. flash_firmware.sh flashes to the first available USB port

Additional information

pablogs9 commented 2 years ago

Hello @safdark, micro_ros_setup has those kinds of limitations because it is just a set of functionalities for getting started with micro-ROS.

If you have a patch or a solution it would be great if you open a pull request with those changes in order to allow selecting the flashing port.

If not, I strongly recommend using micro-ROS component for ESP-IDF to integrate micro-ROS in your ESP32 project.