Move to nuclei compiler
This commit is contained in:
@@ -14,10 +14,10 @@ RUN apt-get update && \
|
|||||||
wget && \
|
wget && \
|
||||||
apt-get clean
|
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://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
|
# Add compiler to the path
|
||||||
ENV PATH "/build/gcc-arm-none-eabi-9-2020-q2-update/bin:$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 . /build/source
|
||||||
COPY ./ci /build/ci
|
COPY ./ci /build/ci
|
||||||
|
|||||||
4
setup.sh
4
setup.sh
@@ -7,9 +7,9 @@ sudo mkdir /build
|
|||||||
cd /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://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
|
# 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/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
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ S_SRCS := $(shell find $(PINE_INC_DIR) -type f -name '*.S')
|
|||||||
ASM_INC = -I$(PINE_RISCV_INC_DIR)
|
ASM_INC = -I$(PINE_RISCV_INC_DIR)
|
||||||
LDSCRIPT=GD32VF103xB.ld
|
LDSCRIPT=GD32VF103xB.ld
|
||||||
DEV_LDFLAGS=-nostartfiles -Xlinker
|
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_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_CFLAGS= -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
|
||||||
DEV_CXXFLAGS= -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
|
DEV_CXXFLAGS= -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
|
||||||
flash_size=128k
|
flash_size=128k
|
||||||
@@ -154,7 +154,7 @@ ifeq ($(model),Pinecil)
|
|||||||
CPUFLAGS= -march=rv32imac \
|
CPUFLAGS= -march=rv32imac \
|
||||||
-mabi=ilp32 \
|
-mabi=ilp32 \
|
||||||
-mtune=size \
|
-mtune=size \
|
||||||
-mcmodel=medlow \
|
-mcmodel=medany \
|
||||||
-DGD32VF103C_START \
|
-DGD32VF103C_START \
|
||||||
-DUSE_STDPERIPH_DRIVER
|
-DUSE_STDPERIPH_DRIVER
|
||||||
endif
|
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
|
$(OUT_OBJS): $(OUTPUT_DIR)/%.o : %.c Makefile
|
||||||
@test -d $(@D) || mkdir -p $(@D)
|
@test -d $(@D) || mkdir -p $(@D)
|
||||||
@echo Compiling ${<}
|
@echo Compiling ${<}
|
||||||
@echo @$(CC) -c $(CFLAGS) $< -o $@
|
|
||||||
@$(CC) -c $(CFLAGS) $< -o $@
|
@$(CC) -c $(CFLAGS) $< -o $@
|
||||||
@$(OBJDUMP) -d -S $@ > $@.lst
|
@$(OBJDUMP) -d -S $@ > $@.lst
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user