BLE Repeater Application ROM size problem

Hi

I am working on a BLE repeater which is central and peripheral application. which will scan and connecting with sensor device , and advertising for phone connection.

but the rom size is too large now. I cannot adding OTA function. there is my application memory report,  it take around 254 kB. if I split the ROM area for 2 image. my application oversize. 

In partition planning, I already reduce the MCUBoot area to  28kB , and setting page reduced to 8kB, 

and following is my config setting 

#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_NCS_SAMPLES_DEdddd
CONFIG_BT_GATT_DM=y


CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_USER_DATA_LEN_UPDATE=y


CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_CTLR_PHY_CODED=y

CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y

CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n

#DIS

CONFIG_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y

CONFIG_BT_DIS=y
CONFIG_BT_DIS_SETTINGS=y
CONFIG_BT_DIS_FW_REV=y
CONFIG_BT_DIS_FW_REV_STR="0.0.8"
CONFIG_BT_DIS_HW_REV=y
CONFIG_BT_DIS_HW_REV_STR="0.0.7"
CONFIG_BT_DIS_SW_REV=y
CONFIG_BT_DIS_SW_REV_STR="2.0.0"
CONFIG_BT_DIS_MANUF="WA"
CONFIG_BT_DIS_MODEL="AQ41-G2"
CONFIG_BT_DIS_SERIAL_NUMBER=y


CONFIG_GPIO=y


#BAS
CONFIG_BT_BAS=y


# Enable the LBS service
CONFIG_BT_LBS=n
CONFIG_BT_LBS_POLL_BUTTON=n
CONFIG_DK_LIBRARY=n


# DEBUG LOG

CONFIG_PRINTK=y
CONFIG_LOG=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_BT_DEBUG_NONE=n
CONFIG_EARLY_CONSOLE=n
CONFIG_BT_ASSERT=y

# CONFIG_PRINTK=n
# CONFIG_LOG=n
# CONFIG_RTT_CONSOLE=n
# CONFIG_UART_CONSOLE=n
# CONFIG_USE_SEGGER_RTT=n
# CONFIG_LOG_BACKEND_RTT=n
# CONFIG_BT_DEBUG_NONE=y
# CONFIG_EARLY_CONSOLE=n
# CONFIG_BT_ASSERT=n


CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

#ADC
CONFIG_ADC=y
CONFIG_ADC_NRFX_SAADC=y
CONFIG_NRFX_SAADC=y


#Power
CONFIG_PM=y
CONFIG_PM_DEVICE=y
CONFIG_POWEROFF=y
CONFIG_REBOOT=y

does any setting can help for reduce the size for OTA function. 

but there are some limitation , 

1. we cannot setting optimization

2. we are using nRF52833 ,only 512kB flash area

3. we cannot add extern flash IC for OTA. 

Do any idea to reduce the rom size or increase the image size. 

Thank a lot

Related