Skip to content

Commit 2831dfd

Browse files
author
Kyle Kearney
committed
Update CY8CPROTO-064-SB linker scripts
Update linker scripts for the latest PDL to be consistent with other Cypress targets
1 parent 09182d1 commit 2831dfd

File tree

6 files changed

+27
-30
lines changed

6 files changed

+27
-30
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_064_SB/device/TOOLCHAIN_ARM/cyb06xx7_cm4_dual.sct

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
;*******************************************************************************
66
;* \file cyb06xx7_cm4_dual.sct
7-
;* \version 2.50
7+
;* \version 2.60
88
;*
99
;* Linker file for the ARMCC.
1010
;*
@@ -78,6 +78,7 @@
7878
#define MBED_BOOT_STACK_SIZE 0x400
7979
#endif
8080

81+
; Size of the stack section at the end of CM4 SRAM
8182
#define STACK_SIZE MBED_BOOT_STACK_SIZE
8283

8384
; The defines below describe the location and size of blocks of memory in the target.
@@ -133,12 +134,9 @@
133134
#define EFUSE_START 0x90700000
134135
#define EFUSE_SIZE 0x100000
135136

136-
; Size and start address of the Cortex-M4 application image
137-
#define FLASH_CM4_SIZE FLASH_SIZE
138-
#define FLASH_CM4_START FLASH_START
139137

140-
; Cortex-M4 application image
141-
LR_IROM1 FLASH_CM4_START FLASH_CM4_SIZE
138+
; Cortex-M4 application flash area
139+
LR_IROM1 FLASH_START FLASH_SIZE
142140
{
143141
ER_FLASH_VECTORS +0
144142
{
@@ -159,7 +157,7 @@ LR_IROM1 FLASH_CM4_START FLASH_CM4_SIZE
159157
RW_RAM_DATA +0
160158
{
161159
* (.cy_ramfunc)
162-
.ANY (+RW, +ZI)
160+
* (+RW, +ZI)
163161
}
164162

165163
; Place variables in the section that should not be initialized during the
@@ -275,7 +273,7 @@ CYMETA 0x90500000
275273
/* The following symbols used by the cymcuelftool. */
276274
/* Flash */
277275
#define __cy_memory_0_start 0x10000000
278-
#define __cy_memory_0_length 0x00100000
276+
#define __cy_memory_0_length 0x000D0000
279277
#define __cy_memory_0_row_size 0x200
280278

281279
/* Emulated EEPROM Flash area */

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_064_SB/device/TOOLCHAIN_GCC_ARM/cyb06xx7_cm4_dual.ld

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file cyb06xx7_cm4_dual.ld
3-
* \version 2.50
3+
* \version 2.60
44
*
55
* Linker file for the GNU C compiler.
66
*
@@ -76,6 +76,7 @@ ENTRY(Reset_Handler)
7676
#define MBED_BOOT_STACK_SIZE 0x400
7777
#endif
7878

79+
/* Size of the stack section at the end of CM4 SRAM */
7980
STACK_SIZE = MBED_BOOT_STACK_SIZE;
8081

8182
/* Force symbol to be entered in the output file as an undefined symbol. Doing
@@ -118,10 +119,6 @@ MEMORY
118119
efuse (r) : ORIGIN = 0x90700000, LENGTH = 0x100000 /* 1 MB */
119120
}
120121

121-
/* Size and start address of the Cortex-M4 application image */
122-
FLASH_CM4_SIZE = LENGTH(flash);
123-
FLASH_CM4_START = ORIGIN(flash);
124-
125122
/* Library configurations */
126123
GROUP(libgcc.a libc.a libm.a libnosys.a)
127124

@@ -161,8 +158,8 @@ GROUP(libgcc.a libc.a libm.a libnosys.a)
161158

162159
SECTIONS
163160
{
164-
/* Cortex-M4 application image */
165-
.text FLASH_CM4_START :
161+
/* Cortex-M4 application flash area */
162+
.text ORIGIN(flash) :
166163
{
167164
. = ALIGN(4);
168165
__Vectors = . ;
@@ -278,7 +275,6 @@ SECTIONS
278275
KEEP(*(.init_array))
279276
PROVIDE_HIDDEN (__init_array_end = .);
280277

281-
282278
. = ALIGN(4);
283279
/* finit data */
284280
PROVIDE_HIDDEN (__fini_array_start = .);
@@ -339,7 +335,7 @@ SECTIONS
339335
__HeapLimit = .;
340336
} > ram
341337

342-
338+
343339
/* Set stack top to end of RAM, and stack limit move down by
344340
* size of stack_dummy section */
345341
__StackTop = ORIGIN(ram) + LENGTH(ram);
@@ -392,7 +388,7 @@ SECTIONS
392388
KEEP(*(.cy_toc_part2))
393389
} > sflash_toc_2
394390

395-
391+
396392
/* Supervisory Flash: Table of Content # 2 Copy */
397393
.cy_rtoc_part2 :
398394
{
@@ -426,7 +422,7 @@ SECTIONS
426422
/* The following symbols used by the cymcuelftool. */
427423
/* Flash */
428424
__cy_memory_0_start = 0x10000000;
429-
__cy_memory_0_length = 0x00100000;
425+
__cy_memory_0_length = 0x000D0000;
430426
__cy_memory_0_row_size = 0x200;
431427

432428
/* Emulated EEPROM Flash area */

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_064_SB/device/TOOLCHAIN_IAR/cyb06xx7_cm4_dual.icf

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file cyb06xx7_cm4_dual.icf
3-
* \version 2.50
3+
* \version 2.60
44
*
55
* Linker file for the IAR compiler.
66
*
@@ -156,7 +156,7 @@ if (!isdefinedsymbol(__STACK_SIZE)) {
156156

157157
/* Defines the minimum heap size. The actual heap size will be expanded to the end of the stack region */
158158
if (!isdefinedsymbol(__HEAP_SIZE)) {
159-
define symbol __ICFEDIT_size_heap__ = 0x400;
159+
define symbol __ICFEDIT_size_heap__ = 0x0400;
160160
} else {
161161
define symbol __ICFEDIT_size_heap__ = __HEAP_SIZE;
162162
}
@@ -191,8 +191,10 @@ do not initialize { section .noinit, section .intvec_ram };
191191

192192
/*-Placement-*/
193193

194-
/* Flash - Cortex-M4 application image */
195-
place in IROM1_region { block RO };
194+
/* Flash - Cortex-M4 application */
195+
place at start of IROM1_region { block RO };
196+
197+
/* Used for the digital signature of the secure application and the Bootloader SDK application. */
196198
".cy_app_signature" : place at address (__ICFEDIT_region_IROM1_end__ - 0x200) { section .cy_app_signature };
197199

198200
/* Emulated EEPROM Flash area */
@@ -245,7 +247,7 @@ keep { section .cy_app_signature,
245247
/* The following symbols used by the cymcuelftool. */
246248
/* Flash */
247249
define exported symbol __cy_memory_0_start = 0x10000000;
248-
define exported symbol __cy_memory_0_length = 0x00100000;
250+
define exported symbol __cy_memory_0_length = 0x000D0000;
249251
define exported symbol __cy_memory_0_row_size = 0x200;
250252

251253
/* Emulated EEPROM Flash area */

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_064_SB/device/TOOLCHAIN_IAR/startup_psoc6_01_cm4.S

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,6 @@ intvec_copy
310310
STR r0, [r1]
311311
dsb
312312

313-
; Enable the FPU if used
314-
LDR R0, =Cy_SystemInitFpuEnable
315-
BLX R0
316-
317313
; Initialize data sections
318314
LDR R0, =__iar_data_init3
319315
BLX R0

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_064_SB/device/system_psoc6.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file system_psoc6.h
3-
* \version 2.50
3+
* \version 2.60
44
*
55
* \brief Device system header file.
66
*
@@ -320,6 +320,11 @@
320320
* <th>Reason for Change</th>
321321
* </tr>
322322
* <tr>
323+
* <td>2.60</td>
324+
* <td>Updated linker scripts.</td>
325+
* <td>Provided support for new devices, updated usage of CM0p prebuilt image.</td>
326+
* </tr>
327+
* <tr>
323328
* <td>2.50</td>
324329
* <td>Updated assembler files, C files, linker scripts.</td>
325330
* <td>Dynamic allocated HEAP size for Arm Compiler 6, IAR 8.</td>

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_064_SB/device/system_psoc6_cm4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file system_psoc6_cm4.c
3-
* \version 2.50
3+
* \version 2.60
44
*
55
* The device system-source file.
66
*

0 commit comments

Comments
 (0)