1
0
forked from me/IronOS

Move to nuclei compiler

This commit is contained in:
Ben V. Brown
2020-10-13 22:31:46 +11:00
parent c8182aa192
commit 3e62afc455
3 changed files with 7 additions and 8 deletions

View File

@@ -14,10 +14,10 @@ RUN apt-get update && \
wget && \
apt-get clean
RUN wget -qO- https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 | tar -xj
RUN wget -qO- https://github.com/riscv-mcu/riscv-gnu-toolchain/releases/download/v9.2RC/rv_linux_bare_1908312208.tar.bz2 | tar -xj
RUN wget -qO- https://github.com/Ralim/nuclei-compiler/releases/download/2020.08/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2 | tar -xj
# Add compiler to the path
ENV PATH "/build/gcc-arm-none-eabi-9-2020-q2-update/bin:$PATH"
ENV PATH "/build/rv_linux_bare_1908312208/bin/:$PATH"
ENV PATH "/build/gcc/bin/:$PATH"
COPY . /build/source
COPY ./ci /build/ci

View File

@@ -7,9 +7,9 @@ sudo mkdir /build
cd /build
sudo wget -qO- https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 | sudo tar -xj
sudo wget -qO- https://github.com/riscv-mcu/riscv-gnu-toolchain/releases/download/v9.2RC/rv_linux_bare_1908312208.tar.bz2 | sudo tar -xj
sudo wget -qO- https://github.com/Ralim/nuclei-compiler/releases/download/2020.08/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2 | sudo tar -xj
# Add compiler to the path
sudo ln -s /build/gcc-arm-none-eabi-9-2020-q2-update/bin/* /usr/local/bin
sudo ln -s /build/rv_linux_bare_1908312208/bin/* /usr/local/bin
sudo ln -s /build/gcc/bin/* /usr/local/bin

View File

@@ -69,8 +69,8 @@ DEVICE_BSP_DIR = ./Core/BSP/Pine64
S_SRCS := $(shell find $(PINE_INC_DIR) -type f -name '*.S')
ASM_INC = -I$(PINE_RISCV_INC_DIR)
LDSCRIPT=GD32VF103xB.ld
DEV_LDFLAGS=-nostartfiles -Xlinker
DEV_GLOBAL_DEFS=-msmall-data-limit=8 -mno-save-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common
DEV_LDFLAGS=-nostartfiles -Xlinker
DEV_GLOBAL_DEFS=-msmall-data-limit=8 -mno-save-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -fabi-version=0
DEV_CFLAGS= -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
DEV_CXXFLAGS= -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
flash_size=128k
@@ -154,7 +154,7 @@ ifeq ($(model),Pinecil)
CPUFLAGS= -march=rv32imac \
-mabi=ilp32 \
-mtune=size \
-mcmodel=medlow \
-mcmodel=medany \
-DGD32VF103C_START \
-DUSE_STDPERIPH_DRIVER
endif
@@ -292,7 +292,6 @@ $(OUT_HEXFILE).elf : $(OUT_OBJS_S) $(OUT_OBJS) $(OUT_OBJS_CPP) Makefile $(LDSCR
$(OUT_OBJS): $(OUTPUT_DIR)/%.o : %.c Makefile
@test -d $(@D) || mkdir -p $(@D)
@echo Compiling ${<}
@echo @$(CC) -c $(CFLAGS) $< -o $@
@$(CC) -c $(CFLAGS) $< -o $@
@$(OBJDUMP) -d -S $@ > $@.lst