GCC56K -- GCC Compiler for the DSP56000/1 GCC5616 -- GCC Compiler for the DSP5616 series Version 0.1 This package contains GCC machine descriptions for the Motorola DSP56000 (or DSP56001) DSP chip and the DSP5616 series (including the DSP56116 and the DSP56156). Using the machine description files, a GCC compiler can be created which will generate assembly code suitable for processing by Motorola's assemblers. The machine description is based upon version 1.40 of GCC. It has not been tried with any other version of GCC. If you do not have GCC 1.40, I believe that it is available from many different sites. Two that I know of are anonymous FTP sites: crl.dec.com and prep.ai.mit.edu. The latter address has a substantial list of where you can obtain GNU software. Before going any further, please understand that the GCC56 compilers are limited in many ways and require some in-depth understanding of their implementation. I urge you to read the accompanying documentation thoroughly before attempting to write code. This is a "hacker's compiler", not a well-polished product. Here is a quick summary of the compiler's features and foibles -- don't bother compiling the compiler if the foibles are too restrictive: --- The Good News * (GCC56K) The compiler can generate code for either X-space or Y-space for both the stack and data areas independently. As long as the stack space is consistent for all source files, the data spaces can be mixed and matched. * (GCC56K) The compiler can generate references to L-space for long variables and constants (with restrictions). * Several section macro references are generated which allow segregation of constant data with writable data (I needed this for my applications). --- The Bad News * The code that is generated is not terribly efficient. I wouldn't even dream of writing real "DSP" code with it. It is suitable, however, for writing "support" code for the real DSP. * The native modes of the processor are supported - and that is all. Most notably, floating point numbers are restricted to the range [-1,1) (I'm not kidding) and there is no support for unsigned numbers (I'm still not kidding). If you write 'float a=2.0' you will get a compiler error. If you have two variables declared as 'unsigned' named 'i' and 'j', the comparison (i > j) will perform a signed test. * There is no advantage taken of the parallel move capability of the processors. * There is no attempt made to reorder instructions to avoid pipeline delays. The assembler must be executed with an option that instructs it to insert 'nop's when necessary. * The code generated is not compatible with that of Motorola's C compiler. * The compiler is not fully tested. This version is a beta release. Having said all of the above, let me say that I *have* found the compilers useful. I've noticed that my DSP applications are about 10% hard-core DSP and 90% support code. The 10% is written in assembly language, of course. The remaining 90% can be written in C. The reduction in development and maintenance time is dramatic. I am open to comments and suggestions on improving the compiler. I can be reached at 'asterian@bnr.ca' or post to the 'comp.dsp' newsgroup, which I read regularly. If someone would like to "take over" the development of this compiler, they are welcome to do so. The time that I have to spend on improving it (or fixing bugs) is limited. The full documentation for the compilers is contained in the files 'DOC.56K' for GCC56K and 'DOC.5616' for GCC5616. The compilers are different enough to warrant separate documentation files. Please excuse the cut-and-paste mistakes. Note that where the entire package is being referred to, the name GCC56 is used. As stated above, this is a beta release. I've gotten the compilers working to the point where they generate working code for my projects. I have no well-crafted test suite to exercise all aspects of the compiler. I started writing the 56K compiler first but my development switched to the 56156 soon thereafter. I mostly use the GCC5616 compiler now so it is the better tested of the two. For those brave souls who are willing to use these compilers, your bug reports will be much appreciated and will help create a stable product. Best of luck! Andrew Sterian