setup.sh fails with `TesterRpiPico` shield
Steps to reproduce
- Run
bash -c "$(curl -fsSL https://zmk.dev/setup.sh)"
Keyboard Selection:
1) 2% Milk 30) Helix 59) QAZ
2) A. Dux 31) Hummingbird 60) Quefrency Rev. 1
3) Advantage 360 Pro 32) Iris 61) Redox
4) BAT43 33) Jian 62) REVIUNG34
5) BDN9 Rev2 34) Jiran 63) REVIUNG41
6) BFO-9000 35) Jorne 64) REVIUNG5
7) Boardsource 3x4 Macropad 36) KBDfans Tofu65 2.0 65) REVIUNG53
8) Boardsource 5x12 37) Knob Goblin 66) Romac Macropad
9) BT60 V1 Hotswap 38) Kyria 67) Romac+ Macropad
10) BT60 V1 Soldered 39) Kyria Rev2 68) S40NC
11) BT60 V2 40) Kyria Rev3 69) SNAP
12) BT65 41) Leeloo 70) Sofle
13) BT75 V1 42) Leeloo v2 71) splitkb.com Aurora Corne
14) Chalice 43) Leeloo-Micro 72) splitkb.com Aurora Helix
15) Clog 44) Lily58 73) splitkb.com Aurora Lily58
16) Contra 45) Lotus58 74) splitkb.com Aurora Sofle
17) Corne 46) MakerDiary m60 75) splitkb.com Aurora Sweep
18) Corneish Zen v1 47) Microdox 76) Splitreus62
19) Corneish Zen v2 48) Microdox V2 77) TesterProMicro
20) Cradio/Sweep 49) MurphPad 78) TesterRpiPico
21) CRBN Featherlight 50) Naked60 79) TesterXiao
22) eek! 51) Nibble 80) TG4x
23) Elephant42 52) nice!60 81) Tidbit Numpad
24) Ergodash 53) nice!view 82) Waterfowl
25) Eternal Keypad 54) nice!view adapter 83) ZMK Uno
26) Eternal Keypad Lefty 55) Osprette 84) Zodiark
27) Ferris 0.2 56) Pancake 85) Quit
28) Fourier Rev. 1 57) Planck Rev6
29) Glove80 58) Preonic Rev3
Pick a keyboard:
- select
78) TesterRpiPico - select any RP2040 board
- proceed with creation of git repo and push
Problem
the build will now fail at West Build step
Run west build -s zmk/app -d "/tmp/tmp.5TrvHsB5eE" -b "adafruit_kb2040" -- -DZMK_CONFIG=/tmp/zmk-config/config -DSHIELD="tester_rpi_pico" -DZMK_EXTRA_MODULES='/__w/zmk-config/zmk-config'
+ west build -s zmk/app -d /tmp/tmp.5TrvHsB5eE -b adafruit_kb2040 -- -DZMK_CONFIG=/tmp/zmk-config/config -DSHIELD=tester_rpi_pico -DZMK_EXTRA_MODULES=/__w/zmk-config/zmk-config
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /tmp/zmk-config/zmk/app
-- CMake version: 3.31.6
-- Found Python3: /usr/bin/python3 (found suitable version "3.12.3", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: /tmp/zmk-config/zephyr/.cache
-- Zephyr version: 3.5.0 (/tmp/zmk-config/zephyr)
-- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
-- ZMK Config directory: /tmp/zmk-config/config
-- ZMK Config Kconfig: /tmp/zmk-config/config/tester_rpi_pico.conf
-- Using keymap file: /tmp/zmk-config/config/tester_rpi_pico.keymap
-- Board: adafruit_kb2040
-- Shield(s): tester_rpi_pico
No shield named 'tester_rpi_pico' found
Reason
the setup.sh file clones https://github.com/zmkfirmware/unified-zmk-config-template which creates file config/west.yml and .github/workflows/build.yml
both use the v0.3 tag of zmk which does not have app/boards/shields/tester_rpi_pico
Attempted fix
- I edited
config/west.ymland.github/workflows/build.ymlof mysetup.shcreatedzmk-configrepo to usemainbranch instead ofv0.3. - the shield is now detected
- but the build then fails with
gen_defines.py failed with return code: 1
The tester_rpi_pico shield is meant for Pi Pico-shaped boards.
If you have a Pro Micro-shaped board, you'll want to use one of the shields that is compatible with that instead. (More details.)
@lesshonor thanks for your comments, now its becoming a lot clearer.
- I chose
adafruit_kb2040board which supports only pro micro interconnect shields -
tester_rpi_picois of a different interconnect type (Pi Pico) - Hence the build fails further
From the documentation, I cannot find any mention of the tester_rpi_pico shield, neither the mention of Pi Pico interconnect at all.
~~Since I am using a standard Raspberry Pi Pico board, what are my options here?~~
Update:
I see that there are a lot of boards under ./app/boards, including rpi_pico but a very few of them are actually in the setup.sh file, is this documented/reason known?
I updated board in build.yml of my repo to rpi_pico and now the build succeeds
I am guessing the rpi_pico interconnect needs to be defined in https://github.com/zmkfirmware/zmk/tree/main/app/boards/interconnects for shields requiring at (and boards exposing it?) to be listed in the hardware page and the setup script. Which other boards/shields do you see without metadata? There shouldn't be any others besides rpi_pico, which seems like an omission.
Separately, it seems we have a mismatch that you uncovered. The config template is versioned, but the setup script isn't, which leads to the tester_rpi_pico appearing in the setup script but not being buildable by the config repo which points to a ZMK version that doesn't have the shield. Unfortunately this is tricky to fix: the setup script is created by the website builds which aren't versioned at all. I guess the website build process could checkout the last tagged version which should match the config template, then create setup.sh.
We could also just drop the old setup scripts and fully switch to https://github.com/zmkfirmware/zmk-cli. Since that reads the hardware metadata from a local clone of whichever version of ZMK is specified in the West manifest, it shouldn't have this issue.
That sounds like a better idea to me than spending more effort on the old script.
Closing as we have now dropped support for the old script.