How to increase the flash memory allocated for the secure world/custom secure partition?

In the application I try to run the non-secure world mainly just calls functions/services in a custom partition in the secure world, which has more own code and also extensively uses cryptographic libraries. So the secure world is larger (and even more so as it currently has some flags enabled to be able to use the heap) and lacking for flash memory (not ram), while the non-secure world doesn't need the flash-memory allocated for it.
(This is SDK v2.6.1 with a nRF9161.)

How do I increase the amount of flash memory allocated for my custom secure partition/the secure world?


Tried but doesn't seem to be the method:
Editing these two files didn't seem to change anything.

/home/usern/ncs/zephyr/boards/arm/nrf9161dk_nrf9161/nrf9161dk_nrf9161_common.dtsi
/home/usern/ncs/zephyr/boards/arm/nrf9161dk_nrf9161/nrf9161dk_nrf9161_partition_conf.dtsi


In /home/usern/ncs/zephyr/boards/arm/nrf9161dk_nrf9161/nrf9161dk_nrf9161_common.dtsi I increased the adresses of slot0_ns_partition and slot1_ns_partition in the following section:
&flash0 {
    partitions {
        compatible = "fixed-partitions";
        #address-cells = <1>;
        #size-cells = <1>;

        boot_partition: partition@0 {
            label = "mcuboot";
            reg = <0x00000000 0x10000>;
        };
        slot0_partition: partition@10000 {
            label = "image-0";
        };
        slot0_ns_partition: partition@60000 {
            label = "image-0-nonsecure";
        };
        slot1_partition: partition@85000 {
            label = "image-1";
        };
        slot1_ns_partition: partition@d5000 {
            label = "image-1-nonsecure";
        };
        storage_partition: partition@fa000 {
            label = "storage";
            reg = <0x000fa000 0x00006000>;
        };
    };
};


I edited /home/usern/ncs/zephyr/boards/arm/nrf9161dk_nrf9161/nrf9161dk_nrf9161_partition_conf.dtsi so that the adresses and lengths matched the other file.
&slot0_partition {
    reg = <0x00010000 0x40000>;
};

&slot0_ns_partition {
    reg = <0x00060000 0x25000>;
};

&slot1_partition {
    reg = <0x00085000 0x10000>;
};

&slot1_ns_partition {
    reg = <0x000d5000 0x25000>;
};

Parents Reply Children
Related