WCH has based its RISC-V toolchain on the xPack builds from Liviu Ionescu:
https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/tag/v8.2.0-3.1/
Both output the same version string:
riscv-none-embed-gcc.exe?(xPack?GNU?RISC-V?Embedded?GCC,?32-bit)?8.2.0 Copyright?(C)?2018?Free?Software?Foundation,?Inc. This?is?free?software;?see?the?source?for?copying?conditions.??There?is?NO warranty;?not?even?for?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.
However, there are some minor differences between the RISC-V toolchain from WCH and the one from xPack. The WCH toolchain supports a few more RISC-V instruction sets, like:
?- rv32ecwx
?- rv32imacxw
?- rv32imafcxw
Question 1:
The 'w' and 'x' letters are non-standard extensions. What do they stand for?
I also notice that the WCH toolchain has the following libraries that don't appear anywhere in the native xPack toolchain:
?- libIQMath_RV32.a
?- libprintf.a
?- libprintfloat.a
Question 2:
What are these non-standard libraries for? I was able to build a sample project with both the WCH toolchain and the native xPack toolchain. In both cases, the printf() function worked just fine, sending characters over the TX line. So I wonder what the libprintf.a library is used for, if the setup works without that library?
Question 3:
Where can I find the source code of the WCH toolchain, and the build instructions?
Thank you very much.