diff -uNr riscy.orig/arm.lisp riscy/arm.lisp --- riscy.orig/arm.lisp 2005-01-08 17:35:50.000000000 -0500 +++ riscy/arm.lisp 2007-06-09 02:33:16.000000000 -0400 @@ -76,9 +76,9 @@ ;; Show some statistics (format t "~&The compile was successful.") (format t "~&The image size is ~D bytes~%" *h*) -(format t "~& available Flash is ~D bytes~%" (- #x20000 8192 *h*)) +(format t "~& available Flash is ~D bytes~%" (- #x8000 8192 *h*)) (format t "~&RAM allotted is ~D bytes~%" (- *ep* #x40000000)) -(format t "~& available RAM is ~D bytes~%" (- 65536 (- *ep* #x40000000))) +(format t "~& available RAM is ~D bytes~%" (- 8192 (- *ep* #x40000000))) (format t "~&~D names~%" (length *flash-labels*)) (format t "~&~D bytes in the flash names table~%" (length-of-flash-names-table)) diff -uNr riscy.orig/lpc2103.ld riscy/lpc2103.ld --- riscy.orig/lpc2103.ld 1969-12-31 19:00:00.000000000 -0500 +++ riscy/lpc2103.ld 2007-06-09 01:40:38.000000000 -0400 @@ -0,0 +1,29 @@ +/* Simple linker script for use with RiscyPygness + (Pygmy Forth for the ARM) to link the result of assembling + riscy.S + */ + +SECTIONS +{ + /* interrupt vectors start at zero */ + . = 0x0; /* start of flash */ + + .text : { *(.text) } + + /* constant data follows code but still in rom */ + .data : + { + *(.data) + *(.rom) + } + + /* . = 0x40000000; /* start of ram */ + . = 0x40000200; + /* start of ram but leave room for bootloader variables*/ + + .bss : + { + *(.bss) + *(.ram) + } +} diff -uNr riscy.orig/makefile riscy/makefile --- riscy.orig/makefile 2005-01-08 16:31:37.000000000 -0500 +++ riscy/makefile 2007-06-09 01:59:35.000000000 -0400 @@ -9,7 +9,7 @@ # Following line prevents make from deleting these intermediate files .PRECIOUS: %.o %.hex %.bin %.elf -all: riscy.elf riscy.hex riscy.bin +all: riscy.elf riscy.hex riscy.bin combo.hex clean: @ echo "...cleaning" @@ -23,24 +23,27 @@ CFLAGS = -g -Wa,-mcpu=arm7tdmi,-mapcs-32,-gstabs #LNKFLAGS = --verbose -#LNKFLAGS = -Tlpc2106.ld -nostartfiles -Lgcc -L. -LNKFLAGS = -v -T lpc2106.ld -nostartfiles +#LNKFLAGS = -Tlpc2103.ld -nostartfiles -Lgcc -L. +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 + arm-linux-gnu-gcc -E -o $*.s $< + arm-linux-gnu-as $(ASMFLAGS) -ahls=$*.lst -o $@ $*.s + +%.bin: %.elf + arm-linux-gnu-objcopy --input-target elf32-littlearm --output-target binary $< $@ %.hex: %.bin - arm-elf-objcopy --input-target binary --output-target ihex $< $*.hex + arm-linux-gnu-objcopy --input-target binary --output-target ihex $< $@ %.elf: %.o @ echo "...linking $@" - arm-elf-ld $(LNKFLAGS) -o $@ $< - arm-elf-objdump -h $@ > $*.lnkh - arm-elf-objdump -t $@ > $*.lnkt + arm-linux-gnu-ld $(LNKFLAGS) -o $@ $< + arm-linux-gnu-objdump -h $@ > $*.lnkh + arm-linux-gnu-objdump -t $@ > $*.lnkt %.dl: %.hex lpc21isp -hex $< /dev/ttyS0 115200 14746 @@ -52,3 +55,5 @@ combo9600: lpc21isp -bin combo9600.bin /dev/ttyS0 9600 14746 +combo.bin: + clisp arm diff -uNr riscy.orig/riscy.S riscy/riscy.S --- riscy.orig/riscy.S 2005-01-08 19:50:28.000000000 -0500 +++ riscy/riscy.S 2007-06-09 03:30:33.000000000 -0400 @@ -55,12 +55,12 @@ @ Timing related settings. By setting a few variables @ here, values elsewhere in the program can be calculated @ automatically. - .equ CCLK, 14745600 @ processor clock speed + .equ CCLK, 60000000 @ processor clock speed @.equ CCLK, 10000000 @ processor clock speed .equ VPBDIVISOR, 4 @ ratio of processor clock to @ peripheral clock -- must be 1, 2, or 4 - .equ BAUDRATE, 115200 + .equ BAUDRATE, 38400 @.equ BAUDRATE, 9600 .equ PCLK, CCLK / VPBDIVISOR @ most timing depends on PCLK