Before you can build any software for the rosco_m68k, you'll need a toolchain. Fortunately, the rosco_m68k comes with a full-featured C/C++ toolchain based on GCC, with assembly language support from VASM.
And thanks to our handy Homebrew tap, it's easier than ever to get started cross-compiling software for your rosco_m68k!
Homebrew, billed as The Missing Package Manager for macOS (or Linux), makes it really easy to install a complete, locally-built-from-official-sources VASM/GCC/Binutils cross-compiling toolchain, and it's our recommended way to get started with coding for the rosco_m68k.
If you don't already have Homebrew installed, visit https://brew.sh for a one-line install.
In a nutshell, it involves running the following command in a terminal:
/bin/bash -c "$(curl -fsSL raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
And if, like us, you're a bit wary about running arbitrary scripts downloaded straight from the web, take a look at their alternative installation instructions for more options.
Now that you have Homebrew installed, installing the toolchain is a breeze. The best way to do this depends on your platform.
If you're on MacOS®, you can install the whole toolchain with two commands:
brew tap rosco-m68k/toolchain brew install rosco-m68k-toolchain@13
This will automatically download, build and install all the dependencies that you would normally have to build manually. Homebrew will also keep a record of what's installed, enabling you to easily remove everything if you need to later, and allowing you to receive updates when they become available.
Specifically, this adds the rosco_m68k tap to Homebrew, and then grabs our custom formulae from that tap. If you're curious about how we're building the cross toolchain or just want to see what it's going to do before you run it on your machine, check out the formulae at https://github.com/rosco-m68k/homebrew-toolchain
Depending on your computer and OS combination, this might complete in a few seconds, or it could take a few minutes - it just depends on whether there's a pre-built binary package available for your computer - it'll build from source if not.
Either way, once it's done, you're ready to rock!
If for some reason you want to install our older bare-metal toolchain, you can do that instead with the following commands:
brew tap rosco-m68k/toolchain brew install gcc-cross-m68k@13 vasm-all srecord minipro
This isn't recommended for most users, but might be useful if you're working with an older board / firmware branch, or if you have special build requirements and don't need our libc.
On Linux, installing the toolchain is a bit more involved, but still pretty simple - a lot is still handled automatically by brew.
Note: These steps specifically target Debian-based distributions (particularly, Ubuntu 20.04 at present). If you are using a different distribution, you may need to replace apt-get with e.g. yum or dnf in these steps.
Firstly, you'll need to install some essential build software, and then install the cross-compiler and VASM assembler (you'll probably be asked for your password at the sudo step):
sudo apt-get install gcc g++ srecord brew tap rosco-m68k/toolchain brew install rosco-m68k-toolchain@13
Just like on macOS®, this will automatically download, build and install all the dependencies that you would normally have to build manually. Homebrew will also keep a record of what's installed, enabling you to easily remove everything if you need to later, and allowing you to receive updates when they become available.
Depending on your computer and OS combination, this might complete in a few seconds, or it could take a few minutes - it just depends on whether there's a pre-built binary package available for your computer - it'll build from source if not.
Once that's done, we'll need to install Minipro. This step is optional - you only need to do this if you want to burn your own EEPROMs. If you just want to build the example software (and maybe your own!) then you can safely skip this step.
If you want to install minipro, do this):
brew install minipro
Once all that's done, you're ready to rock! 🥳