Skip to content

Commit 5fdacc4

Browse files
MIMXRT1050_EVt: keep hyperflash_config/image_vector_table symbols in LTO builds
Add a "used" attribute to hyperflash_config/image_vector_table to fix ARMC6 build with the "-flto" flag. (Error: L6236E: No section matches selector - no section to be FIRST/LAST. ) This attribute, attached to a function/variable, means that code must be emitted for the function even if it appears that the function is not referenced.
1 parent cf1e1dd commit 5fdacc4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/TARGET_EVK/xip/evkbimxrt1050_flexspi_nor_config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
******************************************************************************/
1818
#if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1)
1919
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__)
20-
__attribute__((section(".boot_hdr.conf")))
20+
__attribute__((section(".boot_hdr.conf"), used))
2121
#elif defined(__ICCARM__)
2222
#pragma location = ".boot_hdr.conf"
2323
#endif

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_flexspi_nor_boot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1)
1616
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__)
17-
__attribute__((section(".boot_hdr.ivt")))
17+
__attribute__((section(".boot_hdr.ivt"), used))
1818
#elif defined(__ICCARM__)
1919
#pragma location=".boot_hdr.ivt"
2020
#endif

0 commit comments

Comments
 (0)