Updates:
- 6-22-2022 – I wrote up the steps on building LWTOOLS under Windows using Cygwin. I found it very simple. But, I was not able to get Toolshed building under Cygwin.
- 12-7-2022 – A few updates about ‘hg’ on Mac.
- 2-20-2025 – Updated location of NitrOS9 project, and changing instructions to use “git” instead of Mercurial for that step.
Since I have to relearn all the steps, I thought I would post them as I go through them. The NitrOS-9 website has a tutorial on building it, but here are my steps with some specifically for Mac OS X:
Install the Command Line Tools for Mac OS X.
We need the command line versions of the Mac OS X compiler so we can build the tools that are then used to build NitrOS-9. If you have XCODE installed, you may already have them. An easy way to do this is from a Terminal prompt:
xcode-select --install
That will launch the Apple Mac App Store installer and get the tools for you. Cool.


Download Mercurial.
The NitrOS-9 repository now uses git as version control. You will need to download a git client, or use the GitHub Desktop app. I just learned about this change today (Feb 2025) so I need to update these steps.
Toolshed and LWTools use Mercurial, so you will need to download that as well. On macOS, you should be able to install it using “brew install mercurial”:
brew install mercurial
Download LWTools.
These are the cross-compiler tools used to build 6809 source code from Mac/Windows/Linux systems. From a Terminal prompt, find a directory you want to download the lwtools to. I chose a poor location — “CoCo” inside my Downloads folder:
pwd
/Users/allenh/Downloads/CoCo
From this directory, use the “hg” command to obtain and build the tools. It will build the directory you specify from the command line (“lwtools”):
hg clone http://lwtools.projects.l-w.ca/hg/ lwtools
cd lwtools
make
sudo make install
cd ..
Build Toolshed.
Next we want to build Toolshed. This is a series of command-line utilities that operate on CoCo/OS-9 disk images (like those used with emulators and the CoCoSDC interface). Once again, I do these steps from my “Downloads/CoCo” directory:
hg clone http://hg.code.sf.net/p/toolshed/code toolshed
cd toolshed
sudo make -C build/unix install
cd ..
(Note: I had to use “sudo make…” here to get it to build on my system.) The different build/make process shows the different styles of the various developers that made these tools. (Note: Mine seems to fail looking for a command “markdown” at the very end. Not sure what this is, but it seems to be building HTML documentation or something.)
Build NitrOS-9.
Now we are ready to download and build NitrOS-9. Once again, I start in my “Downloads/CoCo” directory, and issue the following git commands to download all the NitrOS-9 stuff:
git clone https://github.com/nitros9project/nitros9.git
cd nitros9
make dsk
This will build absolutely everything, including tons of ports and disk images you likely do not want. After this, you will have all the sources, and have built all (or some) of the sample disk images for various types of hardware (CoCo 1/2, CoCo 3, 6809 or 6309, CoCoSDC controller versus floppy or IDE hard drive, etc.).
If you are only interested in a CoCo 3 6809 setup, why build all the CoCo 1/2 and Dragon versions, or any of the 6309 stuff? I always build everything, but you can also specify to build just a specific port. For my CoCo 3/6309 build, I could do this instead:
make dsk PORTS=coco3_6309
For stock 6809 CoCo 3:
make dsk PORTS=coco3
Updating NitrOS-9 and the Tools.
Later, if you want to update your sources, you can use this command from the “nitros9” directory:
git pull
make ask
For updating LWTools and Toolshed, use this:
hg pull
hg update
…then the build steps, shown earlier.
NOTE: David Ladd has pointed out that you may want to clean out old files before rebuilding. For Toolshed, I needed to do this first:
hg pull
hg update
make -C build/unix clean
make -C build/unix
I do this occasionally to get the “latest and greatest.” You can do this for the other tools, too, by changing in to their directory then issuing the “pull” and “update”, then the appropriate make command.
TODO: This next section was from when NitrOS9 was at SourceForge and used Mercurial. I have not had a merge conflict using git yet, so I don’t know what those look like. I will try to update this document later.
If you get a merge conflict because you changed something locally, you might see this:
hg update
abort: outstanding merge conflicts
You can use this command to see what files have been changed on your local repository that conflict with the master files. This happens if, for instance, you tweak a makefile or build list or source code:
hg resolve -l
U 3rdparty/utils/tlindner/sdir.asm
This reminded me that I already Tim’s “sdir” source code (for CoCoSDC) so enable built in help and such. I have to revert those changes if I want to update, or learn how to use the merge too… I forgot!
These steps should get you everything you need to begin playing with NitrOS-9 on a real CoCo with the CoCoSDC interface, or an emulator. If you plan to use real floppies, you can use toolshed utilities to format and then copy disk image .DSK files over to the physical floppy, but I don’t have any way to hook a 360K Floppy drive to my Mac so I have never done this. CoCoSDC is the way to go there.
More to come…
Pingback: CoCo Cross Development, part 2 – Vintage is the New Old