Repository navigation
build: support ESP32-S31 and servers without broadcaster role #447
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
Open
mickeyl
wants to merge
2
commits into
h2zero:master
Choose a base branch
from
mickeyl:upstream/s31-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| build*/ | ||
| sdkconfig | ||
| sdkconfig.old | ||
| managed_components/ | ||
| dependencies.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| cmake_minimum_required(VERSION 3.16) | ||
| get_filename_component(NIMBLE_CPP_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE) | ||
| set(EXTRA_COMPONENT_DIRS "${NIMBLE_CPP_ROOT}") | ||
| set(COMPONENTS main) | ||
| include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
| project(nimble_server_build) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| idf_component_register(SRCS "main.cpp" REQUIRES esp-nimble-cpp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #include "NimBLEDevice.h" | ||
|
|
||
| // Compile/link probe: exercise the server even when advertising is disabled. | ||
| extern "C" void app_main() { | ||
| NimBLEDevice::init("server-build-probe"); | ||
| auto* server = NimBLEDevice::createServer(); | ||
| server->advertiseOnDisconnect(false); | ||
| server->createService("180f"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| CONFIG_BT_ENABLED=y | ||
| CONFIG_BT_NIMBLE_ENABLED=y | ||
| CONFIG_BT_NIMBLE_ROLE_CENTRAL=n | ||
| CONFIG_BT_NIMBLE_ROLE_OBSERVER=n | ||
| CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y | ||
| CONFIG_BT_NIMBLE_ROLE_BROADCASTER=y | ||
| CONFIG_COMPILER_OPTIMIZATION_PERF=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| CONFIG_BT_NIMBLE_ROLE_BROADCASTER=n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: S31 and server role builds | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| push: | ||
| branches: [master] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| server-build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| target: [esp32s3, esp32s31] | ||
| broadcaster: [enabled, disabled] | ||
| # ESP-IDF v6.1; S31 still requires --preview. Stable 5.x jobs stay unchanged. | ||
| container: espressif/idf@sha256:81893c71bb5e570088901f21def8684c25cd2a9020281bd01b843a7655edb18c | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| persist-credentials: false | ||
| path: esp-nimble-cpp | ||
| - name: Build server role probe | ||
| env: | ||
| IDF_TARGET: ${{ matrix.target }} | ||
| BROADCASTER: ${{ matrix.broadcaster }} | ||
| shell: bash | ||
| run: | | ||
| . "${IDF_PATH}/export.sh" | ||
| cd esp-nimble-cpp/.github/tests/server-build | ||
| defaults="sdkconfig.defaults" | ||
| if [ "$BROADCASTER" = disabled ]; then defaults="$defaults;sdkconfig.no-broadcaster"; fi | ||
| idf.py --preview -D "SDKCONFIG_DEFAULTS=$defaults" build | ||
| python - "$BROADCASTER" <<'PYTHON' | ||
| import sys | ||
| from pathlib import Path | ||
| enabled = "CONFIG_BT_NIMBLE_ROLE_BROADCASTER=y" in Path("sdkconfig").read_text().splitlines() | ||
| assert enabled == (sys.argv[1] == "enabled"), "role override was not applied" | ||
| PYTHON | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.