This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Alexa gadget example

Hi all,

I've found an alexa gadget example but I can't seem to get it running on my nRF52840-DK. The example I've found was located under repository:

https://github.com/nordic-auko/fw-nrfconnect-nrf.git

I've installed the following tools on my windows 10 PC already:

1) zephyr, This can run the blinky example on my nRF52840-DK, can build and flash.

2) nanoPB, although the NANOPB_PATH didn't got found in the t manifest? I fixed it by hard coding it for now, need to find the solution yet

3) ALEXA_EMBEDDED_PATH, same issue as nr 2 and also hard coded it temporary just to see if building it is possible

Now West is willing to start building the application as all configurations are met but I still get errors. 

file *\nanopb_generator.py", line 50, in <module>
from .proto import nanopb_pb2
ModuleNotFoundError: No module named '__main__.proto'; '__main__' is not a package

Anybody got an idea on how to proceed?

Thanks

  • The compleet logging of the West build step is below:

    %REPOSITORY_HOME_PATH%\fw-nrfconnect-nrf>west build -p auto -b nrf52840dk_nrf52840 samples/bluetooth/alexa_gadget
    -- west build: generating a build system
    Including boilerplate (Zephyr base): %REPOSITORY_HOME_PATH%/zephyrproject/zephyr/cmake/app/boilerplate.cmake
    -- Application: %REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget
    -- Zephyr version: 2.4.0-rc1 (%REPOSITORY_HOME_PATH%/zephyrproject/zephyr)
    -- Found Python3: C:/Python37/python.exe (found suitable version "3.7.0", minimum required is "3.6") found components: Interpreter
    -- Found west (found suitable version "0.7.3", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Cache files will be written to: %REPOSITORY_HOME_PATH%/zephyrproject/zephyr/.cache
    -- Found toolchain: gnuarmemb (c:/gnuarmemb)
    -- Found BOARD.dts: %REPOSITORY_HOME_PATH%/zephyrproject/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: %REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: %REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/build/zephyr/include/generated/devicetree_unfixed.h
    Parsing %REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/Kconfig
    Loaded configuration '%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration '%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/prj.conf'
    Configuration saved to '%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/build/zephyr/.config'
    Kconfig header saved to '%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.3.1
    -- The CXX compiler identification is GNU 9.3.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
    CMake Warning at %REPOSITORY_HOME_PATH%/zephyrproject/zephyr/CMakeLists.txt:1327 (message):
    __ASSERT() statements are globally ENABLED


    statusUse Python and west to find the alexa-embedded path.
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Python37\lib\site-packages\west\manifest.py", line 476, in get_projects
    raise ValueError(unknown, uncloned)
    ValueError: (['Alexa-Gadgets-Embedded-Sample-Code'], [])
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Python37\lib\site-packages\west\manifest.py", line 476, in get_projects
    raise ValueError(unknown, uncloned)
    ValueError: (['nanopb'], [])
    -- Configuring done
    -- Generating done
    -- Build files have been written to: %REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/build
    -- west build: building application
    [17/252] cmd.exe /C "cd /D %REPOSITORY_HOME_PATH%\fw-nrfconnect-nrf.../fw-nrfconnect-nrf/build/generated/alexa/protobuf custom_event.proto"
    FAILED: src/gadgets/CMakeFiles/protobuf_generation_CUSTOM generated/alexa/protobuf/custom_event.pb.c
    cmd.exe /C "cd /D %REPOSITORY_HOME_PATH%\fw-nrfconnect-nrf\build\src\gadgets && "C:\Program Files\CMake\bin\cmake.exe" -E chdir %REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/src/gadgets/proto %REPOSITORY_HOME_PATH%/tools/vcpkg/Protoc/bin/protoc.exe -I. -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/ConnectionHelpers/BLE/Proto -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/ConnectionHelpers/BLE/Proto -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/ConnectionHelpers/BLE/Proto -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/ConnectionHelpers/BLE/Proto -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/parser -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/common -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/parser -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/common -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Discovery/Discover -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Discovery/Discover -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Discovery/Discover.Response -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Discovery/Discover.Response -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Notifications/SetIndicator -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Notifications/SetIndicator -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Notifications/ClearIndicator -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Notifications/ClearIndicator -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alerts/SetAlert -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alerts/SetAlert -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alerts/DeleteAlert -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alerts/DeleteAlert -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Gadget.StateListener/StateUpdate -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Gadget.StateListener/StateUpdate -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Gadget.SpeechData/Speechmarks -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Gadget.SpeechData/Speechmarks -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Gadget.MusicData/Tempo -I. -I%REPOSITORY_HOME_PATH%/ext/Alexa/Gadgets_sampleCode/AlexaGadgetsProtobuf/Alexa.Gadget.MusicData/Tempo -I. -I%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/src/gadgets/proto --nanopb_out=%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/build/generated/alexa/protobuf custom_event.proto"
    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 50, in <module>
    from .proto import nanopb_pb2
    ModuleNotFoundError: No module named '__main__.proto'; '__main__' is not a package

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 71, in <module>
    import proto.nanopb_pb2 as nanopb_pb2
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\proto\nanopb_pb2.py", line 9, in <module>
    from google.protobuf import symbol_database as _symbol_database
    File "C:\Python37\lib\site-packages\google\protobuf\symbol_database.py", line 189, in <module>
    _DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
    AttributeError: module 'google.protobuf.descriptor_pool' has no attribute 'Default'
    --nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
    [18/252] src\gadgets\CMakeFiles\protobuf_generation_MUSICDATA-6dfe0c4.bat 7fac4e11ef2aa6ff
    FAILED: src/gadgets/CMakeFiles/protobuf_generation_MUSICDATA generated/alexa/protobuf/alexaGadgetMusicDataTempoDirective.pb.c generated/alexa/protobuf/alexaGadgetMusicDataTempoDirectivePayload.pb.c
    src\gadgets\CMakeFiles\protobuf_generation_MUSICDATA-6dfe0c4.bat 7fac4e11ef2aa6ff
    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 50, in <module>
    from .proto import nanopb_pb2
    ModuleNotFoundError: No module named '__main__.proto'; '__main__' is not a package

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 71, in <module>
    import proto.nanopb_pb2 as nanopb_pb2
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\proto\nanopb_pb2.py", line 9, in <module>
    from google.protobuf import symbol_database as _symbol_database
    File "C:\Python37\lib\site-packages\google\protobuf\symbol_database.py", line 189, in <module>
    _DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
    AttributeError: module 'google.protobuf.descriptor_pool' has no attribute 'Default'
    --nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
    Batch file failed at line 3 with errorcode 1
    [19/252] src\gadgets\CMakeFiles\protobuf_generation_NOTIFICATIONS-bfcedad.bat 9cb15f0c95a18cff
    FAILED: src/gadgets/CMakeFiles/protobuf_generation_NOTIFICATIONS generated/alexa/protobuf/notificationsSetIndicatorDirective.pb.c generated/alexa/protobuf/notificationsSetIndicatorDirectivePayload.pb.c generated/alexa/protobuf/notificationsClearIndicatorDirective.pb.c generated/alexa/protobuf/notificationsClearIndicatorDirectivePayload.pb.c
    src\gadgets\CMakeFiles\protobuf_generation_NOTIFICATIONS-bfcedad.bat 9cb15f0c95a18cff
    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 50, in <module>
    from .proto import nanopb_pb2
    ModuleNotFoundError: No module named '__main__.proto'; '__main__' is not a package

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 71, in <module>
    import proto.nanopb_pb2 as nanopb_pb2
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\proto\nanopb_pb2.py", line 9, in <module>
    from google.protobuf import symbol_database as _symbol_database
    File "C:\Python37\lib\site-packages\google\protobuf\symbol_database.py", line 189, in <module>
    _DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
    AttributeError: module 'google.protobuf.descriptor_pool' has no attribute 'Default'
    --nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
    Batch file failed at line 3 with errorcode 1
    [20/252] src\gadgets\CMakeFiles\protobuf_generation_SPEECHDATA-a50db88.bat 7e08b61a9e35d07b
    FAILED: src/gadgets/CMakeFiles/protobuf_generation_SPEECHDATA generated/alexa/protobuf/alexaGadgetSpeechDataSpeechmarksDirective.pb.c generated/alexa/protobuf/alexaGadgetSpeechDataSpeechmarksDirectivePayload.pb.c
    src\gadgets\CMakeFiles\protobuf_generation_SPEECHDATA-a50db88.bat 7e08b61a9e35d07b
    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 50, in <module>
    from .proto import nanopb_pb2
    ModuleNotFoundError: No module named '__main__.proto'; '__main__' is not a package

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 71, in <module>
    import proto.nanopb_pb2 as nanopb_pb2
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\proto\nanopb_pb2.py", line 9, in <module>
    from google.protobuf import symbol_database as _symbol_database
    File "C:\Python37\lib\site-packages\google\protobuf\symbol_database.py", line 189, in <module>
    _DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
    AttributeError: module 'google.protobuf.descriptor_pool' has no attribute 'Default'
    --nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
    Batch file failed at line 3 with errorcode 1
    [21/252] src\gadgets\CMakeFiles\protobuf_generation_STATELISTENER-8c1e82a.bat d212201b72209005
    FAILED: src/gadgets/CMakeFiles/protobuf_generation_STATELISTENER generated/alexa/protobuf/alexaGadgetStateListenerStateUpdateDirective.pb.c generated/alexa/protobuf/alexaGadgetStateListenerStateUpdateDirectivePayload.pb.c
    src\gadgets\CMakeFiles\protobuf_generation_STATELISTENER-8c1e82a.bat d212201b72209005
    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 50, in <module>
    from .proto import nanopb_pb2
    ModuleNotFoundError: No module named '__main__.proto'; '__main__' is not a package

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 71, in <module>
    import proto.nanopb_pb2 as nanopb_pb2
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\proto\nanopb_pb2.py", line 9, in <module>
    from google.protobuf import symbol_database as _symbol_database
    File "C:\Python37\lib\site-packages\google\protobuf\symbol_database.py", line 189, in <module>
    _DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
    AttributeError: module 'google.protobuf.descriptor_pool' has no attribute 'Default'
    --nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
    Batch file failed at line 3 with errorcode 1
    [22/252] src\gadgets\CMakeFiles\protobuf_generation_BASE-aa7d0b8.bat 5a7f92dc64169ead
    FAILED: src/gadgets/CMakeFiles/protobuf_generation_BASE generated/alexa/protobuf/accessories.pb.c generated/alexa/protobuf/common.pb.c generated/alexa/protobuf/device.pb.c generated/alexa/protobuf/firmware.pb.c generated/alexa/protobuf/directiveParser.pb.c generated/alexa/protobuf/directiveHeader.pb.c generated/alexa/protobuf/eventParser.pb.c generated/alexa/protobuf/eventHeader.pb.c generated/alexa/protobuf/alexaDiscoveryDiscoverDirective.pb.c generated/alexa/protobuf/alexaDiscoveryDiscoverDirectivePayload.pb.c generated/alexa/protobuf/alexaDiscoveryDiscoverResponseEvent.pb.c generated/alexa/protobuf/alexaDiscoveryDiscoverResponseEventPayload.pb.c
    src\gadgets\CMakeFiles\protobuf_generation_BASE-aa7d0b8.bat 5a7f92dc64169ead
    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 50, in <module>
    from .proto import nanopb_pb2
    ModuleNotFoundError: No module named '__main__.proto'; '__main__' is not a package

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 71, in <module>
    import proto.nanopb_pb2 as nanopb_pb2
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\proto\nanopb_pb2.py", line 9, in <module>
    from google.protobuf import symbol_database as _symbol_database
    File "C:\Python37\lib\site-packages\google\protobuf\symbol_database.py", line 189, in <module>
    _DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
    AttributeError: module 'google.protobuf.descriptor_pool' has no attribute 'Default'
    --nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
    Batch file failed at line 3 with errorcode 1
    [23/252] src\gadgets\CMakeFiles\protobuf_generation_ALERTS-c170e20.bat 8e08add4a8d905a9
    FAILED: src/gadgets/CMakeFiles/protobuf_generation_ALERTS generated/alexa/protobuf/alertsSetAlertDirective.pb.c generated/alexa/protobuf/alertsSetAlertDirectivePayload.pb.c generated/alexa/protobuf/alertsDeleteAlertDirective.pb.c generated/alexa/protobuf/alertsDeleteAlertDirectivePayload.pb.c
    src\gadgets\CMakeFiles\protobuf_generation_ALERTS-c170e20.bat 8e08add4a8d905a9
    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 50, in <module>
    from .proto import nanopb_pb2
    ModuleNotFoundError: No module named '__main__.proto'; '__main__' is not a package

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\\nanopb_generator.py", line 71, in <module>
    import proto.nanopb_pb2 as nanopb_pb2
    File "%REPOSITORY_HOME_PATH%\tools\nanopb\nanopb-0.4.2-windows-x86\generator\proto\nanopb_pb2.py", line 9, in <module>
    from google.protobuf import symbol_database as _symbol_database
    File "C:\Python37\lib\site-packages\google\protobuf\symbol_database.py", line 189, in <module>
    _DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
    AttributeError: module 'google.protobuf.descriptor_pool' has no attribute 'Default'
    --nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
    Batch file failed at line 3 with errorcode 1
    [26/252] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build '%REPOSITORY_HOME_PATH%\fw-nrfconnect-nrf\build'

    %REPOSITORY_HOME_PATH%\fw-nrfconnect-nrf>

  • Try running the following:

    cd <sourcecode_root>\ncs
    pip3 install -r zephyr\scripts\requirements.txt
    pip3 install -r nrf\scripts\requirements.txt
    pip3 install -r bootloader\mcuboot\scripts\requirements.txt

    Best regards,

    Simon

  • Hi Simon,

    Thanks for your reply. I did the commands you told me but all of the requirements where already satisfied.

    The error message has not changed as well when I retry my command:

    >west build -p auto -b nrf52840dk_nrf52840 samples/bluetooth/alexa_gadget

  • Hi, I've found something

    I've uninstalled all protobuf packages (also python3-protobuf) using pip.

    Reinstalled only the protobuf 

    >pip3 install protobuf

    And it got me further now. I only neet to figure out how 2 files are not found.

    Got the following error now:

    >west build -p auto -b nrf52840dk_nrf52840 samples/bluetooth/alexa_gadget
    [211/243] Building C object src/gadgets/CMakeFiles/ALEXA_GADGETS_PROFILE.dir/gadgets_profile.c.obj
    FAILED: src/gadgets/CMakeFiles/ALEXA_GADGETS_PROFILE.dir/gadgets_profile.c.obj
    C:\gnuarmemb\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v2.4.0-rc1-117-g6c53e9331854 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/include -Izephyr/include/generated -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/subsys/settings/include -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/subsys/bluetooth -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/subsys/bluetooth/controller/ll_sw/nordic -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/nordic/nrfx -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/nordic/nrfx/drivers/include -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/nordic/nrfx/mdk -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/nordic/. -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/debug/segger/rtt -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/crypto/tinycrypt/lib/include -IC:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/src/gadgets -Igenerated/alexa/protobuf -IC:%REPOSITORY_HOME_PATH%/nanopb-0.4.2-windows-x86 -isystem C:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/lib/libc/minimal/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.3.1/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.3.1/include-fixed -Os -imacros C:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m4 -mthumb -mabi=aapcs -imacros C:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:%REPOSITORY_HOME_PATH%/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT src/gadgets/CMakeFiles/ALEXA_GADGETS_PROFILE.dir/gadgets_profile.c.obj -MF src\gadgets\CMakeFiles\ALEXA_GADGETS_PROFILE.dir\gadgets_profile.c.obj.d -o src/gadgets/CMakeFiles/ALEXA_GADGETS_PROFILE.dir/gadgets_profile.c.obj -c C:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/src/gadgets/gadgets_profile.c
    C:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/src/gadgets/gadgets_profile.c:12:10: fatal error: bluetooth/services/gadgets.h: No such file or directory
    12 | #include <bluetooth/services/gadgets.h>
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    [212/243] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    C:\gnuarmemb\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v2.4.0-rc1-117-g6c53e9331854 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/include -Izephyr/include/generated -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/subsys/settings/include -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/subsys/bluetooth -IC:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/subsys/bluetooth/controller/ll_sw/nordic -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/nordic/nrfx -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/nordic/nrfx/drivers/include -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/nordic/nrfx/mdk -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/hal/nordic/. -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/debug/segger/rtt -IC:%REPOSITORY_HOME_PATH%/zephyrproject/modules/crypto/tinycrypt/lib/include -IC:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/src/gadgets -Igenerated/alexa/protobuf -IC:%REPOSITORY_HOME_PATH%/nanopb-0.4.2-windows-x86 -isystem C:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/lib/libc/minimal/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.3.1/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.3.1/include-fixed -Os -imacros C:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m4 -mthumb -mabi=aapcs -imacros C:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:%REPOSITORY_HOME_PATH%/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:%REPOSITORY_HOME_PATH%/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c C:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/src/main.c
    C:%REPOSITORY_HOME_PATH%/fw-nrfconnect-nrf/samples/bluetooth/alexa_gadget/src/main.c:17:10: fatal error: dk_buttons_and_leds.h: No such file or directory
    17 | #include <dk_buttons_and_leds.h>
    | ^~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    [220/243] Building C object src/gadgets/CMakeFiles/ALEXA_GADGETS_PROFILE.dir/__/__/generated/alexa/protobuf/eventHeader.pb.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build '%REPOSITORY_HOME_PATH%\fw-nrfconnect-nrf\build'

    >

  • Mysteryduck said:
    bluetooth/services/gadgets.h: No such file or directory
    12 | #include <bluetooth/services/gadgets.h>

    I think can be solved by simply adding the gadgets.h file to nrf/include/bluetooth/services.

    Check out this commit, which I think includes all the changes that should get applied to the nrf repository in order to make the Alexa Gadgets service sample to work.

    Best regards,

    Simon

Related