Skip to content

Handle ESP32 Arduino core 3.3.11+ mempool symbol rename for C5 builds - #1176

Merged
h2zero merged 2 commits into
masterfrom
copilot/fix-regression-build-250
Jul 29, 2026
Merged

Handle ESP32 Arduino core 3.3.11+ mempool symbol rename for C5 builds#1176
h2zero merged 2 commits into
masterfrom
copilot/fix-regression-build-250

Conversation

Copilot AI commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Arduino ESP32 core 3.3.11 changed the exported NimBLE mempool symbols for controller-backed targets such as esp32c5, so NimBLE-Arduino 2.5.0 still referenced legacy r_os_* names and failed at link time. This updates the symbol selection to match the core version and adds esp32c5 to the existing Arduino build matrix to keep this path covered.

  • Compatibility gate

    • In os_mempool.h, gate the legacy r_os_* aliases on Arduino core version.
    • Cores before 3.3.11 keep using ROM-backed r_os_mempool_init / r_os_memblock_get / r_os_memblock_put.
    • Cores 3.3.11+ fall back to the unprefixed os_* names exported by the newer core.
  • Build coverage

    • Add esp32c5 to .github/workflows/build.yml under the Arduino ESP32 matrix so the affected target is compiled in CI.
  • Documentation in code

    • Add a short comment explaining why 3.3.11 is the cutoff and keep the version-gate macro scoped to the header.
#if defined(ESP_ARDUINO_VERSION)
/* Arduino ESP32 core 3.3.11+ dropped the legacy r_ prefix for these mempool symbols. */
#define NIMBLE_OS_MEMPOOL_USE_ROM_R_PREFIX \
    (ESP_ARDUINO_VERSION < ESP_ARDUINO_VERSION_VAL(3, 3, 11))
#else
#define NIMBLE_OS_MEMPOOL_USE_ROM_R_PREFIX 1
#endif

Copilot AI changed the title [WIP] Fix regression of build 2.5.0 library with Core 3.3.11 for ESP32-C5 Handle ESP32 Arduino core 3.3.11+ mempool symbol rename for C5 builds Jul 25, 2026
Copilot AI requested a review from h2zero July 25, 2026 18:18

@h2zero h2zero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be squashed

@h2zero
h2zero marked this pull request as ready for review July 29, 2026 00:46
@h2zero
h2zero force-pushed the copilot/fix-regression-build-250 branch from 47d74ed to 41b13df Compare July 29, 2026 22:46
Copilot AI and others added 2 commits July 29, 2026 17:00
Fixes a crash when the stack is reinitialized without clearing all data on deinit then starting scanning.
@h2zero
h2zero force-pushed the copilot/fix-regression-build-250 branch from 41b13df to 60e93df Compare July 29, 2026 23:09
@h2zero
h2zero merged commit 9bc5176 into master Jul 29, 2026
43 checks passed
@h2zero
h2zero deleted the copilot/fix-regression-build-250 branch July 29, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression of build 2.5.0 library with recent Core 3.3.11 for ESP32-C5 target

2 participants