0
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?

archlinuxでpico2をLチカさせる

Last updated at Posted at 2025-03-12

はじめに

自分がちょこっと躓いたので忘備録として
順番は適当

環境構築

※まだpico2は刺さなくても良い

必要なものを入れる

sudo pacman -Sy arm-none-eabi-gcc arm-none-eabi-newlib

適当なディレクトリを作成して移動する or ディレクトリをターミナルで開く

git clone https://github.com/raspberrypi/pico-sdk.git

クローンが完了したら環境変数を設定
※.bashrcは環境によって違う場合があるかも

cd 
sudo nano .bashrc

ダウンロードしたディレクトリのパスを入力

# for raspberrypi pico2  
export PICO_SDK_PATH="/hogehoge/pico-sdk/"

変更を適用

source .zshrc

pico-sdkのサブモジュールをアップデート

cd /hogehoge/piko-sdk
git submodule update --init

pico-exampleをクローンして移動

git clone -b master https://github.com/raspberrypi/pico-examples.git
cd pico-examples

pico-exampleをビルド

mkdir build
cd build
cmake -DPICO_PLATFORM=rp2350 ..

blinkをビルド

cd blink
make

書き込み作業
pico2のbootselボタンを押しながらPCに接続
RP2350というデバイスが表示されるので

/hogehoge/pico-examples/build/blink/

を開いてblink.uf2という名前のファイルをコピーしてあげる
すると自動的にアンマウントされてLEDが点滅し始める

おわりに

初めてqiitaを書くのでミスがあったら教えてください

参考

「Raspberry Pi Pico 2」の開発環境を構築してLチカするまでの手順まとめ
ArchLinuxでRaspberry Pi Picoの開発環境構築
Arch LinuxでRaspberry Pi Picoに繋いでLチカするまで

0
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
0
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?