Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zephyr UART over BLE does not work for ESP32S3 #84115

Open
ubieda opened this issue Jan 16, 2025 · 2 comments · May be fixed by #84532
Open

Zephyr UART over BLE does not work for ESP32S3 #84115

ubieda opened this issue Jan 16, 2025 · 2 comments · May be fixed by #84532
Labels
bug The issue is a bug, or the PR is fixing a bug Good first issue Good for a first time contributor to take platform: ESP32 Espressif ESP32 priority: low Low impact/importance bug

Comments

@ubieda
Copy link
Member

ubieda commented Jan 16, 2025

Describe the bug
As mentioned in Adafruit's blog post (https://adafruit-playground.com/u/SamBlenny/pages/zephyr-shell-over-usb-or-ble-bluefruit-connect), UART over BLE does not build for ESP32S3. Explanation in the article:

west build -p always -b adafruit_qt_py_esp32s3/esp32s3/procpu -S nus-console samples/subsys/shell/shell_module/

When I tried it, I got this error:

FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map [...lots of stuff edited out...]
/home/sam/code/zephyr-workspace/zephyr/soc/espressif/esp32s3/hw_init.c:53: undefined reference to `esp_console_init'

The error is happening because zephyrproject-rtos/zephyr/soc/espressif/esp32s3/hw_init.c unconditionally makes a call to esp_console_init(), while the definition of esp_console_init() happens inside of an #ifdef CONFIG_ESP_CONSOLE_UART block in zephyrproject-rtos/hal_espressif/zephyr/common/console_init.c. When you specify the nus-console snippet option, it turns off that definition block, so the linker can't find esp_console_init().

Expected behavior
Builds as expected.

Impact
ESP32S3 can't use Bluetooth over .

Suggested Action
Implement the fix suggested in the article, preferrably by the author himself (@samblenny)

@ubieda ubieda added area: Bluetooth Host Bluetooth Host (excluding BR/EDR) bug The issue is a bug, or the PR is fixing a bug Good first issue Good for a first time contributor to take platform: ESP32 Espressif ESP32 priority: low Low impact/importance bug labels Jan 16, 2025
@ubieda
Copy link
Member Author

ubieda commented Jan 16, 2025

Hi @samblenny, thanks for the article! Would you like to submit your fix upstream? We'd love to have you as a Zephyr contributor.

@ubieda ubieda removed the area: Bluetooth Host Bluetooth Host (excluding BR/EDR) label Jan 16, 2025
@samblenny
Copy link

@ubieda, thanks for the mention. You're welcome to add the change on my behalf if you like.

@wmrsouza wmrsouza linked a pull request Jan 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug Good first issue Good for a first time contributor to take platform: ESP32 Espressif ESP32 priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants