Skip to content

Commit d997563

Browse files
authored
Merge pull request #10483 from vmedcy/pr/cy-system-psoc6
PSOC6: move mbed_sdk_init to mbed_overrides.c
2 parents 6a6dd02 + 737c98f commit d997563

File tree

8 files changed

+62
-302
lines changed

8 files changed

+62
-302
lines changed

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

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@
2222
* limitations under the License.
2323
*******************************************************************************/
2424

25-
#include <stdint.h>
2625
#include <stdbool.h>
27-
#include "cy_device.h"
28-
#include "device.h"
2926
#include "system_psoc6.h"
27+
#include "cy_device.h"
3028
#include "cy_device_headers.h"
31-
#include "psoc6_utils.h"
3229
#include "cy_syslib.h"
3330
#include "cy_wdt.h"
34-
#include "cycfg.h"
3531

3632
#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
3733
#include "cy_ipc_sema.h"
@@ -43,10 +39,6 @@
4339
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
4440
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
4541

46-
#if defined(COMPONENT_SPM_MAILBOX)
47-
void mailbox_init(void);
48-
#endif
49-
5042

5143
/*******************************************************************************
5244
* SystemCoreClockUpdate()
@@ -271,41 +263,6 @@ void SystemInit(void)
271263
}
272264

273265

274-
/*******************************************************************************
275-
* Function Name: mbed_sdk_init
276-
****************************************************************************//**
277-
*
278-
* Mbed's post-memory-initialization function.
279-
* Used here to initialize common parts of the Cypress libraries.
280-
*
281-
*******************************************************************************/
282-
void mbed_sdk_init(void)
283-
{
284-
#if !defined(COMPONENT_SPM_MAILBOX)
285-
/* Disable global interrupts */
286-
__disable_irq();
287-
#endif
288-
289-
/* Initialize shared resource manager */
290-
cy_srm_initialize();
291-
292-
/* Initialize system and clocks. */
293-
/* Placed here as it must be done after proper LIBC initialization. */
294-
SystemInit();
295-
296-
#if defined(COMPONENT_SPM_MAILBOX)
297-
mailbox_init();
298-
#endif
299-
300-
/* Set up the device based on configurator selections */
301-
init_cycfg_all();
302-
303-
/* Enable global interrupts */
304-
__enable_irq();
305-
}
306-
307-
308-
309266
/*******************************************************************************
310267
* Function Name: Cy_SystemInit
311268
****************************************************************************//**

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

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@
2222
* limitations under the License.
2323
*******************************************************************************/
2424

25-
#include <stdint.h>
2625
#include <stdbool.h>
27-
#include "cy_device.h"
28-
#include "device.h"
2926
#include "system_psoc6.h"
27+
#include "cy_device.h"
3028
#include "cy_device_headers.h"
31-
#include "psoc6_utils.h"
3229
#include "cy_syslib.h"
3330
#include "cy_wdt.h"
34-
#include "cycfg.h"
3531

3632
#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
3733
#include "cy_ipc_sema.h"
@@ -43,10 +39,6 @@
4339
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
4440
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
4541

46-
#if defined(COMPONENT_SPM_MAILBOX)
47-
void mailbox_init(void);
48-
#endif
49-
5042

5143
/*******************************************************************************
5244
* SystemCoreClockUpdate()
@@ -271,41 +263,6 @@ void SystemInit(void)
271263
}
272264

273265

274-
/*******************************************************************************
275-
* Function Name: mbed_sdk_init
276-
****************************************************************************//**
277-
*
278-
* Mbed's post-memory-initialization function.
279-
* Used here to initialize common parts of the Cypress libraries.
280-
*
281-
*******************************************************************************/
282-
void mbed_sdk_init(void)
283-
{
284-
#if !defined(COMPONENT_SPM_MAILBOX)
285-
/* Disable global interrupts */
286-
__disable_irq();
287-
#endif
288-
289-
/* Initialize shared resource manager */
290-
cy_srm_initialize();
291-
292-
/* Initialize system and clocks. */
293-
/* Placed here as it must be done after proper LIBC initialization. */
294-
SystemInit();
295-
296-
#if defined(COMPONENT_SPM_MAILBOX)
297-
mailbox_init();
298-
#endif
299-
300-
/* Set up the device based on configurator selections */
301-
init_cycfg_all();
302-
303-
/* Enable global interrupts */
304-
__enable_irq();
305-
}
306-
307-
308-
309266
/*******************************************************************************
310267
* Function Name: Cy_SystemInit
311268
****************************************************************************//**

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT/device/TARGET_MCU_PSOC6_M0/system_psoc6_cm0plus.c

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@
2222
* limitations under the License.
2323
*******************************************************************************/
2424

25-
#include <stdint.h>
2625
#include <stdbool.h>
27-
#include "cy_device.h"
28-
#include "device.h"
2926
#include "system_psoc6.h"
27+
#include "cy_device.h"
3028
#include "cy_device_headers.h"
31-
#include "psoc6_utils.h"
3229
#include "cy_syslib.h"
3330
#include "cy_wdt.h"
34-
#include "cycfg.h"
3531

3632
#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
3733
#include "cy_ipc_sema.h"
@@ -44,10 +40,6 @@
4440

4541
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
4642

47-
#if defined(COMPONENT_SPM_MAILBOX)
48-
void mailbox_init(void);
49-
#endif
50-
5143

5244
/*******************************************************************************
5345
* SystemCoreClockUpdate()
@@ -165,38 +157,6 @@ uint32_t cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD *
165157
#define CY_SYS_CM4_VECTOR_TABLE_VALID_ADDR (0x000003FFUL)
166158

167159

168-
/*******************************************************************************
169-
* Function Name: mbed_sdk_init
170-
****************************************************************************//**
171-
*
172-
* Mbed's post-memory-initialization function.
173-
* Used here to initialize common parts of the Cypress libraries.
174-
*
175-
*******************************************************************************/
176-
void mbed_sdk_init(void)
177-
{
178-
#if !defined(COMPONENT_SPM_MAILBOX)
179-
/* Disable global interrupts */
180-
__disable_irq();
181-
#endif
182-
183-
/* Initialize shared resource manager */
184-
cy_srm_initialize();
185-
186-
/* Initialize system and clocks. */
187-
/* Placed here as it must be done after proper LIBC initialization. */
188-
SystemInit();
189-
190-
#if defined(COMPONENT_SPM_MAILBOX)
191-
/* Configure mailbox IPC interrupts */
192-
mailbox_init();
193-
#else
194-
/* Enable global interrupts */
195-
__enable_irq();
196-
#endif
197-
}
198-
199-
200160
/*******************************************************************************
201161
* Function Name: SystemInit
202162
****************************************************************************//**

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT/device/TARGET_MCU_PSOC6_M4/system_psoc6_cm4.c

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@
2222
* limitations under the License.
2323
*******************************************************************************/
2424

25-
#include <stdint.h>
2625
#include <stdbool.h>
27-
#include "cy_device.h"
28-
#include "device.h"
2926
#include "system_psoc6.h"
27+
#include "cy_device.h"
3028
#include "cy_device_headers.h"
31-
#include "psoc6_utils.h"
3229
#include "cy_syslib.h"
3330
#include "cy_wdt.h"
34-
#include "cycfg.h"
3531

3632
#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
3733
#include "cy_ipc_sema.h"
@@ -43,10 +39,6 @@
4339
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
4440
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
4541

46-
#if defined(COMPONENT_SPM_MAILBOX)
47-
void mailbox_init(void);
48-
#endif
49-
5042

5143
/*******************************************************************************
5244
* SystemCoreClockUpdate()
@@ -271,41 +263,6 @@ void SystemInit(void)
271263
}
272264

273265

274-
/*******************************************************************************
275-
* Function Name: mbed_sdk_init
276-
****************************************************************************//**
277-
*
278-
* Mbed's post-memory-initialization function.
279-
* Used here to initialize common parts of the Cypress libraries.
280-
*
281-
*******************************************************************************/
282-
void mbed_sdk_init(void)
283-
{
284-
#if !defined(COMPONENT_SPM_MAILBOX)
285-
/* Disable global interrupts */
286-
__disable_irq();
287-
#endif
288-
289-
/* Initialize shared resource manager */
290-
cy_srm_initialize();
291-
292-
/* Initialize system and clocks. */
293-
/* Placed here as it must be done after proper LIBC initialization. */
294-
SystemInit();
295-
296-
#if defined(COMPONENT_SPM_MAILBOX)
297-
mailbox_init();
298-
#endif
299-
300-
/* Set up the device based on configurator selections */
301-
init_cycfg_all();
302-
303-
/* Enable global interrupts */
304-
__enable_irq();
305-
}
306-
307-
308-
309266
/*******************************************************************************
310267
* Function Name: Cy_SystemInit
311268
****************************************************************************//**

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

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@
2222
* limitations under the License.
2323
*******************************************************************************/
2424

25-
#include <stdint.h>
2625
#include <stdbool.h>
27-
#include "cy_device.h"
28-
#include "device.h"
2926
#include "system_psoc6.h"
27+
#include "cy_device.h"
3028
#include "cy_device_headers.h"
31-
#include "psoc6_utils.h"
3229
#include "cy_syslib.h"
3330
#include "cy_wdt.h"
34-
#include "cycfg.h"
3531

3632
#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
3733
#include "cy_ipc_sema.h"
@@ -43,10 +39,6 @@
4339
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
4440
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
4541

46-
#if defined(COMPONENT_SPM_MAILBOX)
47-
void mailbox_init(void);
48-
#endif
49-
5042

5143
/*******************************************************************************
5244
* SystemCoreClockUpdate()
@@ -271,41 +263,6 @@ void SystemInit(void)
271263
}
272264

273265

274-
/*******************************************************************************
275-
* Function Name: mbed_sdk_init
276-
****************************************************************************//**
277-
*
278-
* Mbed's post-memory-initialization function.
279-
* Used here to initialize common parts of the Cypress libraries.
280-
*
281-
*******************************************************************************/
282-
void mbed_sdk_init(void)
283-
{
284-
#if !defined(COMPONENT_SPM_MAILBOX)
285-
/* Disable global interrupts */
286-
__disable_irq();
287-
#endif
288-
289-
/* Initialize shared resource manager */
290-
cy_srm_initialize();
291-
292-
/* Initialize system and clocks. */
293-
/* Placed here as it must be done after proper LIBC initialization. */
294-
SystemInit();
295-
296-
#if defined(COMPONENT_SPM_MAILBOX)
297-
mailbox_init();
298-
#endif
299-
300-
/* Set up the device based on configurator selections */
301-
init_cycfg_all();
302-
303-
/* Enable global interrupts */
304-
__enable_irq();
305-
}
306-
307-
308-
309266
/*******************************************************************************
310267
* Function Name: Cy_SystemInit
311268
****************************************************************************//**

0 commit comments

Comments
 (0)