diff -uNr riscy.orig/arm.lisp riscy/arm.lisp --- riscy.orig/arm.lisp 2005-01-08 15:35:50.000000000 -0700 +++ riscy/arm.lisp 2007-06-07 01:54:18.575155200 -0600 @@ -10,28 +10,38 @@ ;; (load "arm") ;; (interp) +(format t "loading LISP sources~%") (load "mem") (load "parse") (load "prim") (load "forth") ;(load "term") +(format t "loaded LISP sources~%") +(format t "loading packages~%") (use-package "MEM") (use-package "PARSE") (use-package "ARMPRIMITIVES") (use-package "ARMFORTH") ;(use-package "ARMTERM") (use-package "EXT") +(format t "loaded packages~%") +(format t "(reset-forth)~%") (reset-forth) +(format t "(load-primitives)~%") (load-primitives) +(format t "(import-symbol-table)~%") (import-symbol-table) +(format t "(build-forth-word-lists)~%") (build-forth-word-lists) +(format t "(hash-forth-word-lists)~%") (hash-forth-word-lists) (setf *ep* (address-of-raw-label "freeRAM")) ;; Now load the high-level Forth source code file(s). +(format t "compiling lpc.forth~%") (forth-compile-file "lpc.forth") (forth-compile-file "riscy.forth") diff -uNr riscy.orig/makefile riscy/makefile --- riscy.orig/makefile 2005-01-08 14:31:37.000000000 -0700 +++ riscy/makefile 2007-06-07 21:06:08.437705600 -0600 @@ -6,6 +6,8 @@ # $@ is the target file (e.g. led1.o) # $< is the source file (e.g. led1.S) +ARMTOOLS := /cygdrive/c/Program\ Files/Coridium + # Following line prevents make from deleting these intermediate files .PRECIOUS: %.o %.hex %.bin %.elf @@ -24,23 +26,24 @@ #LNKFLAGS = --verbose #LNKFLAGS = -Tlpc2106.ld -nostartfiles -Lgcc -L. -LNKFLAGS = -v -T lpc2106.ld -nostartfiles +LNKFLAGS = -v -T lpc2103.ld -nostartfiles # Create an object file (*.o) by preprocessing an *.S file # to create an assembly file (*.s) then assembling it. # Option -E says to preprocess only. -%.o: %.S - arm-elf-gcc -E -o $*.s $< - arm-elf-as $(ASMFLAGS) -ahls=$*.lst -o $@ $*.s +%.o: %.asm $(ARMTOOLS)/bin/arm-elf-as + $(ARMTOOLS)/bin/arm-elf-gcc -E -o $*.s $< + $(ARMTOOLS)/bin/arm-elf-as $(ASMFLAGS) -ahls=$*.lst -o $@ $*.s %.hex: %.bin - arm-elf-objcopy --input-target binary --output-target ihex $< $*.hex + $(ARMTOOLS)/bin/arm-elf-objcopy --input-target binary \ + --output-target ihex $< $*.hex -%.elf: %.o +%.elf: %.o $(ARMTOOLS)/bin/arm-elf-ld lpc2103.ld @ echo "...linking $@" - arm-elf-ld $(LNKFLAGS) -o $@ $< - arm-elf-objdump -h $@ > $*.lnkh - arm-elf-objdump -t $@ > $*.lnkt + $(ARMTOOLS)/bin/arm-elf-ld $(LNKFLAGS) -o $@ $< + $(ARMTOOLS)/bin/arm-elf-objdump -h $@ > $*.lnkh + $(ARMTOOLS)/bin/arm-elf-objdump -t $@ > $*.lnkt %.dl: %.hex lpc21isp -hex $< /dev/ttyS0 115200 14746 @@ -52,3 +55,12 @@ combo9600: lpc21isp -bin combo9600.bin /dev/ttyS0 9600 14746 +# make Cygwin links to tools where necessary +$(ARMTOOLS)/bin/arm-elf-%: $(ARMTOOLS)/arm-elf/bin/%.exe + ln -s $< $@ +lpc2103.ld: $(ARMTOOLS)/libarm7/LPC2103-ROM.ld + cp $< $@ +combo.hex: arm.lisp riscy.hex + clisp arm +armmite: combo.hex + $(ARMTOOLS)/bin/load21xx 2103 $< com4 diff -uNr riscy.orig/prim.lisp riscy/prim.lisp --- riscy.orig/prim.lisp 2005-01-03 13:25:15.000000000 -0700 +++ riscy/prim.lisp 2007-06-07 02:04:28.652403200 -0600 @@ -251,9 +251,12 @@ (primitive-position -1) ; so first usage with #'incf (high-level-position -1)) ; will give zero (dolist (lab *raw-labels*) + (format t "processing raw label: ~A~%" lab) (unless (member (car lab) *non-forth-word-labels* :test #'equal) + (format t "assigning label to address~%") (let ((name (assembler-label-to-forth-word (car lab))) (address (cdr lab))) + (format t "assigned label to address~%") (if (< address cutoff) (push ; then it a primitive (make-instance 'label