Skip to content

Conversation

wqx6
Copy link
Contributor

@wqx6 wqx6 commented Oct 11, 2025

Summary

The esp-hosted has been updated to v2.5.11, we should enable the BLE controller on co-processor manually for ESP32-P4, as described in https://github.com/espressif/esp-hosted-mcu/blob/main/docs/migration_guide.md#migrating-to-v252

Related issues

N/A

Testing

Tested matter commissioning with ESP32-P4 Function EV board using the all-clusters-app.

@wqx6 wqx6 requested a review from a team as a code owner October 11, 2025 10:09
@Copilot Copilot AI review requested due to automatic review settings October 11, 2025 10:09
@github-actions github-actions bot added documentation Improvements or additions to documentation platform esp32 config labels Oct 11, 2025
@pullapprove pullapprove bot added review - pending documentation Improvements or additions to documentation platform esp32 config and removed documentation Improvements or additions to documentation platform esp32 config labels Oct 11, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes BLE initialization for ESP32-P4 when using ESP-Hosted and adds documentation for ESP-Hosted setup. The changes enable proper BT controller initialization on co-processor systems and provide user guidance for setting up ESP32-P4 with ESP-Hosted.

Key changes:

  • Added ESP-Hosted BT controller initialization code for ESP32-P4
  • Removed obsolete ESP32-P4 stub function that's no longer needed
  • Added comprehensive ESP-Hosted setup documentation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/platform/ESP32/nimble/BLEManagerImpl.cpp Added ESP-Hosted BT controller initialization and removed obsolete ESP32-P4 stub
docs/platforms/esp32/index.md Added reference to new ESP-Hosted documentation
docs/platforms/esp32/esp_hosted.md Created comprehensive ESP-Hosted setup guide for ESP32-P4
config/esp32/components/chip/idf_component.yml Added ESP-Hosted component dependency for ESP32-P4

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the esp-hosted component and adds the necessary initialization for the BLE controller on the ESP32-P4. It also includes new documentation for using ESP-Hosted. My review focuses on improving error handling in the initialization logic and fixing some typos in the new documentation. The changes are generally good, but the error handling for the new esp-hosted initialization calls should be made more robust to prevent potential issues.

Copy link

github-actions bot commented Oct 11, 2025

PR #41422: Size comparison from 5a37876 to aa7ca17

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 5a37876 aa7ca17 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1105406 1105406 0 0.0
RAM 178754 178754 0 0.0
bl702 lighting-app bl702+eth FLASH 659894 659894 0 0.0
RAM 134825 134825 0 0.0
bl702+wifi FLASH 835978 835978 0 0.0
RAM 124301 124301 0 0.0
bl706+mfd+rpc+littlefs FLASH 1069114 1069114 0 0.0
RAM 117141 117141 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899328 899328 0 0.0
RAM 105476 105476 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 981876 981876 0 0.0
RAM 109628 109628 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 769432 769432 0 0.0
RAM 103208 103208 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 781076 781076 0 0.0
RAM 108360 108360 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 727072 727072 0 0.0
RAM 97276 97276 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 711540 711540 0 0.0
RAM 97484 97484 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554310 554310 0 0.0
RAM 205544 205544 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587034 587034 0 0.0
RAM 205768 205768 0 0.0
efr32 lock-app BRD4187C FLASH 961168 961168 0 0.0
RAM 126228 126228 0 0.0
BRD4338a FLASH 755896 755888 -8 -0.0
RAM 255516 255516 0 0.0
window-app BRD4187C FLASH 1055508 1055508 0 0.0
RAM 122424 122424 0 0.0
esp32 all-clusters-app c3devkit DRAM 103016 103016 0 0.0
FLASH 1792516 1792516 0 0.0
IRAM 83862 83862 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 929968 929968 0 0.0
RAM 160987 160987 0 0.0
nxp contact mcxw71+release FLASH 691800 691800 0 0.0
RAM 61440 61440 0 0.0
lighting mcxw71+release FLASH 723368 723368 0 0.0
RAM 68100 68100 0 0.0
lock mcxw71+release FLASH 770592 770592 0 0.0
RAM 61804 61804 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1672460 1672460 0 0.0
RAM 213620 213620 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1589940 1589940 0 0.0
RAM 210900 210900 0 0.0
light cy8ckit_062s2_43012 FLASH 1456772 1456772 0 0.0
RAM 197616 197616 0 0.0
lock cy8ckit_062s2_43012 FLASH 1489084 1489084 0 0.0
RAM 225328 225328 0 0.0
qpg lighting-app qpg6200+debug FLASH 835432 835432 0 0.0
RAM 127604 127604 0 0.0
lock-app qpg6200+debug FLASH 772180 772180 0 0.0
RAM 118580 118580 0 0.0
realtek light-switch-app rtl8777g FLASH 705368 705368 0 0.0
RAM 106784 106784 0 0.0
lighting-app rtl8777g FLASH 756568 756568 0 0.0
RAM 127132 127132 0 0.0
stm32 light STM32WB5MM-DK FLASH 469068 469068 0 0.0
RAM 141208 141208 0 0.0
telink bridge-app tl7218x FLASH 708408 708408 0 0.0
RAM 90356 90356 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 795940 795940 0 0.0
RAM 40908 40908 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 787136 787136 0 0.0
RAM 93552 93552 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 713942 713942 0 0.0
RAM 51724 51724 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 747246 747246 0 0.0
RAM 70772 70772 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 724098 724098 0 0.0
RAM 34472 34472 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 601366 601366 0 0.0
RAM 108600 108600 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 819756 819760 4 0.0
RAM 91948 91948 0 0.0

Copy link

codecov bot commented Oct 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.94%. Comparing base (82f2b49) to head (860bd80).
⚠️ Report is 37 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #41422      +/-   ##
==========================================
- Coverage   50.95%   50.94%   -0.02%     
==========================================
  Files        1378     1378              
  Lines      100635   100698      +63     
  Branches    13023    13058      +35     
==========================================
+ Hits        51280    51302      +22     
- Misses      49355    49396      +41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wqx6 wqx6 force-pushed the fix/esp32p4-nimble-init branch from 42feb27 to aa7ca17 Compare October 13, 2025 00:30
Copy link

github-actions bot commented Oct 13, 2025

PR #41422: Size comparison from 966e378 to 860bd80

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 966e378 860bd80 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1105406 1105406 0 0.0
RAM 178754 178754 0 0.0
bl702 lighting-app bl702+eth FLASH 659894 659894 0 0.0
RAM 134825 134825 0 0.0
bl702+wifi FLASH 835978 835978 0 0.0
RAM 124301 124301 0 0.0
bl706+mfd+rpc+littlefs FLASH 1069114 1069114 0 0.0
RAM 117141 117141 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899328 899328 0 0.0
RAM 105476 105476 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 981876 981876 0 0.0
RAM 109628 109628 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 769432 769432 0 0.0
RAM 103208 103208 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 781076 781076 0 0.0
RAM 108360 108360 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 727072 727072 0 0.0
RAM 97276 97276 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 711540 711540 0 0.0
RAM 97484 97484 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554310 554310 0 0.0
RAM 205544 205544 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587034 587034 0 0.0
RAM 205768 205768 0 0.0
efr32 lock-app BRD4187C FLASH 961168 961168 0 0.0
RAM 126228 126228 0 0.0
BRD4338a FLASH 755896 755888 -8 -0.0
RAM 255516 255516 0 0.0
window-app BRD4187C FLASH 1055508 1055508 0 0.0
RAM 122424 122424 0 0.0
esp32 all-clusters-app c3devkit DRAM 103016 103016 0 0.0
FLASH 1792516 1792516 0 0.0
IRAM 83862 83862 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 929968 929968 0 0.0
RAM 160987 160987 0 0.0
nxp contact mcxw71+release FLASH 691800 691800 0 0.0
RAM 61440 61440 0 0.0
lighting mcxw71+release FLASH 723368 723368 0 0.0
RAM 68100 68100 0 0.0
lock mcxw71+release FLASH 770592 770592 0 0.0
RAM 61804 61804 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1672460 1672460 0 0.0
RAM 213620 213620 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1589940 1589940 0 0.0
RAM 210900 210900 0 0.0
light cy8ckit_062s2_43012 FLASH 1456772 1456772 0 0.0
RAM 197616 197616 0 0.0
lock cy8ckit_062s2_43012 FLASH 1489084 1489084 0 0.0
RAM 225328 225328 0 0.0
qpg lighting-app qpg6200+debug FLASH 835432 835432 0 0.0
RAM 127604 127604 0 0.0
lock-app qpg6200+debug FLASH 772180 772180 0 0.0
RAM 118580 118580 0 0.0
realtek light-switch-app rtl8777g FLASH 705368 705368 0 0.0
RAM 106784 106784 0 0.0
lighting-app rtl8777g FLASH 756568 756568 0 0.0
RAM 127132 127132 0 0.0
stm32 light STM32WB5MM-DK FLASH 469068 469068 0 0.0
RAM 141208 141208 0 0.0
telink bridge-app tl7218x FLASH 708408 708408 0 0.0
RAM 90356 90356 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 795940 795940 0 0.0
RAM 40908 40908 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 787136 787136 0 0.0
RAM 93552 93552 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 713942 713942 0 0.0
RAM 51724 51724 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 747246 747246 0 0.0
RAM 70772 70772 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 724098 724098 0 0.0
RAM 34472 34472 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 601366 601366 0 0.0
RAM 108600 108600 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 819756 819760 4 0.0
RAM 91948 91948 0 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config documentation Improvements or additions to documentation esp32 platform review - pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants