esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
16.03k stars 13.33k forks source link

Migrate to ArduinoCore-API #8112

Open dok-net opened 3 years ago

dok-net commented 3 years ago

Migrating / porting Arduino Core for ESP8266 to use https://github.com/arduino/ArduinoCore-API should bring closure to debates about Arduino compatibility.

According to the README there, at the time of entering this issue, in excerpts:

All Arduino official cores are being ported to the new structure so they take advantage of this single repo.

[...]
Some cores have been ported to the new structure, for example:

megaAVR (https://github.com/arduino/ArduinoCore-megaAVR)
nRF52-mbedos (https://github.com/arduino/ArduinoCore-nRF528x-mbedos)
classic AVR (https://github.com/arduino/ArduinoCore-avr/tree/api)
SAMD (https://github.com/arduino/ArduinoCore-samd/tree/api)
earlephilhower commented 3 years ago

It might make sense to move to this, but to me it's not at all clear how to get there.

String, for example, has been significantly improved (IMHO) here and the API folder includes its own generic implementation which would overwrite it. (Not to mention the fact that there is no WString.h anymore, only String.h....which conflicts on Windows w/the standard library <string.h>!) There are also issues w/the way it's actually handled (Windows git doesn't work w/ symlinks so if you want Win users to be able use master you need to actually just check in copies of the files in your repo).

As I'm using it on the Raspberry Pi Pico RP2040 core I'm also finding incompatibilities (at least w/the latest API revisions) with the API and some of the IDE-shipped examples(!). So it's not 100% clean going that way.

Manually picking a choosing header files to pull in from there might be the best way forward, but it would definitely be work intensive and break lots of little things...

dok-net commented 3 years ago

It's a bit weird reading what is going on at Arduino-core-api's issue tracking, a lot of discussions involving hardware specific matters. Makes it look more and more like it's best to let matters settle before adopting that. Arduino-compatibility is becoming a moving target, isn't it?

earlephilhower commented 3 years ago

Arduino-compatibility is becoming a moving target, isn't it?

I think it's always been a moving target. That's just the way things happen when you have so many boards to support and tons of users like the Arduino.cc folks.

In the interim, seems like a couple options are available:

In any case, moving to the ArduinoCore-API directly isn't indicated at this point in time for all the above reasons..