Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Raspberry Pi Picoデバッガ使用のすすめ
Search
Kenta IDA
May 28, 2022
Programming
2.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Raspberry Pi Picoデバッガ使用のすすめ
トラ技オフ会 2022/05/28 での発表資料です。
Kenta IDA
May 28, 2022
More Decks by Kenta IDA
See All by Kenta IDA
日本の家電とMatterの世界
ciniml
0
770
Matter開発環境をざっくり眺める
ciniml
0
2.4k
組込みRustでも でかい?JSONを扱いたい!
ciniml
3
1.5k
ATOMDisplay_DisplayModule_M5Stack_UG_2023_Tokyo.pdf
ciniml
1
2k
Rusty Stack-chanのすすめ
ciniml
0
830
ベアメタル向けRust stdクレートの実装調査
ciniml
2
870
ESP32でSORACOM Arcつないでみた
ciniml
2
1.5k
RustでCMSIS-DAP実装してみた。
ciniml
3
1.2k
技書博初出展してみた
ciniml
0
530
Other Decks in Programming
See All in Programming
すこし踏み込む CancellationToken
htkym
2
1.7k
気持ちぃ〜角丸 Squircle
ryu1013
0
150
Domain-Driven Transformation
hschwentner
2
2.3k
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
390
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
520
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
360
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
950
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.5k
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
120
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
560
The SEO Collaboration Effect
kristinabergwall1
1
590
Practical Orchestrator
shlominoach
192
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Done Done
chrislema
187
17k
It's Worth the Effort
3n
188
29k
A designer walks into a library…
pauljervisheath
211
25k
Transcript
Raspberry Pi Pico デバッガ使用のすすめ トラ技オンライン・オフ会 2022/05/28 Kenta Ida (@ciniml)
自己紹介 •井田 健太 (@ciniml) •仕事:FPGAの論理設計 •使用言語:C++, SystemVerilog, Rust, C# •組込みRust本の1割くらい書きました
(サンプルアプリ作ったり、デバッガ試したり)→ 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ 2
Raspberry Pi Picoの開発環境 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •Pico C/C++ SDK
•MicroPython •CircuitPython •今回はPico C/C++ SDK前提の話をします 3
マイコンのプログラムのデバッグ方法 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •UART等でprintfデバッグ • 一番単純な方法だが、プログラム止めたりできない •デバッガ (gdb)
• PCのプログラム同様に停止、変数の内容確認が可能 • VSCodeによるグラフィカルな環境もある • そんなに環境整備コワクナイヨー 4
RPi PicoでGDBを使うのに必要なもの 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •RPi Pico2枚 • 目的のプログラムを動かす用
• PCとPicoのデバッグ通信用 (picoprobe) •RPi Picoを買うときは3枚買おう • 目的プログラム用 • 壊れたとき用 (GPIO速攻で壊したので) • デバッガ (picoprobe) 用 5
デバッガ使用手順 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •実は公式ドキュメント (PicoのGetting Started)に記載 • https://datasheets.raspberrypi.com/pico/getting-started-with-
pico.pdf • 英語だけどしっかり書いてあるので 一度読んでるのをお勧めします • もともとRPiは教育用なのでこの辺しっかりしてる •インターフェース 2021年8月号にも記載 • (大分前だけど) 書いたので買ってね! https://interface.cqpub.co.jp/magazine/202108/ 6
環境構築1 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •Mac --- 持ってないのでよくわからないです •Linux (Ubuntu)
• たぶん一番簡単 • Linux使ってる人はGetting Started読めると思うのでガンバレ 7
環境構築2 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •Windows • WSL上での環境構築がおすすめ • WSL
- Windows上でLinux環境を動かせる便利なやつ (Win標準機能) • 公式手順 (Windows ネイティブでの環境構築)はハマりどころ満載 • Visual Studioのビルドツール入れろとか書いてるけど大体ハマる • WindowsのCMakeも大体ハマる • WindowsのPythonも大体 (以下略 • WSLのUbuntuを入れてしまえばあとは公式手順(ほぼ)そのまま 8
よくある?質問 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •WSLだとUSBデバイス使えないんじゃないの? • WSL自体はUSB使えないけど対策アリ • a.
WSLでUSBを使えるようにする (usbipd等) • TCP/IP経由でUSB通信を中継する機能 • 現状標準で動かなくて設定いろいろ大変なので微妙 • b. USB必要な部分だけWindowsで動かす 9
WSLの利点 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •Windowsとのファイル共有が容易 • WSL側で explorer.exe .
とか実行すると、 カレントディレクトリがエクスプローラで開く •Windows側のexeを直接立ち上げることができる • .exeをつけてあげるといい 10
ボードの接続 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •普段使わないボード下端の ピンとpicoprobeを接続 • SWDの信号 •
SWCLK - クロック信号 • SWDIO - データ信号 • GND 11
デバッグ環境の構成 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •WSL2上のUbuntuで開発ツールを動かす • gcc, CMake, python
• Pico C/C++ SDK • GDB •picoprobeと通信するOpenOCDは Windowsで動かす • USB通信のため WSL上では動かせない 12
デバッグ中の画面 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ 13
デバッグ中の画面 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •PC上のソフトウェアのデバッグ時と遜色ない機能 • 変数の内容表示 • コールスタック
• ブレークポイント • ソースコード表示 •便利なので有効活用しよう 14
余談 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ •rust-dap開発中(https://github.com/ciniml/rust-dap) • Rust (プログラミング言語) で実装したCMSIS-DAP
• picoprobeの代わりになるファームウェア •RP2040は組込みRust入門にも最適 • 結構環境整備されてきた •Rustたのしいよ 15
おしまい 2022/5/28 Raspberry Pi Picoデバッガ使用のすすめ 16