MCUBoot, custom key, FLASH_MAP / FLASH_HAS_DRIVER_ENABLED warning

Hi,

I am trying to add OTA DFU functionality to our project using 1-stage MCUBoot. It works fine when I use the default key, I can update OTA firmware. To add a custom key to project, I followed these steps:

1. Added: set(mcuboot_CONF_FILE "${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf") to CMakeLists.txt

2. Created: mcuboot.conf file and added:

CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=n
CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_SIGNATURE_KEY_FILE="priv.pem"

3. Created a custom key using: openssl genrsa -out priv.pem 2048 ,key is in application folder.

I get the following issue during compilation:

warning: FLASH_MAP (defined at c:\repo\firmware-rtos\build\subsys\storage\flash_map\Kconfig:10) has direct dependencies FLASH_HAS_DRIVER_ENABLED with value n, but is currently being y-selected by the following symbols:
 - MCUBOOT_DEVICE_SETTINGS (defined at C:\ncs\v2.0.0\bootloader\mcuboot\boot\zephyr\Kconfig:715), with value y, direct dependencies y (value: y)

error: Aborting due to Kconfig warnings

Device has flash driver enabled:

CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y

nRF5340

SDK 2.0.0

Regards

Sebastian

Parents
  • Hi,

    Could you try out 2 options for adding mcuboot.conf as shown below? 

    1)
    Adding configuration options is possible by using OVERLAY_CONFIG. You can add several lines to <your_project_folder>\CMakeLists.txt file just below cmake_minimum_required(...)

    set(mcuboot_OVERLAY_CONFIG
      ${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf
    )


    Then, add your mcuboot.conf file to <your_project_folder>

    2)
    Another option would be to create child_image folder inside <your_project_folder> and put your mcuboot.conf there.

    What are the results of both options? Do you get the same error?

    Best regards,
    Dejan

Reply
  • Hi,

    Could you try out 2 options for adding mcuboot.conf as shown below? 

    1)
    Adding configuration options is possible by using OVERLAY_CONFIG. You can add several lines to <your_project_folder>\CMakeLists.txt file just below cmake_minimum_required(...)

    set(mcuboot_OVERLAY_CONFIG
      ${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf
    )


    Then, add your mcuboot.conf file to <your_project_folder>

    2)
    Another option would be to create child_image folder inside <your_project_folder> and put your mcuboot.conf there.

    What are the results of both options? Do you get the same error?

    Best regards,
    Dejan

Children
No Data
Related