AllYarnsAreBeautiful / ayab-desktop

The AYAB Software
http://ayab-knitting.com
GNU General Public License v3.0
56 stars 31 forks source link

Support multiple hardware platforms (again) #612

Open dl1com opened 7 months ago

dl1com commented 7 months ago

Not so long ago, we removed the Arduino MEGA platform support.

Now, we are facing the need to support multiple hardware platforms again: UNO, UNO R4 and probably the AYAB-ESP32 platform (at least until the web frontend is ready).

Therefore, AYAB Desktop and its CI/CD shall be capable of handlung multiple platform binaries.

t0mpr1c3 commented 6 months ago

Is this the ESP flash tool? https://docs.espressif.com/projects/esptool/en/latest/esp32s3/esptool/flashing-firmware.html

Looks easy to install using pip.

Apparently PlatformIO outputs the command that needs to happen?

dl1com commented 6 months ago

As just discussed in the dev meeting: As an alternative to ship the esp flashing tool (for 3 different platforms...) we could go a similar way like the WLED project (https://install.wled.me/) and supply a webservice to flash the ESP32 using the browser. Code example e.g. here: https://git.flow3r.garden/flow3r/web/-/tree/main/webflasher

t0mpr1c3 commented 6 months ago

This is what I got from the WLED link: "Sorry, your browser is not yet supported! Please try on Desktop Chrome or Edge."

The flow3r Web Flasher Tool is Chrome only.

dl1com commented 6 months ago

The flow3r Web Flasher Tool is Chrome only.

Please share your thoughts, just posting the error messages is a bit scarce. I assume you want to say "if it's not supporting other browsers than Chrome, it's a no go". That's a valid shortcoming.

For AYAB-Desktop, it's not that a big deal to ship the esp flash utility together with it, so I am fine with that for now (assuming we don't enter another dependency hell).

For the future (web application contained inside ESP32), we'll probably revisit this topic, as I think it's a lean approach to not being required to install another software to be able to do the initial flash of your newly acquired ayab-esp32 board, you'll just use the browser which you will use for knitting afterwards as well. But let's postpone this discussion.

Is this the ESP flash tool?

Here's an example for the tool and the calls we would have to integrate into the firmware dialogue, similar to what we already have for avrdude: https://kno.wled.ge/basics/install-binary/#flashing-method-2-esptool

t0mpr1c3 commented 6 months ago

I would suggest adding the ESP flash tool to the desktop for the time being. If it turns out to be difficult, we could try another way.

For the web app, this seems like an easy approach because we can just redirect to a URL, but I would prefer better browser compatibility.

What are the issues for the R4 UNO?

dl1com commented 6 months ago

What are the issues for the R4 UNO?

Afaik the Arduino UNO R4 (Minima) is based on a Renesas RA4M1 Microcontroller. The Arduino UNO R4 WIFI contains an additional ESP32-S3 which supplies the wifi connectivity.

So to support the R4 with the current firmware, we would need to flash the Renesas RA4M1 from the AYAB-Desktop application. At the moment, I have no knowledge which tooling is required to achieve this.