Skip to content

supervisor: include settings.h when only the BLE serial service is enabled - #11147

Open
annejan wants to merge 1 commit into
adafruit:mainfrom
annejan:fix/ble-serial-settings-include
Open

supervisor: include settings.h when only the BLE serial service is enabled#11147
annejan wants to merge 1 commit into
adafruit:mainfrom
annejan:fix/ble-serial-settings-include

Conversation

@annejan

@annejan annejan commented Jul 29, 2026

Copy link
Copy Markdown

supervisor_bluetooth_init() calls settings_get_bool() under:

#if (CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_BLE_SERIAL_SERVICE)
#if CIRCUITPY_SETTINGS_TOML
    settings_get_bool("CIRCUITPY_BLE_WORKFLOW", &ble_workflow_setting);

but the include of settings.h is guarded by a condition that omits CIRCUITPY_BLE_SERIAL_SERVICE:

#if (CIRCUITPY_BLE_FILE_SERVICE || (CIRCUITPY_WEB_WORKFLOW && CIRCUITPY_WIFI)) && CIRCUITPY_SETTINGS_TOML
#include "supervisor/shared/settings.h"
#endif

Building with the serial service enabled and the file service disabled fails:

supervisor/shared/bluetooth/bluetooth.c:194:5: error: implicit declaration of function 'settings_get_bool' [-Wimplicit-function-declaration]
supervisor/shared/bluetooth/bluetooth.c:194:5: error: nested extern declaration of 'settings_get_bool' [-Werror=nested-externs]

This adds the missing symbol so the two conditions agree.

Scope

Latent. No board in tree selects CIRCUITPY_BLE_SERIAL_SERVICE = 1 with CIRCUITPY_BLE_FILE_SERVICE = 0, so nothing is broken today. I hit it while enabling the BLE serial service on its own for a board, which is what surfaced the mismatch.

…abled

supervisor_bluetooth_init() calls settings_get_bool() under

    #if (CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_BLE_SERIAL_SERVICE)
    #if CIRCUITPY_SETTINGS_TOML

but the include of settings.h is guarded by a condition that leaves
CIRCUITPY_BLE_SERIAL_SERVICE out. Building with the serial service enabled and
the file service disabled therefore fails:

    error: implicit declaration of function 'settings_get_bool'
    error: nested extern declaration of 'settings_get_bool'

Add the missing symbol to the include condition so the two agree.

No board in tree currently selects that combination, so nothing is broken
today; this only bites when enabling the BLE serial service on its own.
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.

1 participant