ysyx-workbench/abstract-machine/scripts/platform/npc.mk
xinyangli 8e4feb4010 NJU-ProjectN/abstract-machine ics2023 initialized
NJU-ProjectN/abstract-machine 3348db971fd860be5cb28e21c18f9d0e65d0c96a Merge pull request #8 from Jasonyanyusong/master
2023-12-21 00:20:42 +08:00

21 lines
751 B
Makefile

AM_SRCS := riscv/npc/start.S \
riscv/npc/trm.c \
riscv/npc/ioe.c \
riscv/npc/timer.c \
riscv/npc/input.c \
riscv/npc/cte.c \
riscv/npc/trap.S \
platform/dummy/vme.c \
platform/dummy/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
CFLAGS += -DMAINARGS=\"$(mainargs)\"
.PHONY: $(AM_HOME)/am/src/riscv/npc/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