NJU-ProjectN/abstract-machine ics2023 initialized
NJU-ProjectN/abstract-machine 3348db971fd860be5cb28e21c18f9d0e65d0c96a Merge pull request #8 from Jasonyanyusong/master
This commit is contained in:
parent
2824efad33
commit
8e4feb4010
129 changed files with 9017 additions and 0 deletions
29
abstract-machine/scripts/platform/nemu.mk
Normal file
29
abstract-machine/scripts/platform/nemu.mk
Normal file
|
@ -0,0 +1,29 @@
|
|||
AM_SRCS := platform/nemu/trm.c \
|
||||
platform/nemu/ioe/ioe.c \
|
||||
platform/nemu/ioe/timer.c \
|
||||
platform/nemu/ioe/input.c \
|
||||
platform/nemu/ioe/gpu.c \
|
||||
platform/nemu/ioe/audio.c \
|
||||
platform/nemu/ioe/disk.c \
|
||||
platform/nemu/mpe.c
|
||||
|
||||
CFLAGS += -fdata-sections -ffunction-sections
|
||||
LDFLAGS += -T $(AM_HOME)/scripts/linker.ld \
|
||||
--defsym=_pmem_start=0x80000000 --defsym=_entry_offset=0x0
|
||||
LDFLAGS += --gc-sections -e _start
|
||||
NEMUFLAGS += -l $(shell dirname $(IMAGE).elf)/nemu-log.txt
|
||||
|
||||
CFLAGS += -DMAINARGS=\"$(mainargs)\"
|
||||
CFLAGS += -I$(AM_HOME)/am/src/platform/nemu/include
|
||||
.PHONY: $(AM_HOME)/am/src/platform/nemu/trm.c
|
||||
|
||||
image: $(IMAGE).elf
|
||||
@$(OBJDUMP) -d $(IMAGE).elf > $(IMAGE).txt
|
||||
@echo + OBJCOPY "->" $(IMAGE_REL).bin
|
||||
@$(OBJCOPY) -S --set-section-flags .bss=alloc,contents -O binary $(IMAGE).elf $(IMAGE).bin
|
||||
|
||||
run: image
|
||||
$(MAKE) -C $(NEMU_HOME) ISA=$(ISA) run ARGS="$(NEMUFLAGS)" IMG=$(IMAGE).bin
|
||||
|
||||
gdb: image
|
||||
$(MAKE) -C $(NEMU_HOME) ISA=$(ISA) gdb ARGS="$(NEMUFLAGS)" IMG=$(IMAGE).bin
|
Loading…
Add table
Add a link
Reference in a new issue