Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
zasm
zipdbg Initial repository build Sep 21, 2016
.gitignore Cleaned up sw/.gitignore, make it easier to see actual repo files Aug 16, 2017
Makefile Added final GCC install line at the end of the install Aug 23, 2017
README.md
binutils-2.27.tar.bz2
gas-script.sh Fixed the broken build system Aug 15, 2017
gas-zippatch.patch Fixed an address to LDI conversion when the segment address is unknown Mar 16, 2017
gcc-6.2.0.tar.bz2 Switched compiler support from GCC-5.3.0 to GCC-6.2.0. Dec 6, 2016
gcc-script.sh Updated the doc description of gcc,nlib scripts Aug 16, 2017
gcc-zippatch.patch
newlib-2.5.0.tar.gz Added select lines to the WB bus Jan 16, 2017
nlib-script.sh Updated the doc description of gcc,nlib scripts Aug 16, 2017
nlib-zippatch.patch Added working UART input routine(s) Mar 1, 2017

README.md

This directory contains the source code for the ZipCPU tool-chain--the GCC back end, assembler, and linker. The directory also has the patches necessary to build the C-library, newlib. This tool-chain is kept in a series of patch files--primarily because I found the patch files for the eco32 CPU very helpful to me when I needed to know where to start when building the back end for the ZipCPU.

You'll also find within this directory the Makefile used to direct the build of this tool-chain, together with basic scripts for building GCC, binutils, and newlib.

If you run into trouble building these components, know this: the Makefile works off of the existence of nonce.txt files to know how to proceed from one step to the next. Hence, as an example, when building the binutils components, it will start by applying patches to the binutils repository found within here. Once completed, it will place a nonce.txt file into the resulting (patched) directory. It will then attempt to configure binutils. Once done, there will be a build-gas directory with a nonce.txt file within it. This will be makes indication to move forward and build the compiler. If you have any problems with building, or if you want to start the build over, feel free to either remove the patched directories, or even to just remove the (empty) nonce.txt files and have make start over.

Common problems building the toolchain

The most common problem people have had is the result of not having the pre-requisites properly installed on your computer. Sadly, in this case, the makefile will exit with some confusing error. You'll need to find the config.log file of the component that didn't build to find out what is missing.

Another common error is that GCC needs the cross-built GCC to build it's libraries. Hence, you may need to make certain that the install'ed binary directory is in your path. I've tried to clean this up so that the tool-chain Makefile doesn't require this, but certainly the builds of any assembly or C related files will require it.

Installed location

Currently, the tool-chain as configured does not install into your system directories, but rather into an install directory that will be built as a subset of this one. This behavior is controlled by the prefix flags within the various build scripts, which in turn is set by a Makefile variable. Should you wish to change this behavior, just remember that the install to the system directory will require sys-admin privileges, and it may also require you to build the various components manually rather than via the make script. (It's not something I've tested.)