URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
[/] [zipcpu/] [trunk/] [sw/] [README.md] - Rev 209
Compare with Previous | Blame | View Log
This directory contains the source code for the ZipCPU tool-chain--theGCC back end, assembler, and linker. The directory also has the patchesnecessary to build the C-library, newlib. This tool-chain is kept in a seriesof patch files--primarily because I found the patch files for the eco32CPU *very* helpful to me when I needed to know where to start when buildingthe back end for the ZipCPU.You'll also find within this directory the [Makefile](Makefile) used todirect the build of this tool-chain, together with basic scripts for building[GCC](gcc-script.sh), [binutils](gas-script.sh), and [newlib](nlib-script.sh).If you run into trouble building these components, know this: the[Makefile](Makefile) works off of the existence of nonce.txt files to knowhow to proceed from one step to the next. Hence, as an example, when buildingthe binutils components, it will start by applying patches to the binutilsrepository found within here. Once completed, it will place a nonce.txtfile into the resulting (patched) directory. It will then attempt toconfigure binutils. Once done, there will be a `build-gas` directory witha `nonce.txt` file within it. This will be `make`s indication to move forwardand build the compiler. If you have any problems with building, or if you wantto 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 toolchainThe most common problem people have had is the result of not having thepre-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 ismissing.Another common error is that GCC needs the cross-built GCC to build it'slibraries. Hence, you may need to make certain that the install'ed binarydirectory is in your path. I've tried to clean this up so that thetool-chain Makefile doesn't require this, but certainly the builds of anyassembly or C related files will require it.## Installed locationCurrently, the tool-chain as configured does not install into your systemdirectories, but rather into an `install` directory that will be built as asubset of this one. This behavior is controlled by the `prefix` flags withinthe various build scripts, which in turn is set by a Makefile variable.Should you wish to change this behavior, just remember that the installto the system directory will require sys-admin privileges, and it may alsorequire you to build the various components manually rather than via themake script. (It's not something I've tested.)
