From: bauen1 Date: Sun, 31 Dec 2017 14:49:17 +0000 (+0100) Subject: Added libray to none target X-Git-Tag: V2.17~50^2~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b08839cac4ba6386b2227782131f1f264dbe5719;p=cc65 Added libray to none target --- diff --git a/doc/customizing.sgml b/doc/customizing.sgml index e502f2e9d..d8f6ef6be 100644 --- a/doc/customizing.sgml +++ b/doc/customizing.sgml @@ -302,23 +302,20 @@ also forcing a BRK instruction into the CPU. Custom Run-Time Library Creation

The next step in customizing the cc65 toolset is creating a run-time -library for the targeted hardware. The easiest way to do this is to -modify a standard library from the cc65 distribution. In this example, -there is no console I/O, mouse, joystick, etc. in the system, so it is -most appropriate to use the simplest library as the base, which is for -the Watara Supervision and is named "supervision.lib" in the -lib directory of the distribution. - -The only modification required is to replace the crt0 module in -the supervision.lib library with custom startup code. This is simply -done by first copying the library and giving it a new name, compiling -the startup code with ca65, and finally using the ar65 archiver to -replace the module in the new library. The steps are shown below: +library for the targeted hardware. The recommended way to do this is to +modify the platform-independent standard library of the cc65 distribution. +It is named "none.lib" in the lib directory of the distribution. + +When using "none.lib" we need to supply our own crt0 +module with custom startup code. This is simply done by first copying the +the library and giving it a new name, compiling the startup code with ca65, +and finally using the ar65 archiver to add the module to the new library. +The steps are shown below: -$ copy "C:\Program Files\cc65\lib\supervision.lib" sbc.lib -$ ca65 crt0.s -$ ar65 a sbc.lib crt0.o + cp /usr/local/share/cc65/lib/none.lib sbc.lib + ca65 crt0.s + ar65 a sbc.lib crt0.o Interrupt Service Routine Definition

@@ -706,14 +703,14 @@ that can be used as the initialization data for the Xilinx Block RAM used for code storage: -$ cc65 -t none -O --cpu 65sc02 main.c -$ ca65 --cpu 65sc02 main.s -$ ca65 --cpu 65sc02 rs232_tx.s -$ ca65 --cpu 65sc02 interrupt.s -$ ca65 --cpu 65sc02 vectors.s -$ ca65 --cpu 65sc02 wait.s -$ ld65 -C sbc.cfg -m main.map interrupt.o vectors.o wait.o rs232_tx.o - main.o sbc.lib + cc65 -t none -O --cpu 65sc02 main.c + ca65 --cpu 65sc02 main.s + ca65 --cpu 65sc02 rs232_tx.s + ca65 --cpu 65sc02 interrupt.s + ca65 --cpu 65sc02 vectors.s + ca65 --cpu 65sc02 wait.s + ld65 -C sbc.cfg -m main.map interrupt.o vectors.o wait.o + rs232_tx.o main.o sbc.lib During the C-level code compilation phase (cc65), assumptions diff --git a/libsrc/Makefile b/libsrc/Makefile index 0583b6761..2ac0c78f0 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -32,7 +32,8 @@ TARGETS = apple2 \ sim6502 \ sim65c02 \ supervision \ - telestrat + telestrat \ + none DRVTYPES = emd \ joy \