Skip to content

Commit 6c321d9

Browse files
How to use Micro-ROS with PlatformIO (#617) (#619)
* added support for STM32F4 and Ethernet * Revert library changes Signed-off-by: Pablo Garrido <[email protected]> * added info about using Micro-ROS with PlatformIO * prefity the README * Minor mods Signed-off-by: Pablo Garrido <[email protected]> * Add table of contents Signed-off-by: Pablo Garrido <[email protected]> Co-authored-by: Pablo Garrido <[email protected]> (cherry picked from commit bfe1696) # Conflicts: # README.md Co-authored-by: Dominik Nowak <[email protected]>
1 parent b4b2242 commit 6c321d9

File tree

1 file changed

+54
-6
lines changed

1 file changed

+54
-6
lines changed

README.md

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ This is a micro-ROS library for baremetal projects based on Arduino IDE or Ardui
44

55
As the build process for ROS 2 and micro-ROS is based on custom meta-build system tools and CMake, this library is provided as a precompiled library. Anyways, users can rebuild its own precompiled libraries in order to modify micro-ROS parameters, for example customizing prebuild meta file.
66

7+
- [micro-ROS for Arduino](#micro-ros-for-arduino)
8+
- [Supported boards](#supported-boards)
9+
- [How to use the precompiled library](#how-to-use-the-precompiled-library)
10+
- [Arduino IDE](#arduino-ide)
11+
- [PlatformIO](#platformio)
12+
- [How to build the precompiled library](#how-to-build-the-precompiled-library)
13+
- [Patch Arduino board for support precompiled libraries](#patch-arduino-board-for-support-precompiled-libraries)
14+
- [Patch Teensyduino](#patch-teensyduino)
15+
- [Patch SAMD](#patch-samd)
16+
- [Purpose of the Project](#purpose-of-the-project)
17+
- [License](#license)
18+
- [Known Issues/Limitations](#known-issueslimitations)
19+
20+
## Supported boards
21+
722
Supported boards are:
823

924
| Board | Min version | State | Details | Prebuild meta |
@@ -19,29 +34,62 @@ Supported boards are:
1934

2035
Community contributed boards are:
2136

22-
| Board | Min version | Contributor | Details | Prebuild meta |
23-
| -------------------------------------------------------------- | ----------- | ---------------------------------------------- | ------- | ------------------------ |
24-
| [Arduino Due](https://store.arduino.cc/arduino-due) | - | [@lukicdarkoo](https://github.com/lukicdarkoo) | | `colcon_verylowmem.meta` |
25-
| [Arduino Zero](https://store.arduino.cc/arduino-zero) | - | [@lukicdarkoo](https://github.com/lukicdarkoo) | | `colcon_verylowmem.meta` |
26-
| [Kakute F7](http://www.holybro.com/product/kakute-f7-aio-v1-5/) | - | [@amfern](https://github.com/amfern) | | `colcon.meta` |
37+
| Board | Min version | Contributor | Details | Prebuild meta |
38+
| ---------------------------------------------------------------------------------------- | ----------- | ---------------------------------------------- | ------- | ------------------------ |
39+
| [Arduino Due](https://store.arduino.cc/arduino-due) | - | [@lukicdarkoo](https://github.com/lukicdarkoo) | | `colcon_verylowmem.meta` |
40+
| [Arduino Zero](https://store.arduino.cc/arduino-zero) | - | [@lukicdarkoo](https://github.com/lukicdarkoo) | | `colcon_verylowmem.meta` |
41+
| [Kakute F7](http://www.holybro.com/product/kakute-f7-aio-v1-5/) | - | [@amfern](https://github.com/amfern) | | `colcon.meta` |
42+
| [STM32-E407](https://www.olimex.com/Products/ARM/ST/STM32-E407/resources/STM32-E407.pdf) | - | [@dominikn](https://github.com/dominikn) | | `colcon.meta` |
2743

2844
You can find the available precompiled ROS 2 types for messages and services in [available_ros2_types](available_ros2_types).
2945

3046
## How to use the precompiled library
3147

48+
<<<<<<< HEAD
3249
Go to [link to release section](https://github.com/micro-ROS/micro_ros_arduino/releases) and download the last release of micro-ROS library for Arduino.
50+
=======
51+
### Arduino IDE
52+
53+
Go to [link to release section](https://github.com/micro-ROS/micro_ros_arduino/releases) and download the last release of micro-ROS library for Arduino.
54+
>>>>>>> bfe1696 (How to use Micro-ROS with PlatformIO (#617))
3355
3456
Include it in your proyect using `Sketch -> Include library -> Add .ZIP Library...`
3557

3658
You can test micro-ROS examples located in this repo examples folder.
3759

38-
Is possible to use a micro-ROS Agent just with this docker command:
60+
Remember that is possible to use a micro-ROS Agent just with this docker command:
3961

4062
```bash
4163
# Serial micro-ROS Agent
4264
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:foxy serial --dev [YOUR BOARD PORT] -v6
65+
```
66+
### PlatformIO
67+
68+
For boards supported by micro-ROS, all you have to do to add the library to your project is including the following lines in the existing `platformio.ini` file:
69+
70+
```ini
71+
[env:<YOUR_BOARD>]
72+
73+
...
74+
lib_deps =
75+
https://github.com/micro-ROS/micro_ros_arduino
76+
77+
build_flags =
78+
-L ./.pio/libdeps/<YOUR_BOARD>/micro_ros_arduino/src/<BOARD_ARCHITECTURE>/
79+
-l microros
80+
-D <TARGET_DEFINITION>
81+
```
82+
83+
Now to proceed with the PlatformIO workflow:
84+
85+
```bash
86+
pio lib install # Install dependencies
87+
pio run # Build the firmware
88+
$ pio run --target upload # Flash the firmware
89+
4390
```
4491

92+
An example of a micro-ROS application using PlatformIO is available [here](https://github.com/husarion/micro_ros_stm32_template).
4593
## How to build the precompiled library
4694

4795
```bash

0 commit comments

Comments
 (0)