Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.47 KB

README.md

File metadata and controls

38 lines (29 loc) · 1.47 KB

This directory has patches to newlib to build a version that runs on the TS2 68000 single board computer.

The script build.sh will download, build and install a suitable cross-compiler version of gcc and then build and install newlib.

The version of gcc, 5.4.0, is the last one that supported the m68k platform.

The i/o routines for the TS2 use the TUTOR monitor trap 14 functions. Control returns, via _exit(), to the TUTOR monitor. The only i/o functions supported are standard input and output which use the console serial port.

The program, data, heap, and stack cannot exceed the 32K of available memory (actually 30K as the first 2K are used by exception vectors and TUTOR).

Floating point math is supported, but done in software and will therefore be slow and generate a lot of code. The smaller version of printf() in newlib is used which does not support printing floating point values.

The linker map file is set up to generate an S record run file. If you want an object file (e.g. for disassembly), see the comments near the top of the file ts2.ld.

Known issues:

Most newlib functions have not been tested. Only a few very small, simple C programs have been tried. See the parent directory for an example.

The exit() routine was crashing due to an issue with the atexit handlers. It appears that the code generated by this version of gcc is not compatible with the newlib implementation. I've worked around this by not calling exit, and directly calling _exit() after main() is executed.