CommunityGD32Cores / ArduinoCore-GD32

Arduino core for GD32 devices, community developed, based on original GigaDevice's core
Other
89 stars 33 forks source link

Can't searched gd32 borad in arduino2 IDE board manager #52

Open 18981119465 opened 2 years ago

18981119465 commented 2 years ago

The readme "Using this core with the Arduino IDE" section is incompatible with arduino2 IDE(Version: 2.0.0-beta.12-nightly.20211019)

obra commented 2 years ago

Yeah. we had an open issue with Arduino. They resolved not to support the functionality in a way that worked with how we are doing things. We’ll need to generate static zip files and json manifests with lengths and SHA hashes.

To do this, we need to set up a github action and decide where the files will live.

On Oct 24, 2021, at 8:33 PM, happychap @.***> wrote:

 The readme "Using this core with the Arduino IDE" section is incompatible with arduino2 IDE(Version: 2.0.0-beta.12-nightly.20211019)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

maxgerhardt commented 2 years ago
  1. Please use PlatformIO instead of the Arduino IDE 2.0 beta. In PlatformIO, all boards are supported and debugging etc. actually works -- we don't have it setup yet for Arduino IDE 2.0 instructions regarding e.g. debugging, so the experience will be poor. The Arduino IDE 2.0 is a modded VSCode version anyways, better use the real thing directly.
  2. I can confirm that when you add our package URL to the "Additional Board URLs", our "GD32 ARM Boards" package won't show up.. likely due to missing checksums and length field in the manifest?
  3. If I install the GD32 package in the regular Arduino IDE 1.x, and then open Arduino IDE 2.0, the package is there. So it just seems to be a problem with stricter installation rules for the 2.0 IDE? Compilation works.

grafik

grafik

  1. So if per https://arduino.github.io/arduino-cli/0.19/package_index_json-specification/ the fields size and checksum are mandatory, we have a chicken-egg problem if the index file package_gd32_index.json lives in this repo. If we'd like to make a release, we have to generate the archive for the board package (aka this repo) and its checksum and write the length and checksum into the package_gd32_index.json file -- which however also lives in this repo. So now we've modified the file inside the board package repo which again changes the checksum. If we regenerate the checksum and write it back we get to the same point. The file in which the checksum is written musn't be part of the checksummed data, it needs to be in a different repo. At https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls I see they've done this for other cores too, disconnect the index file from the core repo. While we can do this to enable downloading the latest master branch version, it'd be good if the Arduino IDE 2.0 installation logic allowed to ignore the length and checksum fields to get a "bleeding edge" version.. I'll see if I can open an issue about this
maxgerhardt commented 2 years ago

We depend on https://github.com/arduino/arduino-cli/issues/1468 on this or we have to do proper releases with checksums.. Which should be auto-generated, otherwise we have to generate a new package for every new commit.

maxgerhardt commented 2 years ago

I have temporarily created a manual index file which has the correct checksum,

https://raw.githubusercontent.com/CommunityGD32Cores/arduino-board-index/main/package_gd32_index.json

And that shows up properly.

grafik

We plan to automate this soon with Github Actions.