TARGET_LIST = platform-nc100 platform-micropack platform-pcw8256 platform-socz80 platform-zx128 platform-trs80 platform-z80pack platform-z80pack-lite
-export TARGET= msx1
-export CPU = z80
-#export TARGET = 6809test
-#export CPU = 6809
+#export TARGET= msx1
+#export CPU = z80
+export TARGET = dragon
+export CPU = 6809
#export TARGET = 6502test
#export CPU = 6502
export VERSION = "0.1"
export BINEXT = .o
else
export CROSS_AS=m6809-unknown-as
-export CROSS_LD=m6809-unknown-ld
+export CROSS_LD=lwlink
export CROSS_CC = m6809-unknown-gcc
#export CROSS_CCOPTS=-Wall -O2 -I$(ROOT_DIR)/cpu-6809 -I$(ROOT_DIR)/platform-$(TARGET) -I$(ROOT_DIR)/include
-export CROSS_CCOPTS=-c -Wall -O2 -I$(ROOT_DIR)/cpu-6809 -I$(ROOT_DIR)/platform-$(TARGET) -I$(ROOT_DIR)/include
+export CROSS_CCOPTS=-c -Wall -O2 -msoft-reg-count=4 -I$(ROOT_DIR)/cpu-6809 -I$(ROOT_DIR)/platform-$(TARGET) -I$(ROOT_DIR)/include
+export CROSS_CC_SEG2=-mcode-section=.text2
+export CROSS_CC_SEGDISC=-mcode-section=.discard
+export CROSS_CC_VIDEO=-mcode-section=.video -mdata-section=.video
export ASOPTS=
export BINEXT = .o
endif
rm -f $(OBJS) $(JUNK) core *~
image:
- $(CROSS_LD) -o ../fuzix.bin --map ../uzi.map -nostdlib crt0.o commonmem.o \
+ $(CROSS_LD) --raw -o ../fuzix.bin --map=../fuzix.map --script=fuzix.link \
+ crt0.o commonmem.o \
p6809.o ../start.o ../version.o ../lowlevel-6809.o \
tricks.o main.o ../timer.o ../kdata.o devrd.o devices.o \
../devio.o ../filesys.o ../process.o ../inode.o ../syscall_fs.o \
../syscall_proc.o ../syscall_other.o ../mm.o ../swap.o ../bank16k.o \
- ../tty.o ../devsys.o ../usermem.o ../syscall_fs2.o \
+ ../tty.o ../devsys.o ../usermem.o ../syscall_fs2.o ../syscall_exec.o \
../usermem_std-6809.o devlpr.o devtty.o libc.o
.globl istack_top
.globl istack_switched_sp
- .area _COMMONMEM
+ .area .udata
_ub: ; first 512 bytes: starts with struct u_block, with the kernel stack working down from above
_udata:
#define SWAP_SIZE 0x80 /* 64K blocks */
/* FIXME */
#define SWAPBASE 0x0000 /* We swap the lot in one, include the */
-#define SWAPTOP 0xF000 /* vectors so its a round number of sectors */
+#define SWAPTOP 0x8000 /* uarea so its a round number of sectors */
#define UDATA_BLOCKS 0 /* We swap the uarea in the data */
#define UDATA_SWAPSIZE 0
#define MAX_SWAPS 32
.globl kstack_top
; startup code @0
- .area .text
+ .area .start
+ jmp start
+
+ .area .text
start: orcc #0x10 ; interrupts definitely off
lds #kstack_top