I wanted to test FFT on the Raspberry Pi Pico so I could create a real-time spectrum analizer using an LED strip. I have used MicroPython and Thonny for everything up until now. But FFT is only implemented in C for performance reasons. So to get started I had to install the Raspberry Pi Pico SDK on my Mac running Montery.
The Raspbery Pi Pico SDK code is here:
https://github.com/raspberrypi/pico-sdk
I installed it but the examples did not run because brew didn't support the EABI GCC
Brew install for the arm gcc did not work
brew install gcc-arm-none-eabi
``
```sh
which arm-none-eabi-cpp
/opt/local/bin/arm-none-eabi-cpp
The "eabi" is for Embedded Application Binary Interface. The default ARM tool chain application binary interface is the Embedded Application Binary Interface (EABI). It defines the conventions for files, data types, register mapping, stack frame and parameter passing rules. The EABI is commonly used on ARM and PowerPC CPUs.
From: https://formulae.brew.sh/cask/gcc-arm-embedded
brew install --cask gcc-arm-embedded
But the brew documentation didn't list the eabi version. But Mac Ports did:
sudo port install arm-none-eabi-gcc
https://www.macports.org/install.php
$ which port /opt/local/bin/port
cmake ..
PICO_SDK_PATH is /Users/dan/Documents/ws/pico-sdk
PICO platform is rp2040.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: /usr/local/bin/arm-none-eabi-gcc
CMake Error at CMakeLists.txt:6 (project):
The CMAKE_C_COMPILER:
/usr/local/bin/arm-none-eabi-gcc
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:6 (project):
The CMAKE_CXX_COMPILER:
/usr/local/bin/arm-none-eabi-g++
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
https://developer.arm.com/downloads/-/gnu-rm
ln -s /opt/local/bin/arm-none-eabi-gcc /usr/local/bin
ln -s /opt/local/bin/arm-none-eabi-* /usr/local/bin