Toolchain Installation for rosco_m68k
For a new project, start with rosco-cli. It creates C or Assembly projects and handles builds, UART uploads, and emulator sessions. You can use its Docker toolchain or install the cross-compiler locally.
The cross-compiler uses names such as m68k-elf-rosco-gcc; installing it does not replace your system C compiler.
Install rosco-cli
The CLI currently documents support for Linux and Windows on x64 and ARM64. Install Rust and Cargo and Git, then run:
git clone https://github.com/solderdemon/rosco-cli.git
cd rosco-cli
cargo install --path .
rosco --help
Make sure Cargo's binary directory is on PATH: $HOME/.cargo/bin on Linux or %USERPROFILE%\.cargo\bin on Windows. Run these installation commands in a development directory; create your application in a separate directory afterwards.
Build with Docker
Install Docker Engine on Linux or Docker Desktop on Windows and start Docker. You do not need Homebrew or a local m68k compiler for this method.
From the directory where you keep your projects:
rosco init hello --board rosco_m68k --language c --docker --target emulator --emulator-docker --yes
cd hello
rosco doctor
rosco build
rosco run --emulator
The first build downloads solderdemon/rosco_m68k:latest and builds the bundled libraries. The emulator uses a separate solderdemon/rosco-emulator image, including its firmware ROMs. Later builds reuse the libraries. The CLI mounts the project for you and keeps build output on your computer.
On ARM hosts, if the toolchain image requires amd64 emulation, save this setting in the project:
rosco config set --local build.docker.platform linux/amd64
See Writing Programs for the next steps and Running Programs for hardware uploads.
Install the Toolchain Locally
Local installation is useful for editor integration and building without Docker. The upstream toolchain supports macOS and Linux; on Windows, use WSL 2 for this method. The CLI's documented host support is separate from the toolchain's platform support; on macOS you can use the manual Makefile workflow.
Homebrew and Build Dependencies
Install Homebrew and follow its instructions to add brew to PATH. On Linux, also follow the Homebrew on Linux prerequisites. For Debian/Ubuntu or WSL Ubuntu, the upstream guide additionally lists:
sudo apt update
sudo apt install gcc g++ srecord
Install and Check the Compiler
brew tap rosco-m68k/toolchain
brew install rosco-m68k-toolchain@13 vasm-all srecord
m68k-elf-rosco-gcc --version
Use m68k-elf-rosco-gcc for current upstream projects. The older gcc-cross-m68k@13 package provides the different m68k-elf-gcc toolchain; do not mix the two installation paths or overwrite links as a routine setup step. Older templates may expect the older compiler prefix, so check their Makefile before changing toolchains.
For a CLI project, select the local toolchain from its directory:
rosco config set --local build.toolchain host
rosco doctor
rosco build --host
For a manual project, build its libraries first as described in Writing Programs, then run make in the program directory.
VS Code and WSL
Install the WSL extension in VS Code and use Ctrl+Shift+P → “WSL: Open Folder in WSL”. Install the toolchain inside that same WSL environment. Configure the C/C++ extension's compiler path to m68k-elf-rosco-gcc and include paths to your project's library headers if they are not detected automatically.
Troubleshooting
- If
roscoorbrewis not found, check the corresponding installer'sPATHinstructions and reopen the terminal. - If a Docker build fails before compilation, check that Docker is running and run
rosco doctorfrom the project directory. - If the compiler is missing, check
m68k-elf-rosco-gcc --versionin the environment where the build runs. A Docker build does not install that executable on the host. - For a local emulator, save its path using
rosco config set emulator.program /path/to/rosco-emulator/rosco. The emulator binary and CLI may both be namedrosco; use an explicit emulator path to avoid a collision.