feat(compiler): F7.6 — la variante Arduino real llega al sdkconfig
_normalize_options rellena arduinoVariant con _arduino_variant(board_fqbn), que ya leia boards.txt; la plantilla ya consumia la clave. Sin esto todas las placas S3 compilaban como esp32s3 generico: sin nombres Dx del XIAO y con Serial en UART0, cuyo RX por defecto es GPIO44 = D7 del XIAO — un pinMode(D7) tardio desinstala el driver y silencia los prints del loop (medido en el banco con el ejemplo del Round Display).
This commit is contained in:
parent
0b7c9e1dd6
commit
bca971bbb4
|
|
@ -2086,6 +2086,7 @@ class ESPIDFCompiler:
|
||||||
self,
|
self,
|
||||||
opts: dict | None,
|
opts: dict | None,
|
||||||
idf_target: str,
|
idf_target: str,
|
||||||
|
board_fqbn: str | None = None,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
"""Fill missing keys with defaults, validate enums, strip
|
"""Fill missing keys with defaults, validate enums, strip
|
||||||
target-incompatible keys (e.g. PSRAM on C3).
|
target-incompatible keys (e.g. PSRAM on C3).
|
||||||
|
|
@ -2125,6 +2126,17 @@ class ESPIDFCompiler:
|
||||||
if normalized['psram'] == 'opi' and idf_target != 'esp32s3':
|
if normalized['psram'] == 'opi' and idf_target != 'esp32s3':
|
||||||
normalized['psram'] = 'enabled'
|
normalized['psram'] = 'enabled'
|
||||||
|
|
||||||
|
# The Arduino VARIANT this board builds against (F7.6). Without it the
|
||||||
|
# sdkconfig template falls back to the generic chip variant, and boards
|
||||||
|
# like the XIAO ESP32S3 lose their identity: no Dx pin names, and
|
||||||
|
# CDC_ON_BOOT stays off so `Serial` lands on UART0 — whose default RX
|
||||||
|
# is GPIO44, the very pin the XIAO exposes as D7. A sketch doing
|
||||||
|
# pinMode(D7, ...) then has the peripheral manager tear the UART0
|
||||||
|
# driver down and every print after it is silently dropped (measured
|
||||||
|
# on the Round Display clock example: setup prints out, loop mute).
|
||||||
|
if board_fqbn:
|
||||||
|
normalized['arduinoVariant'] = self._arduino_variant(board_fqbn, idf_target)
|
||||||
|
|
||||||
return normalized
|
return normalized
|
||||||
|
|
||||||
# sdkconfig.defaults.in is written against IDF v4.4 + the 2.x Arduino
|
# sdkconfig.defaults.in is written against IDF v4.4 + the 2.x Arduino
|
||||||
|
|
@ -2584,7 +2596,7 @@ class ESPIDFCompiler:
|
||||||
logger.info(f'[espidf] Files: {[f["name"] for f in files]}')
|
logger.info(f'[espidf] Files: {[f["name"] for f in files]}')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
normalized_opts = self._normalize_options(board_options, idf_target)
|
normalized_opts = self._normalize_options(board_options, idf_target, board_fqbn)
|
||||||
except ValueError as exc:
|
except ValueError as exc:
|
||||||
return {
|
return {
|
||||||
'success': False,
|
'success': False,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue