Community-PIO-CH32V / platform-ch32v

PlatformIO platform for CH32V RISC-V chips (CH32V003, CH32V103, CH32V20x, CH32V30x, CH32X035) and CH56x, CH57x, CH58x, CH59x
Apache License 2.0
203 stars 34 forks source link

Add RISC-V toolchain package #1

Open maxgerhardt opened 1 year ago

maxgerhardt commented 1 year ago

PIO only has the SiFive variant but we want https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases to be same as the the MounRiverStudio at least.

Toolchain can still be upgraded from that.

Currently uses Windows-only packaging of toolchain fromr MounRiverStudio.

maxgerhardt commented 1 year ago

The packages have been submitted to the PIO Registry for review under the community-ch32v organization and are waiting for approval.

maxgerhardt commented 1 year ago

A temporary work-around has been implemented in ce56da04f343377acdd305ae24fcd279e2ac0cc0

microcai commented 7 months ago

any update on this?

how to use latest toolchain? c++23 is needed.

maxgerhardt commented 7 months ago

Attempted in ab4dafc5eea660b38659dc52b1c4dbbe01e6265a, 83666d585f308ad25ef66d73acbffa3b89ea76e8 and 9b032a19b9595f6c08de0a18dd3bbd2f9bd9ae0f.

The update to GCC12 was a massive failure. The Windows toolchain works fine. The Linux toolchain misses the libprintf.a file that the OpenWCH Arduino core requires and thus fails building. The Mac toolchain fails catastrophically and can't even compile core_riscv.c.

I've disabled the usage of GCC12 again in c4d8867cbaf22ab95bea08894bd7817530802afb after the failed upgrade attempt. I've emailed support about these issues already and am awaiting another toolchain update, in, maybe a month, optimistically. This needs to work properly on all OSes, not only Windows. Until then, it's not done.

maxgerhardt commented 7 months ago

Hello, thank you for using and providing feedback. We will launch a new Linux community version and macOS, Linux toolchain package after the Spring Festival.

MounRiver Studio

Okay, that sounds.. soon?

microcai commented 7 months ago

does that means, if i use nonos-sdk, then gcc-12 is fine?

microcai commented 7 months ago

Attempted in ab4dafc, 83666d5 and 9b032a1.

The update to GCC12 was a massive failure. The Windows toolchain works fine. The Linux toolchain misses the libprintf.a file that the OpenWCH Arduino core requires and thus fails building. The Mac toolchain fails catastrophically and can't even compile core_riscv.c.

I've disabled the usage of GCC12 again in c4d8867 after the failed upgrade attempt. I've emailed support about these issues already and am awaiting another toolchain update, in, maybe a month, optimistically. This needs to work properly on all OSes, not only Windows. Until then, it's not done.

riscv-windows privode riscv-none-embed while risc-linux-bin provide riscv-none-elf.

microcai commented 7 months ago

copy toolchain-riscv-windows/riscv-none-embed/lib/rv32imacxw/ilp32/libprintf.a to toolchain-riscv/riscv-none-elf/lib/rv32imac_xw/ilp32/ and build success.

maxgerhardt commented 7 months ago

I'll let MounRiver sort this one out so that we can do a clean update.

vihor3 commented 6 months ago

我会让 MounRiver 解决这个问题,以便我们可以进行干净的更新。

Currently, Linux and macos toolchains have been updated. I successfully compiled the firmware and ran it under macos using the toolchain of cmake and mousriver studio

microcai commented 6 months ago

I'll let MounRiver sort this one out so that we can do a clean update.

mainly because platform-build.py problem, force to add -lprintf flag。 and the result binary is way bigger than usual.