Following the BLE DFU tutorial is causing errors and wont build

I am following along with the BLE DFU tutorial found here https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu but when I attempt to build it I get errors and the build fails. 

CMake Error at C:\Users\jb\ncs\v1.8.0\nrf\cmake\partition_manager.cmake:562 (math):
  math cannot parse the expression: " + - ": syntax error, unexpected end of
  file (18).
Call Stack (most recent call first):
  C:\Users\jb\ncs\v1.8.0\zephyr\cmake\app\boilerplate.cmake:665 (include)
  C:\Users\jb\ncs\v1.8.0\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:24 (include)
  C:\Users\jb\ncs\v1.8.0\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:35 (include_boilerplate)
  d:\ble_dfu_test2\build\CMakeLists.txt:12 (find_package)


Traceback (most recent call last):
  File "C:/Users/jb/ncs/v1.8.0/nrf/scripts/partition_manager_output.py", line 222, in <module>
    main()
  File "C:/Users/jb/ncs/v1.8.0/nrf/scripts/partition_manager_output.py", line 218, in main
    write_gpm_config(gpm_config, greg_config, name, header_file)
  File "C:/Users/jb/ncs/v1.8.0/nrf/scripts/partition_manager_output.py", line 114, in write_gpm_config
    if any('span' in x for x in gpm_config[domain][image]):
KeyError: 'mcuboot'
CMake Error at C:\Users\jb\ncs\v1.8.0\nrf\cmake\partition_manager.cmake:597 (message):
  Partition Manager GLOBAL output generation failed,

      aborting. Command: C:/Users/jb/ncs/v1.8.0/toolchain/opt/bin/python.exe;C:/Users/jbclyde/ncs/v1.8.0/nrf/scripts/partition_manager_output.py;--input-partitions;D:/Work(skillz)/minigp/proto_v1/ble_dfu_test2/build/partitions.yml;--input-regions;D:/Work(skillz)/minigp/proto_v1/ble_dfu_test2/build/regions.yml;--header-files;D:/Work;(;skillz;);/minigp/proto_v1/ble_dfu_test2/build/mcuboot/zephyr/include/generated/pm_config.h;D:/Work(skillz)/minigp/proto_v1/ble_dfu_test2/build/zephyr/include/generated/pm_config.h;--images;:mcuboot;:app
Call Stack (most recent call first):
  C:\Users\jb\ncs\v1.8.0\zephyr\cmake\app\boilerplate.cmake:665 (include)
  C:\Users\jb\ncs\v1.8.0\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:24 (include)
  C:\Users\jb\ncs\v1.8.0\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:35 (include_boilerplate)
  d:\ble_dfu_test2\build\CMakeLists.txt:12 (find_package)

along with several warnings 

warning: LOG_DEFAULT_LEVEL (defined at C:\Users\jbclyde\ncs\v1.8.0\nrf\samples\Kconfig:89,
d:\ble_dfu_test2\build\subsys\logging\Kconfig.filtering:13) was assigned the value '0' but got the value ''. Check these
unsatisfied dependencies: (LOG || LOG) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LOG_DEFAULT_LEVEL.html and/or look up
LOG_DEFAULT_LEVEL in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.


warning: BOOTLOADER_MCUBOOT (defined at d:\ble_dfu_test2\build\Kconfig.zephyr:561) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: (!MCUBOOT) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_BOOTLOADER_MCUBOOT.html and/or look up
BOOTLOADER_MCUBOOT in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.


warning: The choice symbol LOG_MODE_MINIMAL (defined at d:\ble_dfu_test2\build\subsys\logging\Kconfig.mode:45) was selected
(set =y), but no symbol ended up as the choice selection. See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LOG_MODE_MINIMAL.html and/or look up
LOG_MODE_MINIMAL in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.

If you can help me understand what might be wrong and how to fix it that would be appreciated. Thank you

Parents
  • Hi,

    Could I see your prj.conf file? I suspect that you have CONFIG_MCUBOOT=y in your application, which is not correct. If you have that config, try removing it.

  • CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="Nordic_LBS"
    
    # Enable the LBS service
    CONFIG_BT_LBS=y
    CONFIG_BT_LBS_POLL_BUTTON=y
    CONFIG_DK_LIBRARY=y
    
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Enable mcumgr.
    CONFIG_MCUMGR=y
    
    # Enable most core commands.
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    
    # Ensure an MCUboot-compatible binary is generated.
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # Allow for large Bluetooth data packets.
    CONFIG_BT_L2CAP_TX_MTU=252
    CONFIG_BT_BUF_ACL_RX_SIZE=256
    
    # Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
    CONFIG_MCUMGR_SMP_BT=y
    CONFIG_MCUMGR_SMP_BT_AUTHEN=n
    
    # Some command handlers require a large stack.
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    
    CONFIG_UART_CONSOLE=n
    CONFIG_RTT_CONSOLE=y
    CONFIG_USE_SEGGER_RTT=y

    It's not in my prj.conf, is there another place I should check?

Reply
  • CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="Nordic_LBS"
    
    # Enable the LBS service
    CONFIG_BT_LBS=y
    CONFIG_BT_LBS_POLL_BUTTON=y
    CONFIG_DK_LIBRARY=y
    
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Enable mcumgr.
    CONFIG_MCUMGR=y
    
    # Enable most core commands.
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    
    # Ensure an MCUboot-compatible binary is generated.
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # Allow for large Bluetooth data packets.
    CONFIG_BT_L2CAP_TX_MTU=252
    CONFIG_BT_BUF_ACL_RX_SIZE=256
    
    # Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
    CONFIG_MCUMGR_SMP_BT=y
    CONFIG_MCUMGR_SMP_BT_AUTHEN=n
    
    # Some command handlers require a large stack.
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    
    CONFIG_UART_CONSOLE=n
    CONFIG_RTT_CONSOLE=y
    CONFIG_USE_SEGGER_RTT=y

    It's not in my prj.conf, is there another place I should check?

Children
No Data
Related