bluekitchen / btstack

Dual-mode Bluetooth stack, with small memory footprint.
http://bluekitchen-gmbh.com
Other
1.74k stars 613 forks source link

esp32: compiler error when ESP32 console disabled #571

Closed ricardoquesada closed 8 months ago

ricardoquesada commented 8 months ago

Describe the bug esp32 port fails to compile when the ESP32 console is disabled.

Add this line to sdkconfig: CONFIG_ESP_CONSOLE_NONE=y Or simply disable it from idf.py menuconfig:

-> menuconfig -> components -> ESP System settings -> Channel for console output -> None

error:

src/components/btstack/btstack_stdio_esp32.c: In function 'btstack_stdio_init':
src/components/btstack/btstack_stdio_esp32.c:150:21: error: 'CONFIG_ESP_CONSOLE_UART_BAUDRATE' undeclared (first use in this function); did you mean 'CONFIG_ESP_CONSOLE_UART_NUM'?
     int baud_rate = CONFIG_ESP_CONSOLE_UART_BAUDRATE;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     CONFIG_ESP_CONSOLE_UART_NUM
src/components/btstack/btstack_stdio_esp32.c:150:21: note: each undeclared identifier is reported only once for each function it appears in

Suggestion: When the console is disabled btstack_stdio_init() should do nothing (?)

mringwal commented 8 months ago

Hi Ricardo. I've added a check for CONFIG_ESP_CONSOLE_UART on develop. Please verify. (I also got compiler warnings for esp_console_repl.c, which isn't part of BTstack).

ricardoquesada commented 8 months ago

thanks!