From fc92dd8ea63c00dc421434316b2102c39785cdab Mon Sep 17 00:00:00 2001 From: MarekZegare4 Date: Fri, 14 Aug 2026 11:21:16 +0200 Subject: [PATCH] fix(heltec): drop broken -U/-D pin override, real build was failing PlatformIO's SCons flag processing mishandles a two-token "-U MACRO" in build_flags: it drops the macro name and leaves a bare -U that swallows the next flag (-Iinclude) as its argument, producing "macro names must be identifiers" for every companion_radio source file. The -U was unnecessary anyway -- this whole project builds with -w, so a later -D silently wins with no warning to suppress. Verified with a real pio build (not available earlier this session): Heltec_v3/v4, Cardputer ADV, and T-Echo Lite KeyShield solo envs all compile clean now. --- variants/heltec_v3/platformio.ini | 6 +++--- variants/heltec_v4/platformio.ini | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index e51095c6..b1515020 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -200,7 +200,8 @@ lib_deps = ; ; * Wired joystick: four direction pins plus a fifth "press" contact. The ; press contact drives Enter (your thumb's already on the stick) via -; PIN_USER_BTN -- overridden below (-U/-D) from the PRG-button default +; PIN_USER_BTN -- overridden below (a later -D wins, no -U needed: this whole +; project builds with -w) from the PRG-button default ; the base env sets, since PRG's GPIO0 can't be moved to the stick. PRG ; becomes Back instead (PIN_BACK_BTN), so it no longer needs its own ; separately-wired button. Each contact just shorts its pin to GND; @@ -250,8 +251,7 @@ build_flags = -D JOYSTICK_LEFT=47 -D JOYSTICK_RIGHT=48 -D PIN_BACK_BTN=0 ; PRG button - -U PIN_USER_BTN - -D PIN_USER_BTN=33 ; joystick press contact -- Enter + -D PIN_USER_BTN=33 ; joystick press contact -- Enter, overrides the PRG default above ; -D PIN_BUZZER= build_src_filter = ${Heltec_lora32_v3.build_src_filter} + diff --git a/variants/heltec_v4/platformio.ini b/variants/heltec_v4/platformio.ini index 273db83b..65fb8fc7 100644 --- a/variants/heltec_v4/platformio.ini +++ b/variants/heltec_v4/platformio.ini @@ -249,7 +249,8 @@ lib_deps = ; ; * Wired joystick: four direction pins plus a fifth "press" contact. The ; press contact drives Enter (your thumb's already on the stick) via -; PIN_USER_BTN -- overridden below (-U/-D) from the PRG-button default +; PIN_USER_BTN -- overridden below (a later -D wins, no -U needed: this whole +; project builds with -w) from the PRG-button default ; the base env sets, since PRG's GPIO0 can't be moved to the stick. PRG ; becomes Back instead (PIN_BACK_BTN), so it no longer needs its own ; separately-wired button. Each contact just shorts its pin to GND; @@ -300,8 +301,7 @@ build_flags = -D JOYSTICK_LEFT=47 -D JOYSTICK_RIGHT=48 -D PIN_BACK_BTN=0 ; PRG button - -U PIN_USER_BTN - -D PIN_USER_BTN=33 ; joystick press contact -- Enter + -D PIN_USER_BTN=33 ; joystick press contact -- Enter, overrides the PRG default above ; -D PIN_BUZZER= build_src_filter = ${heltec_v4_oled.build_src_filter} +