Change kernel link type
Kernel is now compiled and linked into a raw binary instead of intel hex. This raw binary can be loaded into the correct address by the bootloader. I wanted this to be an o65 file, but ld65 kept complaining about it. Honestly though having this be a straight binary makes it easier to load, but we can't relocate it.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
CC=cl65
|
||||
CFLAGS=-T -t none -I. --cpu "65C02"
|
||||
CFLAGS=-T -t super6502 -I. --cpu "65C02"
|
||||
test: CFLAGS=-T -t sim65c02 -I.
|
||||
LDFLAGS=-C link.ld -m $(NAME).map
|
||||
SIM=sim65
|
||||
SIMARGS=-v -c -x 1000000
|
||||
|
||||
NAME=bootrom
|
||||
NAME=kernel
|
||||
|
||||
TEST_BIN=test.bin
|
||||
BIN=$(NAME).bin
|
||||
@@ -24,7 +24,7 @@ TEST_OBJS+=$(patsubst %.s,%.o,$(filter %s,$(TEST_SRCS)))
|
||||
TEST_OBJS+=$(patsubst %.c,%.o,$(filter %c,$(TEST_SRCS)))
|
||||
TEST_OBJS+=$(filter-out boot.o,$(filter-out main.o,$(filter-out vectors.o,$(OBJS))))
|
||||
|
||||
all: $(HEX)
|
||||
all: $(BIN)
|
||||
|
||||
test: $(TEST_BIN)
|
||||
$(SIM) $(SIMARGS) $(TEST_BIN)
|
||||
|
||||
@@ -2,7 +2,7 @@ MEMORY
|
||||
{
|
||||
ZP: start = $0, size = $100, type = rw, define = yes;
|
||||
SDRAM: start = $200, size = $7cf0, type = rw, define = yes;
|
||||
ROM: start = $8000, size = $8000, fill = yes, fillval = $ff, file = %O;
|
||||
ROM: start = $D000, size = $3000, file = %O;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
|
||||
Reference in New Issue
Block a user