hydrausb3 / hydrausb3_fw

HydraUSB3 (WCH CH569) open source test firmware / examples / libraries to experiment with streaming / high-speed protocols (USB2 HS, USB3 SS, HSPI, SerDes...)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Little change in Makefiles to allow easy swap to the "WCH-Interrupt-fast" toolchain

doegox opened this issue · comments

Hi

If you change in all Makefile as follows

-BASE_OPTS = -march=rv32imac -mabi=ilp32 -msmall-data-limit=8 $(OPTIM_OPTS) -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections
+RISCV_ARCH ?= rv32imac
+BASE_OPTS = -march=$(RISCV_ARCH) -mabi=ilp32 -msmall-data-limit=8 $(OPTIM_OPTS) -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections

then to apply the "WCH-Interrupt-fast" toolchain, one doesn't need to patch the examples as specified in https://github.com/hydrausb3/riscv-none-elf-gcc-xpack/releases/tag/12.2.0-1, but he can just do

make COMPILER_PREFIX=riscv-none-elf RISCV_ARCH=rv32imac_zicsr

It is a good idea but such modifications cannot be applied easily today to be compatible with both toolchain especially the MounRiver IDE as it requires some modifications in Eclipse project (which will need to specify COMPILER_PREFIX & RISCV_ARCH)
So to be studied to have something which work easily in both world proprietary toolchain with and without MounRiver IDE and the open source xPack GNU RISC-V Embedded GCC v12.2.0-1 toolchain

Fixed with commit e1707dc