First upload. Untested software

This commit is contained in:
2026-04-08 17:02:29 +02:00
commit 9b83763318
11 changed files with 698 additions and 0 deletions
+34
View File
@@ -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