Skip to content

Commit d2e9fde

Browse files
authored
Merge pull request #10413 from kfnta/cy_rollup
Cypress PSoC6 rollup PR
2 parents df7a5cd + eb38b16 commit d2e9fde

File tree

94 files changed

+65829
-56643
lines changed

Some content is hidden

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

94 files changed

+65829
-56643
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8C62XX/TARGET_MCU_PSOC6_M0/system_psoc6_cm0plus_flash_init.c

Lines changed: 0 additions & 129 deletions
This file was deleted.

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8C62XX/TARGET_MCU_PSOC6_M0/system_psoc6_cm0plus_flash_init.h

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#! armcc -E
1+
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
22
; The first line specifies a preprocessor command that the linker invokes
33
; to pass a scatter file through a C preprocessor.
44

55
;*******************************************************************************
66
;* \file cy8c6xxa_cm4_dual.scat
7-
;* \version `$CY_MAJOR_VERSION`.`$CY_MINOR_VERSION`
7+
;* \version 2.40
88
;*
99
;* Linker file for the ARMCC.
1010
;*
@@ -46,10 +46,26 @@
4646
#define MBED_ROM_START 0x10002000
4747
#endif
4848

49+
;* MBED_APP_START is being used by the bootloader build script and
50+
;* will be calculate by the system. Without bootloader the MBED_APP_START
51+
;* is equal to MBED_ROM_START
52+
;*
53+
#if !defined(MBED_APP_START)
54+
#define MBED_APP_START MBED_ROM_START
55+
#endif
56+
4957
#if !defined(MBED_ROM_SIZE)
5058
#define MBED_ROM_SIZE 0x001FE000
5159
#endif
5260

61+
;* MBED_APP_SIZE is being used by the bootloader build script and
62+
;* will be calculate by the system. Without bootloader the MBED_APP_SIZE
63+
;* is equal to MBED_ROM_SIZE
64+
;*
65+
#if !defined(MBED_APP_SIZE)
66+
#define MBED_APP_SIZE MBED_ROM_SIZE
67+
#endif
68+
5369
#if !defined(MBED_RAM_START)
5470
#define MBED_RAM_START 0x08002000
5571
#endif
@@ -69,16 +85,16 @@
6985

7086
; The following defines control RAM and flash memory allocation for the CM4 core.
7187
; You can change the memory allocation by editing RAM and Flash defines.
72-
; Note that 2 KB of RAM (at the end of the RAM section) are reserved for system use.
88+
; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
7389
; Using this memory region for other purposes will lead to unexpected behavior.
7490
; Your changes must be aligned with the corresponding defines for CM0+ core in 'xx_cm0plus.scat',
7591
; where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.scat'.
7692
; RAM
7793
#define RAM_START MBED_RAM_START
7894
#define RAM_SIZE MBED_RAM_SIZE
7995
; Flash
80-
#define FLASH_START MBED_ROM_START
81-
#define FLASH_SIZE MBED_ROM_SIZE
96+
#define FLASH_START MBED_APP_START
97+
#define FLASH_SIZE MBED_APP_SIZE
8298

8399
; The following defines describe a 32K flash region used for EEPROM emulation.
84100
; This region can also be used as the general purpose flash.
@@ -252,5 +268,31 @@ CYMETA 0x90500000
252268
.cymeta +0 { * (.cymeta) }
253269
}
254270

271+
/* The following symbols used by the cymcuelftool. */
272+
/* Flash */
273+
#define __cy_memory_0_start 0x10000000
274+
#define __cy_memory_0_length 0x00200000
275+
#define __cy_memory_0_row_size 0x200
276+
277+
/* Emulated EEPROM Flash area */
278+
#define __cy_memory_1_start 0x14000000
279+
#define __cy_memory_1_length 0x8000
280+
#define __cy_memory_1_row_size 0x200
281+
282+
/* Supervisory Flash */
283+
#define __cy_memory_2_start 0x16000000
284+
#define __cy_memory_2_length 0x8000
285+
#define __cy_memory_2_row_size 0x200
286+
287+
/* XIP */
288+
#define __cy_memory_3_start 0x18000000
289+
#define __cy_memory_3_length 0x08000000
290+
#define __cy_memory_3_row_size 0x200
291+
292+
/* eFuse */
293+
#define __cy_memory_4_start 0x90700000
294+
#define __cy_memory_4_length 0x100000
295+
#define __cy_memory_4_row_size 1
296+
255297

256298
/* [] END OF FILE */
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
;/**************************************************************************//**
2-
; * @file startup_psoc6_02_cm4.s
2+
; * @file startup_psoc6_02_cm4.S
33
; * @brief CMSIS Core Device Startup File for
44
; * ARMCM4 Device Series
55
; * @version V5.00
@@ -39,7 +39,6 @@ Stack_Size EQU 0x00000400
3939
Stack_Mem SPACE Stack_Size
4040
__initial_sp
4141

42-
4342
; <h> Heap Configuration
4443
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
4544
; </h>
@@ -82,7 +81,7 @@ __Vectors DCD __initial_sp ; Top of Stack
8281
DCD PendSV_Handler ; PendSV Handler
8382
DCD SysTick_Handler ; SysTick Handler
8483

85-
; External interrupts Power Mode Description
84+
; External interrupts Description
8685
DCD ioss_interrupts_gpio_0_IRQHandler ; GPIO Port Interrupt #0
8786
DCD ioss_interrupts_gpio_1_IRQHandler ; GPIO Port Interrupt #1
8887
DCD ioss_interrupts_gpio_2_IRQHandler ; GPIO Port Interrupt #2
@@ -255,7 +254,6 @@ __Vectors DCD __initial_sp ; Top of Stack
255254
__Vectors_End
256255

257256
__Vectors_Size EQU __Vectors_End - __Vectors
258-
259257
EXPORT __ramVectors
260258
AREA RESET_RAM, READWRITE, NOINIT
261259
__ramVectors SPACE __Vectors_Size
@@ -272,11 +270,10 @@ __ramVectors SPACE __Vectors_Size
272270
; The user of this function is responsible for initializing the PDL and resources before using them.
273271
;
274272
Cy_OnResetUser PROC
275-
EXPORT Cy_OnResetUser [WEAK]
273+
EXPORT Cy_OnResetUser [WEAK]
276274
BX LR
277275
ENDP
278276

279-
280277
; Reset Handler
281278
Reset_Handler PROC
282279
EXPORT Reset_Handler [WEAK]
@@ -383,7 +380,7 @@ SysTick_Handler PROC
383380
ENDP
384381

385382
Default_Handler PROC
386-
EXPORT Default_Handler [WEAK]
383+
EXPORT Default_Handler [WEAK]
387384
EXPORT ioss_interrupts_gpio_0_IRQHandler [WEAK]
388385
EXPORT ioss_interrupts_gpio_1_IRQHandler [WEAK]
389386
EXPORT ioss_interrupts_gpio_2_IRQHandler [WEAK]
@@ -738,14 +735,13 @@ sdhc_1_interrupt_general_IRQHandler
738735

739736
ELSE
740737

741-
IMPORT __use_two_region_memory
742738
EXPORT __user_initial_stackheap
743739

744740
__user_initial_stackheap PROC
745-
LDR R0, = Heap_Mem
741+
LDR R0, =Heap_Mem
746742
LDR R1, =(Stack_Mem + Stack_Size)
747-
LDR R2, = (Heap_Mem + Heap_Size)
748-
LDR R3, = Stack_Mem
743+
LDR R2, =(Heap_Mem + Heap_Size)
744+
LDR R3, =Stack_Mem
749745
BX LR
750746
ENDP
751747

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_4343W/device/TOOLCHAIN_GCC_ARM/cy8c6xxa_cm4_dual.ld

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file cy8c6xxa_cm4_dual.ld
3-
* \version 2.30
3+
* \version 2.40
44
*
55
* Linker file for the GNU C compiler.
66
*
@@ -44,10 +44,26 @@ ENTRY(Reset_Handler)
4444
#define MBED_ROM_START 0x10002000
4545
#endif
4646

47+
/* MBED_APP_START is being used by the bootloader build script and
48+
* will be calculate by the system. Without bootloader the MBED_APP_START
49+
* is equal to MBED_ROM_START
50+
*/
51+
#if !defined(MBED_APP_START)
52+
#define MBED_APP_START MBED_ROM_START
53+
#endif
54+
4755
#if !defined(MBED_ROM_SIZE)
4856
#define MBED_ROM_SIZE 0x001FE000
4957
#endif
5058

59+
/* MBED_APP_SIZE is being used by the bootloader build script and
60+
* will be calculate by the system. Without bootloader the MBED_APP_SIZE
61+
* is equal to MBED_ROM_SIZE
62+
*/
63+
#if !defined(MBED_APP_SIZE)
64+
#define MBED_APP_SIZE MBED_ROM_SIZE
65+
#endif
66+
5167
#if !defined(MBED_RAM_START)
5268
#define MBED_RAM_START 0x08002000
5369
#endif
@@ -77,13 +93,13 @@ MEMORY
7793
{
7894
/* The ram and flash regions control RAM and flash memory allocation for the CM4 core.
7995
* You can change the memory allocation by editing the 'ram' and 'flash' regions.
80-
* Note that 2 KB of RAM (at the end of the RAM section) are reserved for system use.
96+
* Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
8197
* Using this memory region for other purposes will lead to unexpected behavior.
8298
* Your changes must be aligned with the corresponding memory regions for CM0+ core in 'xx_cm0plus.ld',
8399
* where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.ld'.
84100
*/
85101
ram (rwx) : ORIGIN = MBED_RAM_START, LENGTH = MBED_RAM_SIZE
86-
flash (rx) : ORIGIN = MBED_ROM_START, LENGTH = MBED_ROM_SIZE
102+
flash (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
87103

88104
/* This is a 32K flash region used for EEPROM emulation. This region can also be used as the general purpose flash.
89105
* You can assign sections to this memory region for only one of the cores.

0 commit comments

Comments
 (0)