You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the documentation at readthedocs and the issue is not addressed there.
I have tested that the issue is present in current master branch (aka latest git).
I have searched the issue tracker for a similar issue.
If there is a stack dump, I have decoded it.
I have filled out all fields below.
Platform
Hardware: ESP8286 / ESP8285
Core Version: 2.7.1
Development Env: Any
Settings in IDE
Module: Generic ESP8266 Module / ESP8285
Problem Description
This is more of a feature proposal issue.
Currently, a way to distinguish between esp8266 and esp8285 is by selecting build variant manually, hard-coding certain constants, macros and pin values. Main example is isFlashInterfacePin(X) macro:
AFAIK the "generic esp8285" variant is not a necessity but more a convenience, reducing the number of mandatory settings; one can achieve the same result with "generic esp8266" choosing the correct settings.
Some (most) of them primarily necessary for building the fw image or errorchecking.
e.g.: flash config. if one detects esp8285 flashmode dout (and thus used pins) are fixed, but for "the other" esp modules the options for flashmode still are relevant and mandatory (the esp8285 setting being one of the possible options).
Basic Infos
Platform
Settings in IDE
Problem Description
This is more of a feature proposal issue.
Currently, a way to distinguish between esp8266 and esp8285 is by selecting build variant manually, hard-coding certain constants, macros and pin values. Main example is
isFlashInterfacePin(X)
macro:Arduino/variants/esp8285/common.h
Line 34 in 27ef03f
Which happens to be used defensively across the Core:
https://github.com/plerup/espsoftwareserial/blob/594904c7e4eb0ddb23969765ec55f0b91c5b2ca9/src/SoftwareSerial.cpp#L51
Arduino/cores/esp8266/core_esp8266_waveform.cpp
Line 120 in 36e047e
Arduino/cores/esp8266/core_esp8266_wiring_digital.cpp
Line 240 in a04c324
However, based on current RTOS code and snippets from esptool.py, we can actually replace macro with a real function detecting pin configuration at runtime (e.g., like one can notice when uploading stuff via esptool.py to the esp8285 device):
https://github.com/espressif/esptool/blob/f04d34bcab29ace798d2d3800ba87020cccbbfdd/esptool.py#L1060-L1070
https://github.com/espressif/ESP8266_RTOS_SDK/blob/3c055779e9793e5f082afff63a011d6615e73639/components/esp8266/include/esp8266/efuse_register.h#L20-L21
Which becomes this piece of code somewhere:
The intent of that is that Generic variant can be merged with esp8285, thus any binary could be built and used with both types of devices.
Although, I wonder if I am missing documentation piece where this is described more clearly, instead of referencing 2-3 lines of code from somewhere.
MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: