aboutsummaryrefslogtreecommitdiff
path: root/newasm/Makefile
diff options
context:
space:
mode:
authorJacques Comeaux <jacquesrcomeaux@protonmail.com>2024-08-24 01:14:04 -0500
committerJacques Comeaux <jacquesrcomeaux@protonmail.com>2024-08-24 01:14:04 -0500
commitee01f1a7f1e10be78bcceb4f0f42aa352a6a588f (patch)
tree271e7034ee94e4447784db5b31bf8e332b30fbba /newasm/Makefile
parent80d8f3ae48255f786bd4d52a1819ea0c339f6946 (diff)
Add parsers for basic instruction typesHEADmaster
Diffstat (limited to 'newasm/Makefile')
-rw-r--r--newasm/Makefile28
1 files changed, 15 insertions, 13 deletions
diff --git a/newasm/Makefile b/newasm/Makefile
index fd057fe..78a0828 100644
--- a/newasm/Makefile
+++ b/newasm/Makefile
@@ -2,40 +2,42 @@ PICO = /dev/disk/by-label/RPI-RP2
DEVICE = /dev/ttyUSB0
.PHONY: build
-build: parse.he
+build: assemble.he
-parse.he: parse.bin
- od -An -tx2 -v parse.bin | sed "s/^ //" | tr " " "\n" | tr [:lower:] [:upper:] | sed "s/^/0x/" > parse.he
+assemble.he: assemble.bin
+ od -An -tx2 -v assemble.bin | sed "s/^ //" | tr " " "\n" | tr [:lower:] [:upper:] | sed "s/^/0x/" > assemble.he
-parse.bin: parse.elf
- arm-none-eabi-objcopy -O binary parse.elf parse.bin
+assemble.bin: assemble.elf
+ arm-none-eabi-objcopy -O binary assemble.elf assemble.bin
objects = main.o uart.o data.o string.o input.o \
statement.o optable.o \
+ regreg.o regregimm.o regimm.o regregreg.o imm.o \
parsers/whitespace.o \
parsers/label.o \
parsers/symbol.o \
parsers/opcode.o \
parsers/register.o \
- parsers/decimal.o
+ parsers/decimal.o \
+ parsers/immediate.o
-parse.elf: pico_bin.ld $(objects)
- arm-none-eabi-ld -T pico_bin.ld -o parse.elf $(objects)
+assemble.elf: pico_bin.ld $(objects)
+ arm-none-eabi-ld -T pico_bin.ld -o assemble.elf $(objects)
$(objects): %.o: %.s
arm-none-eabi-as -o $@ $<
.PHONY: clean
clean:
- rm -f parse.elf parse.bin parse.he slowcat $(objects)
+ rm -f assemble.elf assemble.bin assemble.he slowcat $(objects)
.PHONY: dump
-dump: parse.bin
- @od -Ax -tx2 -v parse.bin
+dump: assemble.bin
+ @od -Ax -tx2 -v assemble.bin
.PHONY: serial
-serial: $(DEVICE) parse.he slowcat
- cat parse.he | tr "\n" "\r" | ./slowcat | picocom -b 115200 -q $(DEVICE)
+serial: $(DEVICE) assemble.he slowcat
+ cat assemble.he | tr "\n" "\r" | ./slowcat | picocom -b 115200 -q $(DEVICE)
@echo
echo -n "G" | picocom -b 115200 -q $(DEVICE)
@echo