In the previous video I showed you how to set up an Amiga cross-compiler on your machine. The next step to setup a good code editor or Integrated Development Environment (IDE). My preferred editor and IDE is currently VS Code, and I’m going to show you how to set it up for cross-compiling to AmigaOS.
And by this I mean, be able to use the cross-compiler directly from within VS Code. You can already use VS Code to write Amiga software without installing anything else, but then you’d have to run an external shell window for compiling your code, which is inconvenient and inefficient.
Setup VS Code
First, download and install VS Code from its website (link), and follow the instructions for your platform.
Now, in VS Code, go to the extensions manager, search for the “Dev Containers” extension, and install it. This extension allows you to open your AmigaOS projects inside a Docker container, which is great, because our cross-compiler runs in a container.
While you’re at it, install the “C/C++ Extension Pack,” because you’re going to be writing C/C++ code, and those extensions are very useful.
That’s the setup done.
Configuring Our AmigaOS Project to Use the Dev Container
But, how do we use the “Dev Containers” extension? The key is to add the some config files to your projects. Don’t worry, you only have to set this up once, and then you can copy and paste it from one project to another.
So, open up a project, and create a sub-directory called .devcontainer. Copy the docker-compose.yml containing the Amiga cross-compiler containers from the previous video into this new sub-directory.
Next, create a devcontainer.json file inside .devcontainer, and enter the following: