diff options
author | Nao Pross <naopross@thearcway.org> | 2017-10-19 17:52:58 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2017-10-19 17:52:58 +0200 |
commit | fe1ac63fc152ea70bc32b9d514841a5f806838ed (patch) | |
tree | 434d336625c9564ec20ddc2834b72f5551f53856 /sw/z80/tests/pio/makefile | |
parent | Move test units to z80/tests, and drivers are now statically linked (diff) | |
download | z80uPC-fe1ac63fc152ea70bc32b9d514841a5f806838ed.tar.gz z80uPC-fe1ac63fc152ea70bc32b9d514841a5f806838ed.zip |
Fix for PIO driver and its test and deletes build files
Diffstat (limited to 'sw/z80/tests/pio/makefile')
-rw-r--r-- | sw/z80/tests/pio/makefile | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/sw/z80/tests/pio/makefile b/sw/z80/tests/pio/makefile index bd9d5bf..5c3716c 100644 --- a/sw/z80/tests/pio/makefile +++ b/sw/z80/tests/pio/makefile @@ -1,13 +1,13 @@ #### # source code settings # -NAME := pio_test +OSNAME := pio_test -CSOURCES := $(wildcard *.c) +CSOURCES := $(wildcard *.c) OBJECTS := $(patsubst %.c,build/%.rel,$(CSOURCES)) -HEXFILE := build/$(NAME).hex -BINARY := build/$(NAME).bin +HEXFILE := build/$(OSNAME).hex +BINARY := build/$(OSNAME).bin ### # compiler settings @@ -15,26 +15,31 @@ BINARY := build/$(NAME).bin CC := sdcc CFLAGS := -mz80 \ - -pedantic \ + --allow-unsafe-read \ -I . \ -I ../../arch \ -I ../../drivers/include \ -DDEBUG LDFLAGS := -mz80 \ - -L ../../drivers/build/ \ - -l drivers.a \ --no-std-crt0 build/crt0.rel \ - --code-loc 0x0800 \ - --data-loc 0x2000 + -L ../../drivers/build \ + -l drivers.a \ + -pedantic -.PHONY: dirs dis clean + # --code-loc 0x0120 \ + # --data-loc 0x2000 + +.PHONY: flash dirs dis clean all: $(BINARY) +flash: $(BINARY) + minipro -p M28C64 -w $< + # build binary $(BINARY): $(OBJECTS) dirs $(CC) $(LDFLAGS) $(OBJECTS) -o $(HEXFILE) - makebin -s 8192 $(HEXFILE) $(BINARY) + makebin -s 8192 -yo 1 $(HEXFILE) $(BINARY) $(OBJECTS): build/%.rel : %.c $(CSOURCES) dirs build/crt0.rel @printf "\n" @@ -48,9 +53,14 @@ dirs: mkdir -p build dis: $(BINARY) - @# z80dasm -a -l -g 0h $< -o build/$(OSNAME).s - dz80 -b -n $< + #dz80 -b -n $< + r2 -a z80 $< -A \ + -c 'afr main 0x200; \ + pd 0x10; \ + s 0x100; \ + pd 10; \ + s 0x200; \ + pd 0x40' \ clean: - - rm -rd build/* - - rm crt0.rel + - rm -rd build |