Cannot compile project due to memory overflow in a BC805M

Hello, I am trying to compile my project to upload it to a BC805M using nrf 52DK

I have uploaded some sample code so I know flashing works

The problem is when I try to build my custom code I can get 2 errors either

1. Error: Image size (0x133c8) + trailer (0x630) exceeds requested size 0x200

or

2. c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `text' will not fit in region `FLASH'
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 12920 bytes

I have already used this solution but it seems it does not fix the problem. Do you have any suggestion? Thank you

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
Related