diff --git a/Dockerfile b/Dockerfile index 69b7b686..9c0435bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/setup.sh b/setup.sh index 21036bfb..3a18536f 100644 --- a/setup.sh +++ b/setup.sh @@ -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 diff --git a/workspace/TS100/Makefile b/workspace/TS100/Makefile index 2084b781..1ca0daeb 100644 --- a/workspace/TS100/Makefile +++ b/workspace/TS100/Makefile @@ -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