sipeed / Longduino

Longduino is an Arduino port for gd32v mcu.
Other
70 stars 21 forks source link

macOS Support #27

Open KenjutsuGH opened 3 years ago

KenjutsuGH commented 3 years ago

I was able to get Longduino to work via the Arduino Board Manager:

  1. I made a package index JSON file
  2. I reference the sifive May 2019 Tools Release gcc Toolchain and OpenOCD for macOS (Other versions also work, but the 8.2.0 version generates the correct code in relation with delay(). With the other versions, delay() is extremely slow)
  3. I include an macOS version of dfu-util and associated tools
  4. I modified platform.txt to reference the macOS specific tools (gcc and dfu-util)
  5. I also added support for the Nano Lite board which I have.

All the above is available on my github page.

I am only able to test on a Nano Lite board using dfu-util.

Unfortunately, I do not know enough about PlatformIO to get the macOS version working under PlatformIO.

Comments are welcomed :-)

robertlipe commented 3 years ago

Mac users of Homebrew may find it convenient to just install that tap and use https://github.com/riscv/homebrew-riscv

While I haven't worked on Longduino, I've compiled (and written) many of my own GD32V/Longan Nano apps on MacOS and it's served wonderfully.

Do note that bottom line of having to install --with-multilib in order to get 32-bit support.

I don't know that it's better in any specific way (I think it's using the same code fork) but I like having it installed and managed by tools I'm already using instead of splattering around yet another tarball in my $PATH.

Oh, it was easy to add M1 support (which they integrated quickly) so I have native M1 hosting for my cross. I don't think that SiFive commits to that level of "MacNess", instead shooting for LCD.

Enjoy the options!