Languages

Main menu

You are here

SD2IEC development environment for Windows

Submitted by siz on Sun, 2016-05-15 22:22

I wanted to compile my own SD2IEC firmware version for a long time. I started to create my environment several times but failed. Then came a bit stronger motivation: IEC-ATA made his SD1551 which is an SD2IEC (hardware) based device that connects to the Commodore 264 series (C16, C116, plus/4 and the rarities/prototypes: C232, C264, V364) expansion port and uses the TCBM protocol of the 1551 with SD card bases storage but with custome firmware.

My idea was that as the SD2IEC firmware already supports different hardware variants and bus implementations (Commodore serial, DophinDOS parallel, IEEE-488) we could easily add support for TCBM too and use all the other (like SD-card handling, filesystem, disk image and file handling, firmware update) functions from the original SD2IEC software. Of course I jumped on it but as soon as I was able to compile and flash firmware for my SD2IEC my enhusiasm faded as other projects got in focus. (I didn't give up but it got back beside the other numerous things :) )

So: this post was created to document what do you need to compile the firmware.

Software requirements

I found that the compilation does not work with the generally suggested WinAVR package. (At least I wasn't able to make it work) because it's heavily based on the gcc toolchain with make avr-gcc and perl. I've installed Ubuntu Linux to try out the compilation and of course everything worked perfectly for the first try after installing the acr packages. But I wanted to use Windows.

What you need to download and Install:

Git: SD2IEC firmware is in a Git repository. This is required to download the source code.

MinGW/MSys: *nix shell console and development toolkit support for Windows.

Strawberry PERL: unfortunately we need a separate PERL because MSys has version 5.8 (at least the one I installed had that one) but SD2IEC compilation requires version 5.10 at least. Searching the Internet I found Strawberry PERL as the recommended one so I've decided to use this one..

AVRDude: not for the compilation itself but for flashing the compiled firmware to the AVR. (SD2IEC has a make target for flashing)

I've downloaded the most recent version of all the tools but it should work with slightly older and newer versions too..

Installation

Foreword: if an installer wants to add something to the PATH we should let it do it. Otherwise there is a good chance that the build will fail.

We can download from https://sourceforge.net/projects/mingw/files/MSYS/ mingw-get-setup which is recommended on the top of the page. This is an installer. We have to select what we need to be installed. It will download and install the selected items only. VERY slow.
It offers several installation possibilites (pre-selected packages – Basic Setup) or we can select what we need (All Packages). I didn't bother too much and selected 3 of basic ones: