milkv-duo / duo-arduino

GNU Lesser General Public License v2.1
15 stars 8 forks source link

It's impossible to add a board in Arduino IDE 1.8.19 #7

Closed tanklist closed 6 months ago

tanklist commented 7 months ago

I tried to add SG200X board in Arduino IDE 1.8.19 but I got an error: milkv_arduino_001 and in a console:

Error downloading http://digistump.com/package_digistump_index.json
 Tool xpack-riscv-none-elf-gcc is not available for your operating system.
java.lang.RuntimeException: java.lang.Exception: Tool xpack-riscv-none-elf-gcc is not available for your operating system.
    at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:179)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.Exception: Tool xpack-riscv-none-elf-gcc is not available for your operating system.
    at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:84)
    at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
    ... 1 more

OS is Windows 10 22H2. What the problem is? As I understood from the description Add Duo to Arduino IDE this should work properly with my configuration.

shiptux commented 6 months ago

Hi @tanklist The reason is you don't install the tool "xpack-riscv-none-elf-gcc". You should install this package by follow these steps:

  1. Install npm: Download npm and nodejs from this page: https://nodejs.org/en/download/
  2. Install xpm by follow https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack For example:
   npm install --location=global xpm@latest
   xpm install --global @xpack-dev-tools/riscv-none-elf-gcc@latest --verbose

Because my laptop is Arm64, I got an error: error: platform win32-arm64 not supported. I can't test step 3 now. I will try it on a X64 PC a few days later.

  1. Retry arduino IDE.
tanklist commented 6 months ago

I've done everything you suggested and it was quite helpful, but I've got a new error message: milkv_arduino_003 It seems I miss any other required tools. Would you suggest what else I need to install?

shiptux commented 6 months ago

@tanklist I strongly recommend you try Arduino IDE 2.3.2, which can install Sophgo requirement smoothly. Tested on Win11 X64.

I have read the JSON file,in generally, I don't need to install requirement by myself, just click the install button, everything should work fine. But this step failed on Arduino 1.8.3, it might have some errors here, But for a user sentence, I just recommend you to use 2.3.2 version in this moment.

tanklist commented 6 months ago

I was able to solve the problem using Arduino IDE 2.3.2 only. It seems 1.8.x version doesn't work properly with your framework. However I see "The current latest version is 2.3.2, and it is recommended to use version 1.8.X or above" in the tutorial. I guess you should update the tutorial.

shiptux commented 6 months ago

I was able to solve the problem using Arduino IDE 2.3.2 only. It seems 1.8.x version doesn't work properly with your framework. However I see "The current latest version is 2.3.2, and it is recommended to use version 1.8.X or above" in the tutorial. I guess you should update the tutorial.

OK, this is a mistake in the tutorial. I'll make a PR to fix it.