openwch / arduino_core_ch32

Core library for CH32duino
249 stars 42 forks source link

No Linux/Ubuntu riscv-none-embed-gcc compiler available #10

Closed lbattraw closed 9 months ago

lbattraw commented 1 year ago

I tried adding this core to my v1.8.19 Arduino IDE board manager on my Ubuntu 22.04/"Jammy Jellyfish" x86 Linux and got the error: Tool riscv-none-embed-gcc is not available for your operating system.

I also tried v2.2.1 of the Arduino IDE and got a similar error: Downloading packages Failed to install platform: WCH:ch32v. Error: 13 INTERNAL: Error downloading tool WCH:riscv-none-embed-gcc@8.2.0: no versions available for the current OS, try contacting tech@wch.cn

Is this core only available for Windows? Also is there anything I can do to help get this OS supported for arduino_core_ch32?

taunoe commented 1 year ago

I have the same problem :(

maxgerhardt commented 1 year ago

The compiler for Linux and Mac is available, it's just not listed in the package index.

https://raw.githubusercontent.com/openwch/board_manager_files/main/package_ch32v_index.json

The raw toolchains can be gotten from http://www.mounriver.com/download or my mirrors

Still, the people in this repo need to fix it.

I'm integrating this core into PlatformIO, where a CH32V003 example compiles fine on Windows, Linux and Mac. Currently work in progress.

mayermakes commented 9 months ago

Same behaviour on Arduino IDE 2.2.1 Failed to install platform: 'WCH:ch32v:1.0.3'. Error: 13 INTERNAL: Error downloading tool WCH:riscv-none-embed-gcc@8.2.0: no versions available for the current OS, try contacting tech@wch.cn

maxgerhardt commented 9 months ago

You know what, let me just whip up an expanded package_ch32v_index.json version that just has links to my repos for the missing toolchains. That should actually make it go through.

Edit: Let's see how https://gist.githubusercontent.com/maxgerhardt/e270b2c3294a5f7a6cfd9e2d0d16382e/raw/7fdea01979081749fac9c1e092147ea93fd8a951/arduinowch_package_index.json goes...

maxgerhardt commented 9 months ago

The URL

https://gist.githubusercontent.com/maxgerhardt/e270b2c3294a5f7a6cfd9e2d0d16382e/raw/803a5ca106af2aa3336c508674ad72f0c152ba2b/arduinowch_package_index.json

works for me with Linux.

grafik

grafik

Don't have time to repackage OpenOCD for Mac (and besides the Linux hoster at catbox is just temporary), but it does prove the concept..

mayermakes commented 9 months ago

Confirmed working onArduino IDE 2.2.1,& Arduino IDE 1.8.19 does install and compiles minimal example.

Thank you very much for your contributions!

I hope WCH merges these changes upstream quickly.

TianpeiLee commented 9 months ago

I'm sorry for waiting until now to address these issues. Both Linux and MAC environments are available now.

maxgerhardt commented 9 months ago

Looks good in regards to toolchain and OpenOCD now, but is it right that all Linux, Windows and MacOS systems reference the before_install package with wch_beforeinstall_linux-1.0.0.tar.gz which has Linux .so library files?

TianpeiLee commented 9 months ago

I noticed this issue. Other environments try not to include it, but when other environments' IDEs download the installation package based on the same "toolsDependencies", they will report an error. For the sake of simplicity, I have added all of this package.