1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Raspberry Pi Pico(W) / Pico 2(W) をPlatformIOで開発する方法

Posted at

はじめに

こんにちは、Wadoyokaといいます。今回、Raspberry pi pico2wを、PlartformIOで開発したいなと考えたときに、あまり記事が見当たらなかったので、ここに備忘録として書いておきます。
私は、pico2wを使用していますが、pico2でも同様の方法でできると思います。
最終的に、以下の環境でプログラムを書き込むことができました。

  • PlatformIO
  • mac book pro M1
  • Micro USB Type-B(2.0)コネクタで書き込み
    ※Windowsでは、まだ未検証ですが後ほど試そうと考えています。また、これは2025年4月20日時点で有効な方法です。後ほど変わる可能性がございます。

目次

  1. 参考になった資料
  2. プロジェクトビルド
  3. PIO HomeでPlatforms
  4. 導入手順
    1. platformsを追加
    2. platformio.iniを編集する。
  5. 最後に

1.参考になった資料

まず最初に参考資料のご紹介です。

こちらの資料では、本格的なデバック環境を実現するために、Pico-Probeを使用していますが、USB microBコネクターだけで行きたいと思います。

2. プロジェクトビルド

以下の画像のようにプロジェクトをビルドします。

  • Name(プロジェクト名・自由につける): testPico2w
  • Board: Raspberry Pi Pico
  • Framework: Arduino

platformSetup.png

3. PIO HomeでPlatforms

maxgerhardtさんが作成した以下のgithubをplatformIOに導入します。

READMEの最初に書いてある部分をGoogle翻訳しました。

このフォークは、PlatformIO 用の Raspberry Pi RP2040 および RP2350 Arduino Core の継続的なアップストリーム開発が不足しているために作成されました。

4. 導入手順

ここから、実際の導入手順を紹介します。

4-1. Platformsを追加

まずは、platformIOの虫のアイコンをクリックします。

platform_install1.png

Quick Access → PIO Home → Platformsを押します。

platform_install2.png

Advanced Installationを押す

platform_install3.png

以下のURLを入力して、Installを押す。

https://github.com/maxgerhardt/platform-raspberrypi.git

platform_install4.png

以下の画像のように、Raspberry Pi RP2040が追加されてたらOK!

platform_install5.png

4-2. platformio.iniを編集する。

platformio.iniを以下のように書き換える。

platformio.ini
; RP2350 based 
[env:rpipico2w]
platform = raspberrypi
board = rpipico2w
framework = arduino

これで、platformIoで、Rasberry Pi Pico 2wを開発できると思います。

5. 最後に

ここまで、読んでいただき、ありがとうございます。
platformIoで開発すると、追加ライブラリ等の設定の共有が楽にできて好きです。
またね!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?