Skip to content

Commit c9c410c

Browse files
delihusAcuadros95
andauthored
micro_ros_platformio works on Raspberry Pi Pico (#39)
* Added untested support for rpi pico * Update README.md Add rpi pico to supported boards * Update platformio.ini * Added pico to Cl * Update README.md * Update ci/platformio.ini Co-authored-by: Antonio Cuadros <[email protected]> * Update README.md Co-authored-by: Antonio Cuadros <[email protected]>
1 parent 2ebb324 commit c9c410c

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
platform: [teensy41, teensy40, teensy36, teensy35, teensy31, due, zero, olimex_e407, esp32dev, nanorp2040connect, portenta_h7_m7, teensy41_eth, nanorp2040connect_wifi, portenta_h7_m7_wifi, esp32dev_wifi, portenta_h7_m7_galactic, portenta_h7_m7_foxy, portenta_h7_m7_rolling, teensy41_custom]
17+
platform: [teensy41, teensy40, teensy36, teensy35, teensy31, due, zero, olimex_e407, esp32dev, nanorp2040connect, portenta_h7_m7, teensy41_eth, nanorp2040connect_wifi, portenta_h7_m7_wifi, esp32dev_wifi, portenta_h7_m7_galactic, portenta_h7_m7_foxy, portenta_h7_m7_rolling, teensy41_custom, pico]
1818

1919
steps:
2020
- uses: actions/checkout@v3

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Supported boards are:
3939
| `olimex_e407` | `ststm32` | `arduino` | `serial` | `colcon.meta` |
4040
| `esp32dev` | `espressif32` | `arduino` | `serial` <br/> `wifi` | `colcon.meta` |
4141
| `nanorp2040connect` | `raspberrypi` | `arduino` | `serial` <br/> `wifi_nina` | `colcon_verylowmem.meta` |
42+
| `pico` | `raspberrypi` | `arduino` | `serial` | `colcon.meta`|
4243

4344
The community is encouraged to open pull request with custom use cases.
4445

@@ -236,6 +237,11 @@ see the file [3rd-party-licenses.txt](3rd-party-licenses.txt).
236237

237238
- For `nanorp2040connect` board with `serial` transport, the library dependency finder shall be set to `chain+`:
238239

240+
```ini
241+
lib_ldf_mode = chain+
242+
```
243+
- For `pico` board with `serial` transport, the library dependency finder shall be set to `chain+`:
244+
239245
```ini
240246
lib_ldf_mode = chain+
241247
```

ci/platformio.ini

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,15 @@ lib_ldf_mode = chain+
118118
board_microros_transport = serial
119119
lib_deps =
120120
../
121+
122+
[env:pico]
123+
platform = raspberrypi
124+
board = pico
125+
framework = arduino
126+
lib_ldf_mode = chain+
127+
board_microros_transport = serial
128+
lib_deps =
129+
../
121130

122131
; Ethernet platforms
123132

@@ -164,4 +173,4 @@ board = teensy41
164173
framework = arduino
165174
board_microros_transport = custom
166175
lib_deps =
167-
../
176+
../

extra_script.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"esp32dev" : "colcon.meta",
2121
"olimex_e407" : "colcon.meta",
2222
"due" : "colcon_verylowmem.meta",
23-
"zero" : "colcon_verylowmem.meta"
23+
"zero" : "colcon_verylowmem.meta",
24+
"pico": "colcon.meta"
25+
2426
}
2527

2628
project_options = env.GetProjectConfig().items(env=env["PIOENV"], as_dict=True)
@@ -100,7 +102,7 @@ def build_microros(*args, **kwargs):
100102
#######################################################
101103

102104
# Add library
103-
if (board == "portenta_h7_m7" or board == "nanorp2040connect"):
105+
if (board == "portenta_h7_m7" or board == "nanorp2040connect" or board == "pico"):
104106
# Workaround for including the library in the linker group
105107
# This solves a problem with duplicated symbols in Galactic
106108
global_env["_LIBFLAGS"] = "-Wl,--start-group " + global_env["_LIBFLAGS"] + " -l{} -Wl,--end-group".format(builder.library_name)

0 commit comments

Comments
 (0)