How to "relocate" settings_storage when designing a pm_static.yml file?

Hi, I have two firmware images: A and B which I need to make compatible for OTA (DFU over BLE using MCUBoot - the standard process described in the devacademy course). They're both using the same (custom) private key and currently, I am trying to make sure they both share a common pm_static.yml file. From going through some discussions here I've understood that the common practice is to freeze the dynamically generated partitions.yml file into a pm_static.yml when done. But this will not work for me because A and B produce different partitions.yml

Below I have provided their dynamically generated partitions (TLDR: A's app sizes are larger by 0x1000 BUT has a settings_storage entry that does not).

A's partitions.yml:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
app:
address: 0xc200
end_address: 0x46000
region: flash_primary
size: 0x39e00
mcuboot:
address: 0x0
end_address: 0xc000
placement:
before:
- mcuboot_primary
region: flash_primary
size: 0xc000
mcuboot_pad:
address: 0xc000
end_address: 0xc200
placement:
align:
start: 0x1000
before:
- mcuboot_primary_app
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

B's partitions.yml:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
app:
address: 0xc200
end_address: 0x45000
region: flash_primary
size: 0x38e00
mcuboot:
address: 0x0
end_address: 0xc000
placement:
before:
- mcuboot_primary
region: flash_primary
size: 0xc000
mcuboot_pad:
address: 0xc000
end_address: 0xc200
placement:
align:
start: 0x1000
before:
- mcuboot_primary_app
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

My goal is to create a single pm_static.yml that both the builds of A and B can use. My approach: take A's app sizes (since they are larger and would accommodate B) and relocate settings_storage by an appropriate amount 0x2000 and making sure there are no gaps:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
app:
address: 0xc200
end_address: 0x46000
region: flash_primary
size: 0x39e00
mcuboot:
address: 0x0
end_address: 0xc000
placement:
before:
- mcuboot_primary
region: flash_primary
size: 0xc000
mcuboot_pad:
address: 0xc000
end_address: 0xc200
placement:
align:
start: 0x1000
before:
- mcuboot_primary_app
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

As you can see: the app sizes are made to match that of A and settings_storage is relocated from (0x7e000 - 0x80000) to (0x80000 - 0x82000). When trying to build, both compile just fine. But B fails to run with the error:

Fullscreen
1
bt_settings: settings_subsys_init failed (err -33)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

and the bt module fails to load completely (i do not see any advertising).

My question is: is it possible to change the start and end addresses for the storage_settings like I am attempting to do? Any suggestions are welcome.