Use our own toolchain instead of the one in the image
Now that we are adding our own target we can compile our own toolchain instead of using the stock one. This does mean that there isn't really a purpose to using the alpine cc65 image though
This commit is contained in:
@@ -3,20 +3,32 @@ default:
|
|||||||
- docker
|
- docker
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- build_toolchain
|
||||||
- build_sw
|
- build_sw
|
||||||
- build_hw
|
- build_hw
|
||||||
- test
|
- test
|
||||||
|
|
||||||
|
build-cc65:
|
||||||
|
stage: build_toolchain
|
||||||
|
image: gcc
|
||||||
|
script:
|
||||||
|
- cd sw
|
||||||
|
- make toolchain
|
||||||
|
|
||||||
build-kernel:
|
build-kernel:
|
||||||
stage: build_sw
|
stage: build_sw
|
||||||
image: a2geek/cc65-pipeline
|
image: gcc
|
||||||
script:
|
script:
|
||||||
- cd sw/kernel
|
- cd sw/kernel
|
||||||
- make
|
- make
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- sw/cc65/bin
|
||||||
|
- sw/cc65/lib
|
||||||
|
|
||||||
build-bootloader:
|
build-bootloader:
|
||||||
stage: build_sw
|
stage: build_sw
|
||||||
image: a2geek/cc65-pipeline
|
image: gcc
|
||||||
script:
|
script:
|
||||||
- cd sw/bootloader
|
- cd sw/bootloader
|
||||||
- make
|
- make
|
||||||
@@ -53,7 +65,7 @@ test_bb_spi:
|
|||||||
|
|
||||||
test-sw:
|
test-sw:
|
||||||
stage: test
|
stage: test
|
||||||
image: a2geek/cc65-pipeline
|
image: gcc
|
||||||
script:
|
script:
|
||||||
- cd sw/kernel
|
- cd sw/kernel
|
||||||
- make test
|
- make test
|
||||||
|
|||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "sw/cc65"]
|
||||||
|
path = sw/cc65
|
||||||
|
url = https://git.byronlathi.com/bslathi19/cc65
|
||||||
@@ -1,11 +1,14 @@
|
|||||||
.PHONY: all install bootloader kernel clean
|
.PHONY: all install bootloader kernel clean
|
||||||
|
|
||||||
all: bootloader kernel
|
all: toolchain bootloader kernel
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
sh script/format_disk.sh
|
sh script/format_disk.sh
|
||||||
sh script/copy_files.sh
|
sh script/copy_files.sh
|
||||||
|
|
||||||
|
toolchain:
|
||||||
|
@$(MAKE) -j4 -C cc65
|
||||||
|
|
||||||
bootloader:
|
bootloader:
|
||||||
@$(MAKE) -C bootloader
|
@$(MAKE) -C bootloader
|
||||||
|
|
||||||
@@ -15,4 +18,5 @@ kernel:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
@$(MAKE) -C bootloader --no-print-directory $@
|
@$(MAKE) -C bootloader --no-print-directory $@
|
||||||
@$(MAKE) -C kernel --no-print-directory $@
|
@$(MAKE) -C kernel --no-print-directory $@
|
||||||
|
@$(MAKE) -C cc65 --no-print-directory $@
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
CC=cl65
|
CC=../cc65/bin/cl65
|
||||||
CFLAGS=-T -t none -I. --cpu "65C02"
|
CFLAGS=-T -t none -I. --cpu "65C02"
|
||||||
test: CFLAGS=-T -t sim65c02 -I.
|
test: CFLAGS=-T -t sim65c02 -I.
|
||||||
LDFLAGS=-C link.ld -m $(NAME).map
|
LDFLAGS=-C link.ld -m $(NAME).map
|
||||||
|
|||||||
1
sw/cc65
Submodule
1
sw/cc65
Submodule
Submodule sw/cc65 added at 23a984f0dd
@@ -1,5 +1,5 @@
|
|||||||
CC=cl65
|
CC=../cc65/bin/cl65
|
||||||
CFLAGS=-T -t none -I. --cpu "65C02"
|
CFLAGS=-T -t super6502 -I. --cpu "65C02"
|
||||||
test: CFLAGS=-T -t sim65c02 -I.
|
test: CFLAGS=-T -t sim65c02 -I.
|
||||||
LDFLAGS=-C link.ld -m $(NAME).map
|
LDFLAGS=-C link.ld -m $(NAME).map
|
||||||
SIM=sim65
|
SIM=sim65
|
||||||
|
|||||||
@@ -29,9 +29,10 @@ _init: LDX #$FF ; Initialize stack pointer to $01FF
|
|||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Set cc65 argument stack pointer
|
; Set cc65 argument stack pointer
|
||||||
|
|
||||||
LDA #<(__SDRAM_START__ + __SDRAM_SIZE__)
|
;LDA #<(__SDRAM_START__ + __SDRAM_SIZE__)
|
||||||
|
lda #<($200 + $7cf0)
|
||||||
STA sp
|
STA sp
|
||||||
LDA #>(__SDRAM_START__ + __SDRAM_SIZE__)
|
LDA #>($200 + $7cf0)
|
||||||
STA sp+1
|
STA sp+1
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ void exec(char* filename) {
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
ret = (*exec)();
|
//ret = (*exec)();
|
||||||
|
|
||||||
cprintf("ret: %x\n", ret);
|
cprintf("ret: %x\n", ret);
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,16 @@ MEMORY
|
|||||||
{
|
{
|
||||||
ZP: start = $0, size = $100, type = rw, define = yes;
|
ZP: start = $0, size = $100, type = rw, define = yes;
|
||||||
SDRAM: start = $200, size = $7cf0, type = rw, define = yes;
|
SDRAM: start = $200, size = $7cf0, type = rw, define = yes;
|
||||||
ROM: start = $D000, size = $3000, file = %O;
|
ROM: start = $C000, size = $4000, type = rw, define = yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES {
|
||||||
|
%O: format = o65;
|
||||||
}
|
}
|
||||||
|
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||||
DATA: load = ROM, type = rw, define = yes, run = SDRAM;
|
DATA: load = SDRAM, type = rw, define = yes;
|
||||||
BSS: load = SDRAM, type = bss, define = yes;
|
BSS: load = SDRAM, type = bss, define = yes;
|
||||||
HEAP: load = SDRAM, type = bss, optional = yes;
|
HEAP: load = SDRAM, type = bss, optional = yes;
|
||||||
STARTUP: load = ROM, type = ro;
|
STARTUP: load = ROM, type = ro;
|
||||||
|
|||||||
Reference in New Issue
Block a user