mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Initial test framework
Clean up makefiles Everything buildable under docker (or natively)
This commit is contained in:
parent
5a0c70a017
commit
da7f70c456
48 changed files with 7254 additions and 293 deletions
|
|
@ -1,27 +1,7 @@
|
|||
PROJECT:=helloworld
|
||||
|
||||
DOCKER_IMAGE=riscv-dev
|
||||
DOCKER_CMD:=docker run --rm -v ${PWD}../../../:/data -w /data/apps/${PROJECT} ${DOCKER_IMAGE}
|
||||
PREFIX:=${DOCKER_CMD} riscv64-unknown-elf-
|
||||
CFLAGS+=-I../../common
|
||||
CFLAGS+=-fno-stack-protector
|
||||
CFLAGS+=-static-libgcc -fdata-sections -ffunction-sections
|
||||
CFLAGS+=-g -Os -march=rv32ima_zicsr -mabi=ilp32 -static
|
||||
LDFLAGS:= -T ../linker.ld -nostdlib -Wl,--gc-sections
|
||||
LIBS:= #-lgcc # needed for softfp
|
||||
|
||||
SRCS=${PROJECT}.c ../crt0.S
|
||||
|
||||
all:
|
||||
${PREFIX}gcc -o ${PROJECT}.elf ${CFLAGS} ${LDFLAGS} ${SRCS} ${LIBS}
|
||||
$(PREFIX)objcopy ${PROJECT}.elf -O binary ${PROJECT}.bin
|
||||
|
||||
disasm: all
|
||||
$(PREFIX)objdump -S -d -f ${PROJECT}.elf
|
||||
|
||||
test: all
|
||||
../../host/host ${PWD}/${PROJECT}.bin
|
||||
|
||||
clean:
|
||||
rm -f ${PROJECT}.o ${PROJECT}.elf ${PROJECT}.bin
|
||||
|
||||
TOPDIR=../../
|
||||
PROJECT:=$(shell basename ${PWD})
|
||||
SRCS=${PROJECT}.c ${TOPDIR}/apps/crt0.S
|
||||
all: all_common
|
||||
test: test_common
|
||||
clean: clean_common
|
||||
include ${TOPDIR}/apps/makefile.common
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue