Skip to content

Commit 563e216

Browse files
committed
PSOC6: update BSP startup code to match psoc6pdl-1.6.1
1 parent 3b25d2d commit 563e216

File tree

78 files changed

+499
-231
lines changed

Some content is hidden

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

78 files changed

+499
-231
lines changed

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
@@ -4,7 +4,7 @@
44

55
;*******************************************************************************
66
;* \file cy8c6xxa_cm0plus.sct
7-
;* \version 2.70.1
7+
;* \version 2.90
88
;*
99
;* Linker file for the ARMCC.
1010
;*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file cy8c6xxa_cm0plus.ld
3-
* \version 2.70.1
3+
* \version 2.90
44
*
55
* Linker file for the GNU C compiler.
66
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************
22
* \file cy8c6xxa_cm0plus.icf
3-
* \version 2.70.1
3+
* \version 2.90
44
*
55
* Linker file for the IAR compiler.
66
*

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/device/COMPONENT_CM0P/system_psoc6_cm0plus.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file system_psoc6_cm0plus.c
3-
* \version 2.70.1
3+
* \version 2.90
44
*
55
* The device system-source file.
66
*
@@ -40,6 +40,10 @@
4040
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
4141
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
4242

43+
#if defined(CY_DEVICE_SECURE)
44+
#include "cy_pra.h"
45+
#endif /* defined(CY_DEVICE_SECURE) */
46+
4347

4448
/*******************************************************************************
4549
* SystemCoreClockUpdate()
@@ -126,6 +130,7 @@ uint32_t cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD *
126130
* - Unlocks and disables WDT.
127131
* - Calls Cy_PDL_Init() function to define the driver library.
128132
* - Calls the Cy_SystemInit() function, if compiled from PSoC Creator.
133+
* - Calls \ref Cy_PRA_Init() for PSoC 64 devices.
129134
* - Calls \ref SystemCoreClockUpdate().
130135
*
131136
*******************************************************************************/
@@ -219,6 +224,11 @@ void SystemInit(void)
219224
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
220225

221226
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
227+
228+
#if defined(CY_DEVICE_SECURE)
229+
/* Initialize Protected Regsiter Access driver. */
230+
Cy_PRA_Init();
231+
#endif /* defined(CY_DEVICE_SECURE) */
222232
}
223233

224234

@@ -263,7 +273,7 @@ void SystemCoreClockUpdate (void)
263273
cy_Hfclk0FreqHz = locHf0Clock;
264274
cy_PeriClkFreqHz = locHf0Clock / (1UL + (uint32_t)Cy_SysClk_ClkPeriGetDivider());
265275
SystemCoreClock = cy_PeriClkFreqHz / (1UL + (uint32_t)Cy_SysClk_ClkSlowGetDivider());
266-
276+
267277
/* Sets clock frequency for Delay API */
268278
cy_delayFreqMhz = (uint8_t)CY_SYSLIB_DIV_ROUNDUP(SystemCoreClock, CY_DELAY_1M_THRESHOLD);
269279
cy_delayFreqKhz = CY_SYSLIB_DIV_ROUNDUP(SystemCoreClock, CY_DELAY_1K_THRESHOLD);

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
@@ -4,7 +4,7 @@
44

55
;*******************************************************************************
66
;* \file cy8c6xxa_cm4_dual.sct
7-
;* \version 2.70.1
7+
;* \version 2.90
88
;*
99
;* Linker file for the ARMCC.
1010
;*

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/cy8c6xxa_cm4_dual.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file cy8c6xxa_cm4_dual.ld
3-
* \version 2.70.1
3+
* \version 2.90
44
*
55
* Linker file for the GNU C compiler.
66
*

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/device/COMPONENT_CM4/TOOLCHAIN_IAR/cy8c6xxa_cm4_dual.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************
22
* \file cy8c6xxa_cm4_dual.icf
3-
* \version 2.70.1
3+
* \version 2.90
44
*
55
* Linker file for the IAR compiler.
66
*

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/device/COMPONENT_CM4/system_psoc6_cm4.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file system_psoc6_cm4.c
3-
* \version 2.70.1
3+
* \version 2.90
44
*
55
* The device system-source file.
66
*
@@ -40,6 +40,10 @@
4040
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
4141
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
4242

43+
#if defined(CY_DEVICE_SECURE)
44+
#include "cy_pra.h"
45+
#endif /* defined(CY_DEVICE_SECURE) */
46+
4347

4448
/*******************************************************************************
4549
* SystemCoreClockUpdate()
@@ -125,6 +129,7 @@ uint32_t cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD *
125129
* - Unlocks and disables WDT.
126130
* - Calls Cy_PDL_Init() function to define the driver library.
127131
* - Calls the Cy_SystemInit() function, if compiled from PSoC Creator.
132+
* - Calls \ref Cy_PRA_Init() for PSoC 64 devices.
128133
* - Calls \ref SystemCoreClockUpdate().
129134
* \endcond
130135
*******************************************************************************/
@@ -160,7 +165,7 @@ void SystemInit(void)
160165
#ifdef __CM0P_PRESENT
161166
#if (__CM0P_PRESENT == 0)
162167
/* Configure data register (as CM0p in deep sleep state) of IPC structure #7, reserved for the Deep-Sleep operations. */
163-
REG_IPC_STRUCT_DATA(CY_IPC_STRUCT_PTR(CY_IPC_CHAN_DDFT)) = (CY_STARTUP_CM0_DP_STATE <<
168+
REG_IPC_STRUCT_DATA(CY_IPC_STRUCT_PTR(CY_IPC_CHAN_DDFT)) = (CY_STARTUP_CM0_DP_STATE <<
164169
CY_STARTUP_IPC7_DP_OFFSET);
165170

166171
/* Release IPC structure #7 to avoid deadlocks in case of SW or WDT reset during Deep-Sleep entering. */
@@ -233,6 +238,11 @@ void SystemInit(void)
233238
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
234239

235240
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
241+
242+
#if defined(CY_DEVICE_SECURE)
243+
/* Initialize Protected Register Access driver */
244+
Cy_PRA_Init();
245+
#endif /* defined(CY_DEVICE_SECURE) */
236246
}
237247

238248

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

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***************************************************************************//**
22
* \file system_psoc6.h
3-
* \version 2.70.1
3+
* \version 2.90
44
*
55
* \brief Device system header file.
66
*
@@ -85,20 +85,20 @@
8585
* \endcode
8686
*
8787
* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the ROM ORIGIN's
88-
* value (0x10000000) + FLASH_CM0P_SIZE value (0x2000, the size of a flash image
89-
* of the Cortex-M0+ application should be the same value as the flash LENGTH in
90-
* 'xx_cm0plus.ld') in the 'xx_cm4_dual.ld' file, where 'xx' is the device group.
88+
* value (0x10000000) + FLASH_CM0P_SIZE value (0x2000, the size of a flash image
89+
* of the Cortex-M0+ application should be the same value as the flash LENGTH in
90+
* 'xx_cm0plus.ld') in the 'xx_cm4_dual.ld' file, where 'xx' is the device group.
9191
* Do this by either:
9292
* - Passing the following commands to the compiler:\n
9393
* \code -D CY_CORTEX_M4_APPL_ADDR=0x10002000 \endcode
9494
* or
95-
* - Editing the \ref CY_CORTEX_M4_APPL_ADDR value in the 'system_xx.h', where
95+
* - Editing the \ref CY_CORTEX_M4_APPL_ADDR value in the 'system_xx.h', where
9696
* 'xx' is the device family:\n
9797
* \code #define CY_CORTEX_M4_APPL_ADDR (0x10002000u) \endcode
9898
*
9999
* <b>ARM Compiler</b>\n
100100
* The flash and RAM sections for the CPU are defined in the linker files:
101-
* 'xx_yy.sct', where 'xx' is the device group, and 'yy' is the target CPU; for
101+
* 'xx_yy.sct', where 'xx' is the device group, and 'yy' is the target CPU; for
102102
* example 'cy8c6xx7_cm0plus.sct' and 'cy8c6xx7_cm4_dual.sct'.
103103
* \note If the start of the Cortex-M4 application image is changed, the value
104104
* of the of the \ref CY_CORTEX_M4_APPL_ADDR should also be changed. The
@@ -135,9 +135,9 @@
135135
* \endcode
136136
*
137137
* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the FLASH_START
138-
* value (0x10000000) + FLASH_CM0P_SIZE value (0x2000, the size of a flash image
139-
* of the Cortex-M0+ application should be the same value as the FLASH_SIZE in the
140-
* 'xx_cm0plus.sct') in the 'xx_cm4_dual.sct' file, where 'xx' is the device group.
138+
* value (0x10000000) + FLASH_CM0P_SIZE value (0x2000, the size of a flash image
139+
* of the Cortex-M0+ application should be the same value as the FLASH_SIZE in the
140+
* 'xx_cm0plus.sct') in the 'xx_cm4_dual.sct' file, where 'xx' is the device group.
141141
* Do this by either:
142142
* - Passing the following commands to the compiler:\n
143143
* \code -D CY_CORTEX_M4_APPL_ADDR=0x10002000 \endcode
@@ -175,11 +175,11 @@
175175
* define symbol __ICFEDIT_region_IRAM1_end__ = 0x080477FF;
176176
* \endcode
177177
*
178-
* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the
179-
* __ICFEDIT_region_IROM1_start__ value (0x10000000) + FLASH_CM0P_SIZE value
180-
* (0x2000, the size of a flash image of the Cortex-M0+ application) in the
178+
* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the
179+
* __ICFEDIT_region_IROM1_start__ value (0x10000000) + FLASH_CM0P_SIZE value
180+
* (0x2000, the size of a flash image of the Cortex-M0+ application) in the
181181
* 'xx_cm4_dual.icf' file, where 'xx' is the device group. The sum result
182-
* should be the same as (__ICFEDIT_region_IROM1_end__ + 1) value in the
182+
* should be the same as (__ICFEDIT_region_IROM1_end__ + 1) value in the
183183
* 'xx_cm0plus.icf'. Do this by either:
184184
* - Passing the following commands to the compiler:\n
185185
* \code -D CY_CORTEX_M4_APPL_ADDR=0x10002000 \endcode
@@ -212,8 +212,8 @@
212212
* -# Editing source code files
213213
* -# Specifying via command line
214214
*
215-
* By default, the stack size is set to 0x00001000 and the heap size is allocated
216-
* dynamically to the whole available free memory up to stack memory and it
215+
* By default, the stack size is set to 0x00001000 and the heap size is allocated
216+
* dynamically to the whole available free memory up to stack memory and it
217217
* is set to the 0x00000400 (for ARM GCC and IAR compilers) as minimal value.
218218
*
219219
* \subsubsection group_system_config_heap_stack_config_gcc ARM GCC
@@ -321,6 +321,21 @@
321321
* <th>Reason for Change</th>
322322
* </tr>
323323
* <tr>
324+
* <td>2.90</td>
325+
* <td>Updated linker scripts for PSoC 64 Secure MCU cyb06xx7 devices.</td>
326+
* <td>Flash allocation adjustment.</td>
327+
* </tr>
328+
* <tr>
329+
* <td rowspan="2">2.80</td>
330+
* <td>Updated linker scripts for PSoC 64 Secure MCU devices.</td>
331+
* <td>Updated FLASH and SRAM memory area definitions in cyb0xxx linker script templates
332+
* in accordance with the PSoC 64 Secure Boot SDK policies.</td>
333+
* </tr>
334+
* <tr>
335+
* <td>Added \ref Cy_PRA_Init() call to \ref SystemInit() Cortex-M0+ and Cortex-M4 functions for PSoC 64 Secure MCU.</td>
336+
* <td>Updated PSoC 64 Secure MCU startup sequence to initialize the Protected Register Access driver.</td>
337+
* </tr>
338+
* <tr>
324339
* <td>2.70.1</td>
325340
* <td>Updated documentation for the better description of the existing startup implementation.</td>
326341
* <td>User experience enhancement.</td>

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_BLE/device/COMPONENT_CM0P/TOOLCHAIN_ARM/cy8c6xx7_cm0plus.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
;*******************************************************************************
66
;* \file cy8c6xx7_cm0plus.sct
7-
;* \version 2.70.1
7+
;* \version 2.90
88
;*
99
;* Linker file for the ARMCC.
1010
;*

0 commit comments

Comments
 (0)