Skip to content

Commit 12261ed

Browse files
EV_COG_AD3029LZ: keep IVT_NAME/blank_checksum symbols in LTO builds
Add a "used" attribute to IVT_NAME/blank_checksum 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, means that code must be emitted for the function even if it appears that the function is not referenced.
1 parent a761ec5 commit 12261ed

File tree

1 file changed

+8
-1
lines changed
  • targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TARGET_EV_COG_AD3029LZ/device

1 file changed

+8
-1
lines changed

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TARGET_EV_COG_AD3029LZ/device/startup_ADuCM3029.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ extern void SramInit(void);
6262

6363
#if defined( __ICCARM__)
6464
__root
65-
#endif /* __ICCARM__ */
65+
#else
66+
__attribute__((used))
67+
#endif
6668
const uint32_t SECTION_PLACE(blank_checksum[],".checksum") =
6769
{
6870
BLANKX60,BLANKX600
@@ -139,6 +141,11 @@ WEAK_FUNCTION( DMA_SIP7_Int_Handler )
139141
/*----------------------------------------------------------------------------
140142
Exception / Interrupt Vector table
141143
*----------------------------------------------------------------------------*/
144+
#if defined( __ICCARM__)
145+
__root
146+
#else
147+
__attribute__((used))
148+
#endif
142149
const pFunc SECTION_PLACE(IVT_NAME[104],VECTOR_SECTION) =
143150
{
144151
(pFunc) INITIAL_SP, /* Initial Stack Pointer */

0 commit comments

Comments
 (0)