Skip to content

Commit 248013a

Browse files
hennadiykytsunOren Cohen
authored andcommitted
PSOC6: remove custom IPC configuration for PSA
* Update PDL startup driver to version 2.40 * Update linker scripts and startup assembly * Remove custom IPC configuration from PSA initialization: use default IPC configuration provided by low-level startup code.
1 parent ae716e2 commit 248013a

File tree

57 files changed

+639
-713
lines changed

Some content is hidden

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

57 files changed

+639
-713
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_4343W/device/TOOLCHAIN_ARM_STD/cy8c6xxa_cm4_dual.sct

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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.

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_4343W/device/TOOLCHAIN_ARM_STD/startup_psoc6_02_cm4.S

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.

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_4343W/device/TOOLCHAIN_IAR/cy8c6xxa_cm4_dual.icf

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file cy8c6xxa_cm4_dual.icf
3-
* \version 2.30
3+
* \version 2.40
44
*
55
* Linker file for the IAR compiler.
66
*
@@ -45,10 +45,26 @@ if (!isdefinedsymbol(MBED_ROM_START)) {
4545
define symbol MBED_ROM_START = 0x10002000;
4646
}
4747

48+
/* MBED_APP_START is being used by the bootloader build script and
49+
* will be calculate by the system. Without bootloader the MBED_APP_START
50+
* is equal to MBED_ROM_START
51+
*/
52+
if (!isdefinedsymbol(MBED_APP_START)) {
53+
define symbol MBED_APP_START = MBED_ROM_START;
54+
}
55+
4856
if (!isdefinedsymbol(MBED_ROM_SIZE)) {
4957
define symbol MBED_ROM_SIZE = 0x001FE000;
5058
}
5159

60+
/* MBED_APP_SIZE is being used by the bootloader build script and
61+
* will be calculate by the system. Without bootloader the MBED_APP_SIZE
62+
* is equal to MBED_ROM_SIZE
63+
*/
64+
if (!isdefinedsymbol(MBED_APP_SIZE)) {
65+
define symbol MBED_APP_SIZE = MBED_ROM_SIZE;
66+
}
67+
5268
if (!isdefinedsymbol(MBED_RAM_START)) {
5369
define symbol MBED_RAM_START = 0x08002000;
5470
}
@@ -67,7 +83,7 @@ if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
6783

6884
/* The following symbols control RAM and flash memory allocation for the CM4 core.
6985
* You can change the memory allocation by editing RAM and Flash symbols.
70-
* Note that 2 KB of RAM (at the end of the RAM section) are reserved for system use.
86+
* Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
7187
* Using this memory region for other purposes will lead to unexpected behavior.
7288
* Your changes must be aligned with the corresponding symbols for CM0+ core in 'xx_cm0plus.icf',
7389
* where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.icf'.
@@ -76,8 +92,8 @@ if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
7692
define symbol __ICFEDIT_region_IRAM1_start__ = MBED_RAM_START;
7793
define symbol __ICFEDIT_region_IRAM1_end__ = (MBED_RAM_START + MBED_RAM_SIZE);
7894
/* Flash */
79-
define symbol __ICFEDIT_region_IROM1_start__ = MBED_ROM_START;
80-
define symbol __ICFEDIT_region_IROM1_end__ = (MBED_ROM_START + MBED_ROM_SIZE);
95+
define symbol __ICFEDIT_region_IROM1_start__ = MBED_APP_START;
96+
define symbol __ICFEDIT_region_IROM1_end__ = (MBED_APP_START + MBED_APP_SIZE);
8197

8298
/* The following symbols define a 32K flash region used for EEPROM emulation.
8399
* This region can also be used as the general purpose flash.

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_4343W/device/TOOLCHAIN_IAR/startup_psoc6_02_cm4.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ __vector_table_0x1c
7979
DCD PendSV_Handler
8080
DCD SysTick_Handler
8181

82-
8382
; External interrupts Description
8483
DCD ioss_interrupts_gpio_0_IRQHandler ; GPIO Port Interrupt #0
8584
DCD ioss_interrupts_gpio_1_IRQHandler ; GPIO Port Interrupt #1

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,12 @@
320320
* <th>Reason for Change</th>
321321
* </tr>
322322
* <tr>
323+
* <td>2.40</td>
324+
* <td>Updated assembler files, C files, linker scripts.</td>
325+
* </tr>
326+
* <tr>
323327
* <td rowspan="2">2.30</td>
324-
* <td>Added assembler files, linker skripts for Mbed OS.</td>
328+
* <td>Added assembler files, linker scripts for Mbed OS.</td>
325329
* <td>Added Arm Mbed OS embedded operating system support.</td>
326330
* </tr>
327331
* <tr>

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file system_psoc6_cm4.c
3-
* \version 2.30
3+
* \version 2.40
44
*
55
* The device system-source file.
66
*
@@ -43,6 +43,10 @@
4343
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
4444
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
4545

46+
#if defined(COMPONENT_SPM_MAILBOX)
47+
void mailbox_init(void);
48+
#endif
49+
4650

4751
/*******************************************************************************
4852
* SystemCoreClockUpdate()
@@ -277,13 +281,22 @@ void SystemInit(void)
277281
*******************************************************************************/
278282
void mbed_sdk_init(void)
279283
{
284+
#if !defined(COMPONENT_SPM_MAILBOX)
285+
/* Disable global interrupts */
286+
__disable_irq();
287+
#endif
288+
280289
/* Initialize shared resource manager */
281290
cy_srm_initialize();
282291

283292
/* Initialize system and clocks. */
284293
/* Placed here as it must be done after proper LIBC initialization. */
285294
SystemInit();
286295

296+
#if defined(COMPONENT_SPM_MAILBOX)
297+
mailbox_init();
298+
#endif
299+
287300
/* Set up the device based on configurator selections */
288301
init_cycfg_all();
289302

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_BLE/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm4_dual.sct

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

55
;*******************************************************************************
66
;* \file cy8c6xx7_cm4_dual.scat
7-
;* \version `$CY_MAJOR_VERSION`.`$CY_MINOR_VERSION`
7+
;* \version 2.40
88
;*
99
;* Linker file for the ARMCC.
1010
;*
@@ -46,24 +46,24 @@
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-
;*
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+
;*
5353
#if !defined(MBED_APP_START)
54-
#define MBED_APP_START MBED_ROM_START
54+
#define MBED_APP_START MBED_ROM_START
5555
#endif
5656

5757
#if !defined(MBED_ROM_SIZE)
5858
#define MBED_ROM_SIZE 0x000FE000
5959
#endif
6060

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-
;*
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+
;*
6565
#if !defined(MBED_APP_SIZE)
66-
#define MBED_APP_SIZE MBED_ROM_SIZE
66+
#define MBED_APP_SIZE MBED_ROM_SIZE
6767
#endif
6868

6969
#if !defined(MBED_RAM_START)
@@ -85,7 +85,7 @@
8585

8686
; The following defines control RAM and flash memory allocation for the CM4 core.
8787
; You can change the memory allocation by editing RAM and Flash defines.
88-
; 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.
8989
; Using this memory region for other purposes will lead to unexpected behavior.
9090
; Your changes must be aligned with the corresponding defines for CM0+ core in 'xx_cm0plus.scat',
9191
; where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.scat'.

0 commit comments

Comments
 (0)