@@ -159,8 +159,12 @@ build_flags =
159159 ${env:esp32-s3-N32R8-extuart.build_flags}
160160 -DOPENDISPLAY_ZLIB_WINDOW_BITS =15
161161
162+ ; C3/C6 need Arduino-ESP32 3.x / IDF 5 (pioarduino). Stock PlatformIO `espressif32`
163+ ; (Arduino 2.x) does not link mbedtls CMAC (`mbedtls_cipher_cmac_*`) and on C6 also
164+ ; leaves CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT on without the controller's
165+ ; r_os_mem* ROM symbols, so NimBLE-Arduino fails at link time.
162166[env:esp32-c3-N4]
163- platform = espressif32
167+ platform = https://github.com/pioarduino/platform- espressif32/releases/download/stable/platform-espressif32.zip
164168framework = arduino
165169build_flags =
166170 -DTARGET_ESP32
@@ -174,19 +178,24 @@ board_build.partitions = huge_app.csv
174178board = esp32-c3-devkitm-1
175179monitor_speed = 115200
176180
177- ; C6 needs Arduino-ESP32 3.x / IDF 5 (pioarduino). Stock PlatformIO `espressif32`
178- ; leaves CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT on without linking the
179- ; controller's r_os_mem* ROM symbols, so NimBLE-Arduino fails at link time.
180181[env:esp32-c6-N4]
181182platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
182183framework = arduino
183- build_flags =
184+ build_flags =
184185 -DTARGET_ESP32
185186 # -DOPENDISPLAY_ZLIB_WINDOW_BITS=15
186187 -DOPENDISPLAY_ZLIB_USE_HEAP_WINDOW =1
187188 -DARDUINO_USB_MODE =1
188189 -DARDUINO_USB_CDC_ON_BOOT =1
189190 -DCONFIG_FREERTOS_WATCHDOG_TIMEOUT_S =120
191+ ; C6 sdkconfig sets CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT, so
192+ ; NimBLE-Arduino skips compiling os_mempool and expects r_os_mem* from
193+ ; libble_app. Force-pull those objects — a single-pass link on GitHub
194+ ; Actions otherwise leaves the refs undefined.
195+ -lble_app
196+ -Wl,-u,r_os_mempool_init
197+ -Wl,-u,r_os_memblock_get
198+ -Wl,-u,r_os_memblock_put
190199board_build.filesystem = littlefs
191200board_build.partitions = huge_app.csv
192201board = esp32-c6-devkitm-1
@@ -197,7 +206,7 @@ monitor_speed = 115200
197206; device config. DIO flash mode leaves GPIO12/13 free for general GPIO use
198207; (e.g. a battery-latch MOSFET).
199208[env:esp32-c3-N16]
200- platform = espressif32
209+ platform = https://github.com/pioarduino/platform- espressif32/releases/download/stable/platform-espressif32.zip
201210framework = arduino
202211build_flags =
203212 -DTARGET_ESP32
0 commit comments