First upload. Untested software
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Makefile for Amiga Joystick and Mouse Emulation on Milk-V Duo
|
||||
# Baremetal Implementation (Targets SRAM at 0x0E000000)
|
||||
|
||||
#/* Baremetal Risc-V USB <=> Amiga Joystick/Mouse HID converter.
|
||||
#* March 2026 - Anders Holck
|
||||
#* This software has no license. If you choose to use, please include my name :)
|
||||
#*/
|
||||
|
||||
CROSS_COMPILE = riscv64-unknown-elf-
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
LD = $(CROSS_COMPILE)ld
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
|
||||
# Baremetal flags
|
||||
CFLAGS = -march=rv64gc -mabi=lp64d -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -ffreestanding -O2 -T linker.ld
|
||||
LDFLAGS = -static -nostdlib -T linker.ld
|
||||
|
||||
TARGET = amiga_joystick_mouse.elf
|
||||
BIN = amiga_joystick_mouse.bin
|
||||
SRCS = startup.s main.c amiga_hw.c usb_dwc2.c
|
||||
|
||||
all: $(BIN)
|
||||
|
||||
$(TARGET): $(SRCS)
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
|
||||
$(BIN): $(TARGET)
|
||||
$(OBJCOPY) -O binary $< $@
|
||||
|
||||
clean:
|
||||
rm -f *.o $(TARGET) $(BIN)
|
||||
|
||||
.PHONY: all clean
|
||||
Reference in New Issue
Block a user