Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Raspberry Pi Picoデバッガ使用のすすめ
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kenta IDA
May 28, 2022
Programming
0
2.2k
Raspberry Pi Picoデバッガ使用のすすめ
トラ技オフ会 2022/05/28 での発表資料です。
Kenta IDA
May 28, 2022
Tweet
Share
More Decks by Kenta IDA
See All by Kenta IDA
日本の家電とMatterの世界
ciniml
0
460
Matter開発環境をざっくり眺める
ciniml
0
2.2k
組込みRustでも でかい?JSONを扱いたい!
ciniml
3
1.4k
ATOMDisplay_DisplayModule_M5Stack_UG_2023_Tokyo.pdf
ciniml
1
1.8k
Rusty Stack-chanのすすめ
ciniml
0
710
ベアメタル向けRust stdクレートの実装調査
ciniml
2
810
ESP32でSORACOM Arcつないでみた
ciniml
2
1.4k
RustでCMSIS-DAP実装してみた。
ciniml
3
1.1k
技書博初出展してみた
ciniml
0
460
Other Decks in Programming
See All in Programming
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
780
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
100
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
170
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
310
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
470
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
190
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
170
CSC307 Lecture 12
javiergs
PRO
0
450
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
220
ぼくの開発環境2026
yuzneri
1
290
浮動小数の比較について
kishikawakatsumi
0
360
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
220
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
280
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
190
Making Projects Easy
brettharned
120
6.6k
Speed Design
sergeychernyshev
33
1.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
360
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
64
Fireside Chat
paigeccino
41
3.8k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
90
Making the Leap to Tech Lead
cromwellryan
135
9.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
130
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