Hello,
I'm attempting to re-build my application to run on an Adafruit Feather nRF52840 Express instead of the nRF52840DK that I have. When I build the application targeting the nRF52840DK it builds fine, but when I target the Feather I get the following error:
zephyr/zephyr_pre0.elf section `text' will not fit in region `FLASH'
region `FLASH' overflowed by 350472 bytes
Other than the boards being different, the only differences between the two builds that I can think of are in the overlays. The nrf52840dk_nrf52840.overlay is as follows:
/* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
};
buttons {
factoryreset {
gpios = <&gpio0 29 (GPIO_PULL_DOWN)>;
};
};
};
/ {
/*
* In some default configurations within the nRF Connect SDK,
* e.g. on nRF52840, the chosen zephyr,entropy node is &cryptocell.
* This devicetree overlay ensures that default is overridden wherever it
* is set, as this application uses the RNG node for entropy exclusively.
*/
chosen {
zephyr,entropy = &rng;
};
};
/* Disable unused peripherals to reduce power consumption */
&adc {
status = "disabled";
};
&uart1 {
status = "disabled";
};
&i2c0 {
mysensor: mysensor@70{
compatible = "i2c-device";
status = "okay";
reg = < 0x70 >;
};
};
&pwm0 {
status = "disabled";
};
&spi1 {
status = "disabled";
};
&spi3 {
status = "disabled";
};
&usbd {
status = "disabled";
};
the adafruit_feather_nrf52840.overlay is as follows:
/ {
buttons {
factoryreset {
gpios = <&gpio0 29 (GPIO_PULL_DOWN)>;
};
};
};
/* Disable unused peripherals to reduce power consumption */
&adc {
status = "disabled";
};
&uart1 {
status = "disabled";
};
&i2c0 {
mysensor: mysensor@70{
compatible = "i2c-device";
status = "okay";
reg = < 0x70 >;
};
};
&pwm0 {
status = "disabled";
};
&spi1 {
status = "disabled";
};
&spi3 {
status = "disabled";
};
&usbd {
status = "disabled";
};
I'm assuming the missing link is that external memory, but I'm not sure what options I have to cut down on the memory. I've tried flipping a few things in the config, but it's only shaved off a few bytes. The fact that the overflow is so huge also makes me feel like something else is happening here. This is the project.conf I'm using:
# # Copyright (c) 2021 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # # This sample uses Kconfig.defaults to set options common for all # samples. This file should contain only options specific for this sample # or overrides of default values. # Enable CHIP CONFIG_CHIP=y CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y CONFIG_CHIP_PROJECT_CONFIG="src/chip_project_config.h" # 32768 == 0x8000 (example Product ID added temporaly, # but it must be changed with proper PID from the list: # https://github.com/project-chip/connectedhomeip/blob/482e6fd03196a6de45465a90003947ef4b86e0b1/docs/examples/discussion/PID_allocation_for_example_apps.md) CONFIG_CHIP_DEVICE_PRODUCT_ID=32768 CONFIG_STD_CPP14=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y # Bluetooth Low Energy configuration CONFIG_BT_DEVICE_NAME="MatterTemplate" # Other settings CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n CONFIG_CHIP_LIB_SHELL=y # Disable NFC commissioning CONFIG_CHIP_NFC_COMMISSIONING=n # Reduce application size CONFIG_USE_SEGGER_RTT=y CONFIG_RTT_CONSOLE=y CONFIG_UART_CONSOLE=n CONFIG_I2C=y
Any advice or insight would be appreciated.