4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

MacOS(ventura-13.5.2,M1)上にRaspberry Pi PicoのC言語クロス開発環境を導入してみた

Last updated at Posted at 2023-09-16

はじめに

MacOS(ventura-13.5.2,M1)上にRaspberry Pi PicoのC言語クロス開発環境を導入する

まずはpicoの公式ドキュメント通りにやってみた

brew導入済みが前提です

 ventura-13.5.2$ cd
 ventura-13.5.2$ brew tap ArmMbed/homebrew-formulae
 ventura-13.5.2$ brew install arm-none-eabi-gcc
 ventura-13.5.2$ mkdir pico
 ventura-13.5.2$ cd pico
 ventura-13.5.2$ git clone https://github.com/raspberrypi/pico-sdk.git --branch master
 ventura-13.5.2$ cd pico-sdk/
 ventura-13.5.2$ git submodule update --init
 ventura-13.5.2$ cd ..
 ventura-13.5.2$ git clone https://github.com/raspberrypi/pico-examples.git --branch master
 ventura-13.5.2$ cd pico-examples
 ventura-13.5.2$ mkdir build
 ventura-13.5.2$ cd build
 ventura-13.5.2$ export PICO_SDK_PATH=../../pico-sdk
 ventura-13.5.2$ cmake ..
 ventura-13.5.2$ cd blink
 ventura-13.5.2$ make -j4

ここで、以下のエラーが出てbuildが止まる問題が発生。

arm-none-eabi-gcc: fatal error: cannot read spec file 'nosys.specs': No such file or directory

arm-none-eabi-gccでは失敗する(?)との情報を得てコンパイラ関係を入れ替える

参考URL

 ventura-13.5.2$ brew uninstall arm-none-eabi-gcc
 ventura-13.5.2$ brew autoremove
 ventura-13.5.2$ brew install --cask gcc-arm-embedded
 ventura-13.5.2$ make -j4

これにて無事にbulid完了。自分の環境では、gcc-arm-embeddedのインストール(ファイルの入手)に時間がかかった

4
2
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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?