Conditioanl compilation.

I am using mcuboot with the child image functionality.
my app should work for nrf52840dk and nrf5340dk.
I want to set up the configurations so that for each board, the right configurations would be chosen.
For the main image, I know this is pretty simple, I can just add the specific board configurations I want for nrf5340dk to nrf5340dk_nrf5340_cpuapp.conf for example.

How do I do the equivalent for the child image? 

I need to add:

CONFIG_BOOT_IMAGE_ACCESS_HOOK_NRF5340=y
CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y

CONFIG_NRF53_MULTI_IMAGE_UPDATE=y
CONFIG_UPDATEABLE_IMAGE_NUMBER=2
CONFIG_PCD_APP=y

to the mcuboot child image on lt when it is flashed to the nrf5340dk.


thanks in advance, 
shlomo
Parents Reply Children
  • thanks, few followups,
    1. I actually found out I can do that few moments ago, but the problem is once I create this mcuboot folder, it doesn't take the base prj.conf of the mcuboot imagae, forcing me to write one myself and putting it inside the mcuboot folder. If I create this folder, it means I have to override the entire prj.conf?
    2. I am also trying to take diffrent pm_static files for each board. I am trying to use the pm_static_<board name>.yaml convetntion but for some reason the build system doesnt pick it up, why is that?
    I am using ncs 2.7.0.

Related