mirror of
https://github.com/retroSoC/retroSoC.git
synced 2026-11-04 22:32:36 +00:00
chore: put all codes into different src and inc dirs
This commit is contained in:
36 files changed
+35
-24
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+35
-24
@@ -2,37 +2,48 @@
|
||||
FIRMWARE_NAME := retrosoc_fw
|
||||
|
||||
CROSS=riscv32-unknown-elf-
|
||||
|
||||
CP = $(CROSS)cpp
|
||||
CC = $(CROSS)gcc
|
||||
OBJC = $(CROSS)objcopy
|
||||
DUMP = $(CROSS)objdump
|
||||
|
||||
CFLAGS := -mabi=ilp32 \
|
||||
-march=rv32im \
|
||||
-Wl,-Bstatic,-T,retrosoc_sections.lds,--strip-debug \
|
||||
-ffreestanding \
|
||||
-nostdlib
|
||||
|
||||
SRC_PATH := ../../../crt/start.s \
|
||||
../../../crt/tinyuart.c \
|
||||
../../../crt/tinystring.c \
|
||||
../../../crt/tinyprintf.c \
|
||||
../../../crt/tinygpio.c \
|
||||
../../../crt/tinytim.c \
|
||||
../../../crt/tinyarchinfo.c \
|
||||
../../../crt/tinyrng.c \
|
||||
../../../crt/tinyhpuart.c \
|
||||
../../../crt/tinypwm.c \
|
||||
../../../crt/tinyps2.c \
|
||||
../../../crt/tinyi2c.c \
|
||||
../../../crt/tinylcd.c \
|
||||
../../../crt/tinypsram.c \
|
||||
../../../crt/tinybench.c \
|
||||
../../../crt/tinysh.c \
|
||||
../../../crt/firmware.c
|
||||
PRJ_ROOT_PATH = ../../..
|
||||
|
||||
LDS_PATH := ../../../crt/sections.lds
|
||||
SRC_PATH := $(PRJ_ROOT_PATH)/crt/start.s \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinyuart.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinystring.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinyprintf.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinygpio.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinytim.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinyarchinfo.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinyrng.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinyhpuart.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinypwm.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinyps2.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinyi2c.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinylcd.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinypsram.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinybench.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/tinysh.c \
|
||||
$(PRJ_ROOT_PATH)/crt/src/firmware.c
|
||||
|
||||
LDS_PATH := $(PRJ_ROOT_PATH)/crt/sections.lds
|
||||
|
||||
# %.o: %.c %.h $(DEPS)
|
||||
# $(CROSS)
|
||||
|
||||
$(FIRMWARE_NAME).elf:
|
||||
@mkdir -p .sw_build
|
||||
cd .sw_build && ($(CROSS)cpp -P -o retrosoc_sections.lds $(LDS_PATH))
|
||||
cd .sw_build && ($(CROSS)gcc $(CFLAGS) -I../../../crt -o $@ $(SRC_PATH))
|
||||
cd .sw_build && ($(CROSS)objcopy -O verilog $@ $(FIRMWARE_NAME).hex)
|
||||
cd .sw_build && (sed -i 's/@30000000/@00000000/g' retrosoc_fw.hex)
|
||||
cd .sw_build && ($(CROSS)objcopy -O binary $@ $(FIRMWARE_NAME).bin)
|
||||
cd .sw_build && ($(CROSS)objdump -d $@ > $(FIRMWARE_NAME).txt)
|
||||
cd .sw_build && ($(CP) -P -o retrosoc_sections.lds $(LDS_PATH))
|
||||
cd .sw_build && ($(CC) $(CFLAGS) -I$(PRJ_ROOT_PATH)/crt/inc -o $@ $(SRC_PATH))
|
||||
cd .sw_build && ($(OBJC) -O verilog $@ $(FIRMWARE_NAME).hex)
|
||||
cd .sw_build && (sed -i 's/@30000000/@00000000/g' $(FIRMWARE_NAME).hex)
|
||||
cd .sw_build && ($(OBJC) -O binary $@ $(FIRMWARE_NAME).bin)
|
||||
cd .sw_build && ($(DUMP) -d $@ > $(FIRMWARE_NAME).txt)
|
||||
Reference in new issue
Block a user