Skip to content

Commit ea44742

Browse files
committed
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>
1 parent e57789c commit ea44742

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
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, 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

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: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,35 @@ 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
127128
lib_ldf_mode = chain+
128129
board_microros_transport = serial
130+
board_microros_user_meta = atomic.meta
129131
lib_deps =
130132
../
131-
133+
132134
[env:pico]
133-
platform = raspberrypi
134-
board = pico
135+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
136+
board = rpipico
137+
board_build.core = earlephilhower
138+
framework = arduino
139+
lib_ldf_mode = chain+
140+
board_microros_transport = serial
141+
board_microros_user_meta = atomic.meta
142+
lib_deps =
143+
../
144+
145+
[env:pico2]
146+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
147+
board = rpipico2
148+
board_build.core = earlephilhower
135149
framework = arduino
136150
lib_ldf_mode = chain+
137151
board_microros_transport = serial
152+
board_microros_user_meta = atomic.meta
138153
lib_deps =
139154
../
140155

@@ -175,12 +190,14 @@ lib_deps =
175190
../
176191

177192
[env:nanorp2040connect_wifi]
178-
platform = raspberrypi
193+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
179194
board = nanorp2040connect
195+
board_build.core = earlephilhower
180196
framework = arduino
181197
board_microros_transport = wifi_nina
198+
board_microros_user_meta = atomic.meta
182199
lib_deps =
183-
arduino-libraries/WiFiNINA@^1.8.13
200+
arduino-libraries/WiFiNINA
184201
../
185202

186203
; Custom transports

0 commit comments

Comments
 (0)