diff --git a/.github/workflows/WCH_V307_RISC-V.yml b/.github/workflows/WCH_V307_RISC-V.yml index a74001a..c83aeef 100644 --- a/.github/workflows/WCH_V307_RISC-V.yml +++ b/.github/workflows/WCH_V307_RISC-V.yml @@ -5,23 +5,25 @@ on: - '**' pull_request: jobs: - target-gcc-riscv-none-embed: + target-gcc-riscv32-unknown-elf: runs-on: ubuntu-latest defaults: run: shell: bash steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: '0' - name: update-tools run: | - wget --no-check-certificate https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/download/v10.2.0-1.2/xpack-riscv-none-embed-gcc-10.2.0-1.2-linux-x64.tar.gz - tar -xvzf xpack-riscv-none-embed-gcc-10.2.0-1.2-linux-x64.tar.gz - working-directory: ./Build - - name: target-riscv-none-embed + wget --no-check-certificate https://buildbot.embecosm.com/job/riscv32-gcc-ubuntu2204-release/10/artifact/riscv32-embecosm-ubuntu2204-gcc13.2.0.tar.gz + tar -xzf riscv32-embecosm-ubuntu2204-gcc13.2.0.tar.gz -C ${{ runner.workspace }} + working-directory: ./ + - name: target-riscv32-unknown-elf run: | - PATH=./xpack-riscv-none-embed-gcc-10.2.0-1.2/bin:$PATH + PATH="${{ runner.workspace }}/riscv32-embecosm-ubuntu2204-gcc13.2.0/bin:$PATH" + echo 'query compiler version' + riscv32-unknown-elf-g++ -v bash ./Rebuild.sh ls -la ../Output/BareMetal_WCH_V307_RISC-V.hex working-directory: ./Build diff --git a/Build/Makefile b/Build/Makefile index d293e99..a17478c 100644 --- a/Build/Makefile +++ b/Build/Makefile @@ -27,7 +27,7 @@ ERR_MSG_FORMATER_SCRIPT = ../Tools/Scripts/CompilerErrorFormater.py # Toolchain ############################################################################################ -TOOLCHAIN = riscv-none-embed +TOOLCHAIN = riscv32-unknown-elf AS = $(TOOLCHAIN)-g++ CC = $(TOOLCHAIN)-g++ CPP = $(TOOLCHAIN)-g++ @@ -36,7 +36,7 @@ OBJDUMP = $(TOOLCHAIN)-objdump OBJCOPY = $(TOOLCHAIN)-objcopy READELF = $(TOOLCHAIN)-readelf -PYTHON = python +PYTHON = python3 ############################################################################################ # Optimization Compiler flags @@ -157,11 +157,11 @@ endif ############################################################################################ # Source Files ############################################################################################ -SRC_FILES := $(SRC_DIR)/Appli/main.c \ +SRC_FILES := $(SRC_DIR)/Appli/main.c \ $(SRC_DIR)/Mcal/Mcu.c \ $(SRC_DIR)/Mcal/SysTick.c \ - $(SRC_DIR)/Startup/boot.s \ - $(SRC_DIR)/Startup/intvect.c \ + $(SRC_DIR)/Startup/boot.s \ + $(SRC_DIR)/Startup/intvect.c \ $(SRC_DIR)/Startup/Startup.c ############################################################################################ diff --git a/Code/Appli/main.c b/Code/Appli/main.c index f18377b..cbe7b92 100644 --- a/Code/Appli/main.c +++ b/Code/Appli/main.c @@ -1,11 +1,20 @@ #include "SysTick.h" +// cd /mnt/c/Users/ckorm/Documents/Ks/uC_Software/Boards/WCH_V307_RISC-V +// wget --no-check-certificate https://buildbot.embecosm.com/job/riscv32-gcc-ubuntu2204-release/10/artifact/riscv32-embecosm-ubuntu2204-gcc13.2.0.tar.gz +// tar -xzf riscv32-embecosm-ubuntu2204-gcc13.2.0.tar.gz -C /mnt/c/Users/ckorm/Documents/Ks/uC_Software/Boards/WCH_V307_RISC-V +// PATH="/mnt/c/Users/ckorm/Documents/Ks/uC_Software/Boards/WCH_V307_RISC-V/riscv32-embecosm-ubuntu2204-gcc13.2.0/bin:$PATH" +// cd Build +// bash ./Rebuild.sh int main(void) { SysTick_Init(); SysTick_Start(SYSTICK_TIMEOUT_SEC(1)); - for(;;); -} \ No newline at end of file + for(;;) + { + ; + } +}