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

NimBLE SSP Server example fails to build on Windows (IDFGH-6673) #8305

Closed
TonyWu98 opened this issue Jan 27, 2022 · 1 comment
Closed

NimBLE SSP Server example fails to build on Windows (IDFGH-6673) #8305

TonyWu98 opened this issue Jan 27, 2022 · 1 comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally

Comments

@TonyWu98
Copy link

Environment

  • Development Kit: none
  • Module or chip used: ESP32-WROOM-32
  • IDF version (run git describe --tags to find it): v4.4
  • Build System: idf.py
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it): xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2-patch2) 8.4.0
  • Operating System: Windows 10
  • (Windows only) environment type: ESP Command Prompt
  • Using an IDE?: No
  • Power Supply: external 5V

Problem Description

NimBLE SSP Server example fails to build.

Expected Behavior

Successful build of the project

Actual Behavior

Console output:

C:\Users\TonyWu\Desktop\esp-idf\examples\bluetooth\nimble\ble_spp\spp_server>idf.py build
Executing action: all (aliases: build)
Running cmake in directory c:\users\tonywu\desktop\esp-idf\examples\bluetooth\nimble\ble_spp\spp_server\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=1 c:\users\tonywu\desktop\esp-idf\examples\bluetooth\nimble\ble_spp\spp_server"...
-- Found Git: C:/Users/TonyWu/.espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/TonyWu/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/TonyWu/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/TonyWu/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/Users/TonyWu/Desktop/esp-idf/examples/bluetooth/nimble/ble_spp/spp_server/sdkconfig
Loading defaults file C:/Users/TonyWu/Desktop/esp-idf/examples/bluetooth/nimble/ble_spp/spp_server/sdkconfig.defaults...
C:/Users/TonyWu/Desktop/esp-idf/examples/bluetooth/nimble/ble_spp/spp_server/sdkconfig:423 CONFIG_ESP32_REDUCE_PHY_TX_POWER was replaced with CONFIG_ESP_PHY_REDUCE_TX_POWER
C:/Users/TonyWu/Desktop/esp-idf/examples/bluetooth/nimble/ble_spp/spp_server/sdkconfig:569 CONFIG_ESP_SYSTEM_PD_FLASH was replaced with CONFIG_ESP_SLEEP_POWER_DOWN_FLASH
C:/Users/TonyWu/Desktop/esp-idf/examples/bluetooth/nimble/ble_spp/spp_server/sdkconfig:624 CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE was replaced with CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE
C:/Users/TonyWu/Desktop/esp-idf/examples/bluetooth/nimble/ble_spp/spp_server/sdkconfig:626 CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER was replaced with CONFIG_ESP_PHY_MAX_WIFI_TX_POWER
C:/Users/TonyWu/Desktop/esp-idf/examples/bluetooth/nimble/ble_spp/spp_server/sdkconfig:627 CONFIG_ESP32_PHY_MAX_TX_POWER was replaced with CONFIG_ESP_PHY_MAX_TX_POWER
-- Found PythonInterp: C:/Users/TonyWu/.espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe (found version "3.8.9")
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- App "spp_server" version: v4.4
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/examples/bluetooth/nimble/ble_spp/spp_server/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script C:/Users/TonyWu/Desktop/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
CMake Error at ../../../../../tools/cmake/component.cmake:298 (foreach):
  Syntax error in cmake code at

    C:/Users/TonyWu/Desktop/esp-idf/tools/cmake/component.cmake:298

  when parsing string

    C:\Users\TonyWu\Desktop\esp-idf/components

  Invalid character escape '\U'.
Call Stack (most recent call first):
  ../../../../../tools/cmake/component.cmake:472 (__component_add_include_dirs)
  main/CMakeLists.txt:5 (idf_component_register)


-- Configuring incomplete, errors occurred!
See also "C:/Users/TonyWu/Desktop/esp-idf/examples/bluetooth/nimble/ble_spp/spp_server/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1

Steps to reproduce

  1. Open ESP-IDF cmd prompt
  2. cd ...\esp-idf\examples\bluetooth\nimble\ble_spp
  3. idf.py build

Workaround

Changing main/CMakeLists.txt from:

set(srcs "main.c"
        "gatt_svr.c"
        "misc.c")

idf_component_register(SRCS "${srcs}"
                    INCLUDE_DIRS "$ENV{IDF_PATH}/components")

to:

set(srcs "main.c"
        "gatt_svr.c"
        "misc.c")

idf_component_register(SRCS "${srcs}"
                    INCLUDE_DIRS ".")

seems to fix the issue and the example builds and functions as expected. Not sure if this has any side effects.

Logs

CMakeOutput.log

sdkconfig.txt

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 27, 2022
@github-actions github-actions bot changed the title NimBLE SSP Server example fails to build on Windows NimBLE SSP Server example fails to build on Windows (IDFGH-6673) Jan 27, 2022
@rahult-github
Copy link
Collaborator

Hi @TonyWu98 ,

Thanks for finding this issue. Will fix this and include it in upcoming release.

Thanks,
Rahul

espressif-bot pushed a commit that referenced this issue Feb 7, 2022
NimBLE : Fixed BLE SPP build fail on Windows

Closes : #8305

See merge request espressif/esp-idf!17014
espressif-bot pushed a commit that referenced this issue Feb 7, 2022
NimBLE : Fixed BLE SPP build fail on Windows

Closes : #8305

See merge request espressif/esp-idf!17013
@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally and removed Status: Opened Issue is new labels Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants