Skip to content

Commit 5d0cbfc

Browse files
authored
platform/core update for pico pico2 (#181)
* pico: switch to community supported platform/core and add pico2 support As the develpment of pico/pico2 support on offical platformio had been stalled for years, we have switched to platform/core contributed by earlephilhower and maxgerhardt. It includes the latest toolchains gcc 14.3 and a lot of drivers/libraries. The micro-ROS common.meta defines "-DRCUTILS_NO_64_ATOMIC=ON", which enables atomic ops functions in micro-ros/rcutils. But pico-sdk has build-in atomic ops, so they conflict and result in link errors. An user meta is added to avoid the errors. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> * ci: use the lastest ubuntu LTS 24.04 Signed-off-by: Thomas Chou <thomas@wytron.com.tw> * README: update for pico2 and more turorials Signed-off-by: Thomas Chou <thomas@wytron.com.tw> * update default distro to kilted Signed-off-by: Thomas Chou <thomas@wytron.com.tw> --------- Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
1 parent 2d58929 commit 5d0cbfc

File tree

5 files changed

+42
-37
lines changed

5 files changed

+42
-37
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ on:
88
jobs:
99

1010
micro_ros_platformio:
11-
runs-on: ubuntu-22.04
12-
container: ubuntu:22.04
11+
runs-on: ubuntu-24.04
12+
container: ubuntu:24.04
1313

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, esp32dev_ethernet, portenta_h7_m7_humble, portenta_h7_m7_jazzy, portenta_h7_m7_kilted, portenta_h7_m7_rolling, teensy41_custom, pico]
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, esp32dev_ethernet, portenta_h7_m7_humble, portenta_h7_m7_jazzy, portenta_h7_m7_kilted, portenta_h7_m7_rolling, teensy41_custom, pico, pico2]
1818

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

README.md

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

4444
\* Community contributed
4545

@@ -70,6 +70,8 @@ brew install binutils
7070

7171
The library can be included as a regular git library dependence on your `platform.ini` file:
7272

73+
You may find a sample ini file at `ci/platformio.ini`.
74+
7375
```ini
7476
...
7577
lib_deps =
@@ -98,9 +100,8 @@ A explanation for adding custom targets is also present
98100
### ROS 2 distribution
99101
The target ROS 2 distribution can be configured with the `board_microros_distro = <distribution>`, supported values are:
100102
- `humble`
101-
- `iron`
102-
- `jazzy` *(default value)*
103-
- `kilted`
103+
- `jazzy`
104+
- `kilted` *(default value)*
104105
- `rolling`
105106

106107
### Transport configuration
@@ -236,6 +237,7 @@ A simple publisher project using serial transport is available on the [examples]
236237

237238
- More micro-ROS usage examples are available on [micro-ROS-demos/rclc](https://github.com/micro-ROS/micro-ROS-demos/tree/jazzy/rclc).
238239
- For a complete micro-ROS tutorial, check [Programming with rcl and rclc](https://micro.ros.org/docs/tutorials/programming_rcl_rclc/overview/) documentation.
240+
- Community contributed tutorials for beginners with [examples ported from micro_ros_arduino](https://github.com/hippo5329/micro_ros_arduino_examples_platformio/wiki) and [examples ported from micro-ROS-demos](https://github.com/hippo5329/micro-ROS-demos-platformio/wiki).
239241

240242
## Purpose of the Project
241243

@@ -252,23 +254,3 @@ This repository is open-sourced under the Apache-2.0 license. See the [LICENSE](
252254

253255
For a list of other open-source components included in this repository,
254256
see the file [3rd-party-licenses.txt](3rd-party-licenses.txt).
255-
256-
## Known Issues/Limitations
257-
258-
- For `wifi_nina` transport, the following versioning shall be used:
259-
260-
```ini
261-
lib_deps =
262-
arduino-libraries/WiFiNINA@^1.8.13
263-
```
264-
265-
- For `nanorp2040connect` board with `serial` transport, the library dependency finder shall be set to `chain+`:
266-
267-
```ini
268-
lib_ldf_mode = chain+
269-
```
270-
- For `pico` board with `serial` transport, the library dependency finder shall be set to `chain+`:
271-
272-
```ini
273-
lib_ldf_mode = chain+
274-
```

ci/atomic.meta

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"names": {
3+
"rcutils": {
4+
"cmake-args": [
5+
"-DRCUTILS_NO_64_ATOMIC=OFF"
6+
]
7+
}
8+
}
9+
}

ci/platformio.ini

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,32 @@ lib_deps =
121121
../
122122

123123
[env:nanorp2040connect]
124-
platform = raspberrypi
124+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
125125
board = nanorp2040connect
126+
board_build.core = earlephilhower
126127
framework = arduino
127-
lib_ldf_mode = chain+
128128
board_microros_transport = serial
129+
board_microros_user_meta = atomic.meta
129130
lib_deps =
130131
../
131-
132+
132133
[env:pico]
133-
platform = raspberrypi
134-
board = pico
134+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
135+
board = rpipico
136+
board_build.core = earlephilhower
137+
framework = arduino
138+
board_microros_transport = serial
139+
board_microros_user_meta = atomic.meta
140+
lib_deps =
141+
../
142+
143+
[env:pico2]
144+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
145+
board = rpipico2
146+
board_build.core = earlephilhower
135147
framework = arduino
136-
lib_ldf_mode = chain+
137148
board_microros_transport = serial
149+
board_microros_user_meta = atomic.meta
138150
lib_deps =
139151
../
140152

@@ -175,12 +187,14 @@ lib_deps =
175187
../
176188

177189
[env:nanorp2040connect_wifi]
178-
platform = raspberrypi
190+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
179191
board = nanorp2040connect
192+
board_build.core = earlephilhower
180193
framework = arduino
181194
board_microros_transport = wifi_nina
195+
board_microros_user_meta = atomic.meta
182196
lib_deps =
183-
arduino-libraries/WiFiNINA@^1.8.13
197+
arduino-libraries/WiFiNINA
184198
../
185199

186200
; Custom transports

extra_script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
selected_board_meta = boards_metas[board] if board in boards_metas else "colcon.meta"
3636

37-
# Retrieve the required transport. Default iron
38-
microros_distro = global_env.BoardConfig().get("microros_distro", "iron")
37+
# Retrieve the required transport. Default kilted
38+
microros_distro = global_env.BoardConfig().get("microros_distro", "kilted")
3939

4040
# Retrieve the required transport. Default serial
4141
microros_transport = global_env.BoardConfig().get("microros_transport", "serial")

0 commit comments

Comments
 (0)