Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSOC6: move mbed_sdk_init to mbed_overrides.c #10483

Merged
merged 2 commits into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@
* limitations under the License.
*******************************************************************************/

#include <stdint.h>
#include <stdbool.h>
#include "cy_device.h"
#include "device.h"
#include "system_psoc6.h"
#include "cy_device.h"
#include "cy_device_headers.h"
#include "psoc6_utils.h"
#include "cy_syslib.h"
#include "cy_wdt.h"
#include "cycfg.h"

#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
#include "cy_ipc_sema.h"
Expand All @@ -43,10 +39,6 @@
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */

#if defined(COMPONENT_SPM_MAILBOX)
void mailbox_init(void);
#endif


/*******************************************************************************
* SystemCoreClockUpdate()
Expand Down Expand Up @@ -271,41 +263,6 @@ void SystemInit(void)
}


/*******************************************************************************
* Function Name: mbed_sdk_init
****************************************************************************//**
*
* Mbed's post-memory-initialization function.
* Used here to initialize common parts of the Cypress libraries.
*
*******************************************************************************/
void mbed_sdk_init(void)
{
#if !defined(COMPONENT_SPM_MAILBOX)
/* Disable global interrupts */
__disable_irq();
#endif

/* Initialize shared resource manager */
cy_srm_initialize();

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

#if defined(COMPONENT_SPM_MAILBOX)
mailbox_init();
#endif

/* Set up the device based on configurator selections */
init_cycfg_all();

/* Enable global interrupts */
__enable_irq();
}



/*******************************************************************************
* Function Name: Cy_SystemInit
****************************************************************************//**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@
* limitations under the License.
*******************************************************************************/

#include <stdint.h>
#include <stdbool.h>
#include "cy_device.h"
#include "device.h"
#include "system_psoc6.h"
#include "cy_device.h"
#include "cy_device_headers.h"
#include "psoc6_utils.h"
#include "cy_syslib.h"
#include "cy_wdt.h"
#include "cycfg.h"

#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
#include "cy_ipc_sema.h"
Expand All @@ -43,10 +39,6 @@
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */

#if defined(COMPONENT_SPM_MAILBOX)
void mailbox_init(void);
#endif


/*******************************************************************************
* SystemCoreClockUpdate()
Expand Down Expand Up @@ -271,41 +263,6 @@ void SystemInit(void)
}


/*******************************************************************************
* Function Name: mbed_sdk_init
****************************************************************************//**
*
* Mbed's post-memory-initialization function.
* Used here to initialize common parts of the Cypress libraries.
*
*******************************************************************************/
void mbed_sdk_init(void)
{
#if !defined(COMPONENT_SPM_MAILBOX)
/* Disable global interrupts */
__disable_irq();
#endif

/* Initialize shared resource manager */
cy_srm_initialize();

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

#if defined(COMPONENT_SPM_MAILBOX)
mailbox_init();
#endif

/* Set up the device based on configurator selections */
init_cycfg_all();

/* Enable global interrupts */
__enable_irq();
}



/*******************************************************************************
* Function Name: Cy_SystemInit
****************************************************************************//**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@
* limitations under the License.
*******************************************************************************/

#include <stdint.h>
#include <stdbool.h>
#include "cy_device.h"
#include "device.h"
#include "system_psoc6.h"
#include "cy_device.h"
#include "cy_device_headers.h"
#include "psoc6_utils.h"
#include "cy_syslib.h"
#include "cy_wdt.h"
#include "cycfg.h"

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

#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */

#if defined(COMPONENT_SPM_MAILBOX)
void mailbox_init(void);
#endif


/*******************************************************************************
* SystemCoreClockUpdate()
Expand Down Expand Up @@ -165,38 +157,6 @@ uint32_t cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD *
#define CY_SYS_CM4_VECTOR_TABLE_VALID_ADDR (0x000003FFUL)


/*******************************************************************************
* Function Name: mbed_sdk_init
****************************************************************************//**
*
* Mbed's post-memory-initialization function.
* Used here to initialize common parts of the Cypress libraries.
*
*******************************************************************************/
void mbed_sdk_init(void)
{
#if !defined(COMPONENT_SPM_MAILBOX)
/* Disable global interrupts */
__disable_irq();
#endif

/* Initialize shared resource manager */
cy_srm_initialize();

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

#if defined(COMPONENT_SPM_MAILBOX)
/* Configure mailbox IPC interrupts */
mailbox_init();
#else
/* Enable global interrupts */
__enable_irq();
#endif
}


/*******************************************************************************
* Function Name: SystemInit
****************************************************************************//**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@
* limitations under the License.
*******************************************************************************/

#include <stdint.h>
#include <stdbool.h>
#include "cy_device.h"
#include "device.h"
#include "system_psoc6.h"
#include "cy_device.h"
#include "cy_device_headers.h"
#include "psoc6_utils.h"
#include "cy_syslib.h"
#include "cy_wdt.h"
#include "cycfg.h"

#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
#include "cy_ipc_sema.h"
Expand All @@ -43,10 +39,6 @@
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */

#if defined(COMPONENT_SPM_MAILBOX)
void mailbox_init(void);
#endif


/*******************************************************************************
* SystemCoreClockUpdate()
Expand Down Expand Up @@ -271,41 +263,6 @@ void SystemInit(void)
}


/*******************************************************************************
* Function Name: mbed_sdk_init
****************************************************************************//**
*
* Mbed's post-memory-initialization function.
* Used here to initialize common parts of the Cypress libraries.
*
*******************************************************************************/
void mbed_sdk_init(void)
{
#if !defined(COMPONENT_SPM_MAILBOX)
/* Disable global interrupts */
__disable_irq();
#endif

/* Initialize shared resource manager */
cy_srm_initialize();

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

#if defined(COMPONENT_SPM_MAILBOX)
mailbox_init();
#endif

/* Set up the device based on configurator selections */
init_cycfg_all();

/* Enable global interrupts */
__enable_irq();
}



/*******************************************************************************
* Function Name: Cy_SystemInit
****************************************************************************//**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@
* limitations under the License.
*******************************************************************************/

#include <stdint.h>
#include <stdbool.h>
#include "cy_device.h"
#include "device.h"
#include "system_psoc6.h"
#include "cy_device.h"
#include "cy_device_headers.h"
#include "psoc6_utils.h"
#include "cy_syslib.h"
#include "cy_wdt.h"
#include "cycfg.h"

#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
#include "cy_ipc_sema.h"
Expand All @@ -43,10 +39,6 @@
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */

#if defined(COMPONENT_SPM_MAILBOX)
void mailbox_init(void);
#endif


/*******************************************************************************
* SystemCoreClockUpdate()
Expand Down Expand Up @@ -271,41 +263,6 @@ void SystemInit(void)
}


/*******************************************************************************
* Function Name: mbed_sdk_init
****************************************************************************//**
*
* Mbed's post-memory-initialization function.
* Used here to initialize common parts of the Cypress libraries.
*
*******************************************************************************/
void mbed_sdk_init(void)
{
#if !defined(COMPONENT_SPM_MAILBOX)
/* Disable global interrupts */
__disable_irq();
#endif

/* Initialize shared resource manager */
cy_srm_initialize();

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

#if defined(COMPONENT_SPM_MAILBOX)
mailbox_init();
#endif

/* Set up the device based on configurator selections */
init_cycfg_all();

/* Enable global interrupts */
__enable_irq();
}



/*******************************************************************************
* Function Name: Cy_SystemInit
****************************************************************************//**
Expand Down
Loading