Skip to content

Commit 58fd111

Browse files
committed
samples: bluetooth: fast_pair: locator_tag: enable lto in debug config
Enabled the Link Time Optimization (LTO) in the debug (default) configuration of the Fast Pair Locator Tag sample to get it aligned with the release configuration. Signed-off-by: Kamil Piszczek <[email protected]>
1 parent 2a782f4 commit 58fd111

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,11 @@ Bluetooth Fast Pair samples
447447
Integrated the new connection authentication callback from the FMDN module and the Device Information Service (DIS) to support firmware version read operation over the Firmware Revision characteristic.
448448
For further details on the Android intent feature for firmware updates, see the :ref:`ug_bt_fast_pair_provisioning_register_firmware_update_intent` section of the Fast Pair integration guide.
449449

450-
* Updated the partition layout for the ``nrf5340dk/nrf5340/cpuapp/ns`` and ``thingy53/nrf5340/cpuapp/ns`` board targets to accommodate the partitions needed due to change in the TF-M profile configuration.
450+
* Updated:
451+
452+
* The partition layout for the ``nrf5340dk/nrf5340/cpuapp/ns`` and ``thingy53/nrf5340/cpuapp/ns`` board targets to accommodate the partitions needed due to change in the TF-M profile configuration.
453+
* The debug (default) configuration of the main image to enable the Link Time Optimization (LTO) with the :kconfig:option:`CONFIG_LTO` Kconfig option.
454+
This change ensures consistency with the sample release configuration that has the LTO feature enabled by default.
451455

452456
Bluetooth Mesh samples
453457
----------------------

samples/bluetooth/fast_pair/locator_tag/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ The build will use the :file:`prj_release.conf` configuration file instead of :f
535535
Check the contents of both files to learn which configuration changes you should apply when preparing the production build of your end product.
536536

537537
The release build reduces the code size and RAM usage of the sample by disabling logging functionality and performing other optimizations.
538-
Additionally, it enables the Link Time Optimization (LTO) configuration through the :kconfig:option:`CONFIG_LTO` Kconfig option, which further reduces the code size.
539-
LTO is an advanced compilation technique that optimizes across all compiled units of an application at the link stage, rather than optimizing each unit separately.
540538

541539
See :ref:`cmake_options` for detailed instructions on how to add the ``FILE_SUFFIX=release`` option to your build.
542540
For example, when building from the command line, you can add it as follows:

samples/bluetooth/fast_pair/locator_tag/configuration/prj.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Nordic Semiconductor
2+
# Copyright (c) 2024-2025 Nordic Semiconductor
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
@@ -16,6 +16,10 @@ CONFIG_NCS_APPLICATION_BOOT_BANNER_STRING="NCS locator tag"
1616
# Error handling configuration
1717
CONFIG_RESET_ON_FATAL_ERROR=n
1818

19+
# Activate LTO
20+
CONFIG_LTO=y
21+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
22+
1923
# Enable settings to store data in non-volatile memory
2024
CONFIG_FLASH=y
2125
CONFIG_FLASH_MAP=y

0 commit comments

Comments
 (0)