Skip to content

Commit 71d6f84

Browse files
Matthew Macovskydustin-crossman
authored andcommitted
Change Cypress linker script region name from .cy_xip to cy_xip
In some toolchains, in order to use linker symbols referring to the start and end of a region, the region name must not contain a '.' character. These changes allow those symbols to be used for the cy_xip region by renaming it. They also create explicit start and end symbols for GCC.
1 parent d6784c3 commit 71d6f84

File tree

53 files changed

+123
-53
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+123
-53
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT064B0S2_4343W/device/COMPONENT_CM0P/TOOLCHAIN_ARM/cyb06xxa_cm0plus.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
258258
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
259259
LR_EROM XIP_START XIP_SIZE
260260
{
261-
.cy_xip +0
261+
cy_xip +0
262262
{
263263
* (.cy_xip)
264264
}

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT064B0S2_4343W/device/COMPONENT_CM0P/TOOLCHAIN_GCC_ARM/cyb06xxa_cm0plus.ld

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,11 @@ SECTIONS
422422
/* Places the code in the Execute in Place (XIP) section. See the smif driver
423423
* documentation for details.
424424
*/
425-
.cy_xip :
425+
cy_xip :
426426
{
427+
__cy_xip_start = .;
427428
KEEP(*(.cy_xip))
429+
__cy_xip_end = .;
428430
} > xip
429431

430432

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT064B0S2_4343W/device/COMPONENT_CM0P/TOOLCHAIN_IAR/cyb06xxa_cm0plus.icf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ define block HEAP with expanding size, alignment = 8, minimum size = __ICF
199199
define block HSTACK {block HEAP, block PROC_STACK, last block CSTACK};
200200
define block RO {first section .intvec, readonly};
201201

202+
define block cy_xip { section .cy_xip };
203+
202204
/*-Initializations-*/
203205
initialize by copy { readwrite };
204206
do not initialize { section .noinit, section .intvec_ram };
@@ -231,7 +233,7 @@ place at address (__ICFEDIT_region_IROM1_start__ + BOOT_HEADER_SIZE) { block RO
231233
".cy_efuse" : place at start of IROM8_region { section .cy_efuse };
232234

233235
/* Execute in Place (XIP). See the smif driver documentation for details. */
234-
".cy_xip" : place at start of EROM1_region { section .cy_xip };
236+
"cy_xip" : place at start of EROM1_region { block cy_xip };
235237

236238
/* RAM */
237239
place at start of IRAM1_region { readwrite section .intvec_ram};

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT064B0S2_4343W/device/COMPONENT_CM4/TOOLCHAIN_ARM/cyb06xxa_cm4_dual.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
268268
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
269269
LR_EROM XIP_START XIP_SIZE
270270
{
271-
.cy_xip +0
271+
cy_xip +0
272272
{
273273
* (.cy_xip)
274274
}

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT064B0S2_4343W/device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/cyb06xxa_cm4_dual.ld

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,11 @@ SECTIONS
419419
/* Places the code in the Execute in Place (XIP) section. See the smif driver
420420
* documentation for details.
421421
*/
422-
.cy_xip :
422+
cy_xip :
423423
{
424+
__cy_xip_start = .;
424425
KEEP(*(.cy_xip))
426+
__cy_xip_end = .;
425427
} > xip
426428

427429

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT064B0S2_4343W/device/COMPONENT_CM4/TOOLCHAIN_IAR/cyb06xxa_cm4_dual.icf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ define block HEAP with expanding size, alignment = 8, minimum size = __ICF
201201
define block CM0P_RO with size = (FLASH_CM0P_SIZE - BOOT_HEADER_SIZE) { readonly section .cy_m0p_image };
202202
define block RO {first section .intvec, readonly};
203203

204+
define block cy_xip { section .cy_xip };
205+
204206
/*-Initializations-*/
205207
initialize by copy { readwrite };
206208
do not initialize { section .noinit, section .intvec_ram };
@@ -238,7 +240,7 @@ place at start of IROM1_region { block RO };
238240
".cy_efuse" : place at start of IROM8_region { section .cy_efuse };
239241

240242
/* Execute in Place (XIP). See the smif driver documentation for details. */
241-
".cy_xip" : place at start of EROM1_region { section .cy_xip };
243+
"cy_xip" : place at start of EROM1_region { block cy_xip };
242244

243245
/* RAM */
244246
place at start of IRAM1_region { readwrite section .intvec_ram};

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/device/COMPONENT_CM0P/TOOLCHAIN_ARM/cy8c6xxa_cm0plus.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
262262
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
263263
LR_EROM XIP_START XIP_SIZE
264264
{
265-
.cy_xip +0
265+
cy_xip +0
266266
{
267267
* (.cy_xip)
268268
}

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/device/COMPONENT_CM0P/TOOLCHAIN_GCC_ARM/cy8c6xxa_cm0plus.ld

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,11 @@ SECTIONS
421421
/* Places the code in the Execute in Place (XIP) section. See the smif driver
422422
* documentation for details.
423423
*/
424-
.cy_xip :
424+
cy_xip :
425425
{
426+
__cy_xip_start = .;
426427
KEEP(*(.cy_xip))
428+
__cy_xip_end = .;
427429
} > xip
428430

429431

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/device/COMPONENT_CM0P/TOOLCHAIN_IAR/cy8c6xxa_cm0plus.icf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ define block HEAP with expanding size, alignment = 8, minimum size = __ICF
198198
define block HSTACK {block HEAP, block PROC_STACK, last block CSTACK};
199199
define block RO {first section .intvec, readonly};
200200

201+
define block cy_xip { section .cy_xip };
202+
201203
/*-Initializations-*/
202204
initialize by copy { readwrite };
203205
do not initialize { section .noinit, section .intvec_ram };
@@ -230,7 +232,7 @@ place in IROM1_region { block RO };
230232
".cy_efuse" : place at start of IROM8_region { section .cy_efuse };
231233

232234
/* Execute in Place (XIP). See the smif driver documentation for details. */
233-
".cy_xip" : place at start of EROM1_region { section .cy_xip };
235+
"cy_xip" : place at start of EROM1_region { block cy_xip };
234236

235237
/* RAM */
236238
place at start of IRAM1_region { readwrite section .intvec_ram};

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/device/COMPONENT_CM4/TOOLCHAIN_ARM/cy8c6xxa_cm4_dual.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
265265
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
266266
LR_EROM XIP_START XIP_SIZE
267267
{
268-
.cy_xip +0
268+
cy_xip +0
269269
{
270270
* (.cy_xip)
271271
}

0 commit comments

Comments
 (0)