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

Change mcuboot_menuconfig configuration

Hi,

I change the configuration  in proj.conf by adding 

e.g.

CONFIG_SERIAL=n

It works .

However, I want to change similar things for the mcuboot_menuconfig  after mcuboot is enabled, it seems it didn't work if writing something on proj.conf.

For mcuboot setting, it can only be set  in the SES by Project>Congifgure NRF Connect SDK Project> mcuboot_menuconfig. 

  

What is the way to change the configuration for mcuconfig simply like wiring on proj.conf? Is there any .conf file for mcuboot?

Thanks.

 

Parents
  • Hi,

     

    In your applications CMakeLists.txt file, you can add this just below the cmake_minimum_required() line:

    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/spm.conf")
      set(spm_CONF_FILE
        prj.conf
        ${CMAKE_CURRENT_LIST_DIR}/spm.conf
      )
    endif()
    
    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf")
      set(mcuboot_CONF_FILE
        prj.conf
        ${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf
      )
    endif()
    
    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${BOARD}.overlay")
      set(mcuboot_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${BOARD}.overlay")
      set(spm_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${BOARD}.overlay")
    endif()

     

    This will allow you to create a mcuboot.conf file, with your wanted settings (in this case: CONFIG_SERIAL=n), as well as for the spm by adding wanted settings in spm.conf.

     

    Note that this also overlays your settings to the spm and mcuboot settings (if applicable).

     

    Cheers,

    Håkon

Reply
  • Hi,

     

    In your applications CMakeLists.txt file, you can add this just below the cmake_minimum_required() line:

    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/spm.conf")
      set(spm_CONF_FILE
        prj.conf
        ${CMAKE_CURRENT_LIST_DIR}/spm.conf
      )
    endif()
    
    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf")
      set(mcuboot_CONF_FILE
        prj.conf
        ${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf
      )
    endif()
    
    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${BOARD}.overlay")
      set(mcuboot_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${BOARD}.overlay")
      set(spm_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${BOARD}.overlay")
    endif()

     

    This will allow you to create a mcuboot.conf file, with your wanted settings (in this case: CONFIG_SERIAL=n), as well as for the spm by adding wanted settings in spm.conf.

     

    Note that this also overlays your settings to the spm and mcuboot settings (if applicable).

     

    Cheers,

    Håkon

Children
No Data
Related