Set up the toolchain.
Your microfirmware is compiled twice, by two completely different compilers: one for the Raspberry Pi Pico W, one for the Atari's 68000. This step installs both, plus the editor that drives them. It condenses the environment setup from the upstream programming guide .
Almost every confusing failure later in this track traces back to a half-finished toolchain: a missing environment variable, a Docker image that never pulled. The upstream guide says the same thing. Take your time here.
What you are installing, and why
Four separate things, doing four separate jobs. Knowing which is which before you start helps, because when something breaks you need to know who to blame.
| What | Job |
|---|---|
| Pico SDK , Pico Extras , FatFS SDK | Compile the C half of your app, the part that runs on the microcontroller and does the real work. |
| ARM toolchain plus OpenOCD | Produce ARM binaries, and let the debugger talk to the chip over a Debug Probe . |
| atarist-toolkit-docker | Compile the 68000 half. It is a Docker image, so you do not install a 1980s assembler on your machine by hand. |
| VS Code and its extensions | Edit, build and step through code. The templates ship VS Code configuration that expects these extensions. |
You also need the ordinary things a C project needs, git, cmake
and make, plus picotool, which copies your built firmware onto
the board. Install those the way you normally would on your system. Raspberry Pi's own
documentation is the authority for the rest:
- The C/C++ SDK covers the ARM toolchain, OpenOCD and the CMake setup, per platform.
- raspberrypi/picotool is
where
picotoolcomes from, with build and install instructions. - Pico-series boards documents the hardware itself. The Pico W is the one this board uses.
Where the Pico SDKs come from
There are two ways to have the SDKs on your machine. Understand which one you are doing, because it decides what your environment variables point at.
Both microfirmware templates carry pico-sdk, pico-extras and
fatfs-sdk as git submodules, pinned to known-good commits. When you clone
a template in step 5 and run
git submodule update --init --recursive, you get all three inside the
project. You do not have to clone them separately.
Better still, the template sets PICO_SDK_PATH,
PICO_EXTRAS_PATH and FATFS_SDK_PATH from its own submodules
when you have not set them yourself, so the common case needs no configuration at all.
The upstream programming guide also describes a standalone, system-wide Pico SDK
environment. That works too, and then the paths do matter. The template's own
CLAUDE.md is the current reference for both.
Set the environment variables
Fewer of these are mandatory than you might expect, because the template fills in most of them itself. Only one is always required:
| Variable | When you need it |
|---|---|
PICO_TOOLCHAIN_PATH |
Always. Point it at your ARM GNU Toolchain's
arm-none-eabi/bin directory. Without it the build cannot find
arm-none-eabi-gcc. |
PICO_SDK_PATH, PICO_EXTRAS_PATH,
FATFS_SDK_PATH |
Only if you are not building against the template's own submodules. The template sets all three from the repository when they are unset, so most people never touch them. |
ARM_GDB_PATH, PICO_OPENOCD_PATH |
Only for the debugger in step 9. Skip them until you have a Debug Probe in your hand. |
Set whichever apply in your shell profile so they survive a new terminal. Exporting them once in a single session is the classic way to get a confusing failure two days later.
macOS / Linux
Add these to ~/.zshrc, ~/.bashrc or whichever profile your
shell reads, then open a new terminal.
# required
export PICO_TOOLCHAIN_PATH=/path/to/arm-none-eabi/bin
# only if you are not using the template's submodules
export PICO_SDK_PATH=/path/to/pico-sdk
export PICO_EXTRAS_PATH=/path/to/pico-extras
export FATFS_SDK_PATH=/path/to/fatfs-sdk
# only for the debugger, step 9
export ARM_GDB_PATH=/path/to/arm-none-eabi/bin
export PICO_OPENOCD_PATH=/path/to/openocd/tcl
Windows (PowerShell)
Same variables, PowerShell syntax:
# required
$env:PICO_TOOLCHAIN_PATH="C:\Path\to\arm-none-eabi\bin"
# only for the debugger, step 9
$env:ARM_GDB_PATH="C:\Path\to\arm-none-eabi\bin"
$env:PICO_OPENOCD_PATH="C:\Path\to\openocd\tcl"
Watch out for one thing: $env: assignments only last for the current
PowerShell session. Use System Properties > Environment Variables, or add
them to your PowerShell profile, to make them permanent.
~/pico-sdk and ./pico-sdk will both bite you, because the
build runs from directories you are not thinking about. Write the path out in full.
The Atari cross-compiler
The 68000 half of your microfirmware is built with vasm and
vlink, wrapped in a Docker image so you do not have to build them yourself.
Install Docker, then set up
atarist-toolkit-docker
following its README. It gives you a command called stcmd that runs the
Atari tools inside the container.
If a build fails because the image cannot be found, edit
/usr/local/bin/stcmd and pin the image explicitly:
THEDOCKER="logronoide/atarist-toolkit-docker-x86_64:latest"
This is documented upstream. It usually means the generic image tag did not resolve for your architecture.
Confirm Docker itself is running before you go further. A stopped Docker daemon produces build errors that look nothing like "Docker is not running".
docker run --rm hello-world
VS Code and its extensions
The templates include a .vscode/ directory with build and debug
configuration that expects these four extensions. Install all of them:
- C/C++ Extension Pack, language support for the C half.
- CMake and CMake Tools, which drive the build.
- Cortex-Debug, to step through code on the microcontroller over the Debug Probe.
You can write a microfirmware in any editor, but the debugging setup in step 9 assumes VS Code and Cortex-Debug, and it is much less pleasant to reconstruct by hand. Raspberry Pi also publish an official Pico extension for VS Code, described in the C/C++ SDK guide .
Check it worked
Work down this list before moving on. Every item is something a later step silently depends on.
Toolchain setup is the one part of this track where an AI assistant is immediately useful, because the errors are generic and your machine is the variable. Paste the actual error and be specific about your setup:
I'm setting up a Raspberry Pi Pico W build environment on <your OS and version>.
I need PICO_TOOLCHAIN_PATH set permanently to my ARM GNU Toolchain's
arm-none-eabi/bin directory, plus cmake, make and picotool installed.
Here is what I ran and the error I got:
<paste the command and the full error>
What is missing, and what exactly should I run to fix it?
Step 8 goes much further into working with an assistant on the microfirmware itself, where the advice it needs is far more specific.