MCUBoot: adding custom serial flash driver as secondary partition

We use spi flash with custom driver and goal is to set it to act as secondary partition for MCUBoot.

The question is how to adapt driver to be accepted by MCUBoot, maybe there is an example on how driver should look like?

As far as I understand Nordic supports mx25r64, what files have to be produced and where to place them to enable custom driver to be accepted by MCUBoot?

Parents Reply
  • Thank you for clarification, Simon.

    At the moment I am struggling with this error: "zephyr\include\generated\devicetree_unfixed.h:6002:34: error: 'DT_N_S_soc_S_spi_40023000_S_at25xe081_0_P_size' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_40023000_S_at25xe081_0_P_reg".

    I added this to my_board.dts file:

    &spi2 {
    	status = "okay";
    	at25xe081: at25xe081@0 {
    		compatible = "at25xe081";
    		reg = <0>;
    		label = "AT25XE081";
    		size = <67108864>;
    	};
    };

    And in my driver wrapper I added #define DT_DRV_COMPAT at25xe081. However it seems that size property is not found when I am doing: flash_size = DT_INST_PROP(0, size) / 8. What I am missing here?

Children
Related