mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10483 from vmedcy/pr/cy-system-psoc6
PSOC6: move mbed_sdk_init to mbed_overrides.cpull/10595/head
commit
d99756324a
|
|
@ -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"
|
||||
|
|
@ -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()
|
||||
|
|
@ -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
|
||||
****************************************************************************//**
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -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()
|
||||
|
|
@ -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
|
||||
****************************************************************************//**
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -44,10 +40,6 @@
|
|||
|
||||
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
|
||||
|
||||
#if defined(COMPONENT_SPM_MAILBOX)
|
||||
void mailbox_init(void);
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* SystemCoreClockUpdate()
|
||||
|
|
@ -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
|
||||
****************************************************************************//**
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -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()
|
||||
|
|
@ -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
|
||||
****************************************************************************//**
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -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()
|
||||
|
|
@ -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
|
||||
****************************************************************************//**
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -44,10 +40,6 @@
|
|||
|
||||
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
|
||||
|
||||
#if defined(COMPONENT_SPM_MAILBOX)
|
||||
void mailbox_init(void);
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* SystemCoreClockUpdate()
|
||||
|
|
@ -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
|
||||
****************************************************************************//**
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -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()
|
||||
|
|
@ -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
|
||||
****************************************************************************//**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* mbed Microcontroller Library
|
||||
* Copyright (c) 2018-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "device.h"
|
||||
#include "psoc6_utils.h"
|
||||
#include "cycfg.h"
|
||||
|
||||
#if defined(COMPONENT_SPM_MAILBOX)
|
||||
void mailbox_init(void);
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
* 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)
|
||||
{
|
||||
/* 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
|
||||
|
||||
#if (!CY_CPU_CORTEX_M0P)
|
||||
/* Set up the device based on configurator selections */
|
||||
init_cycfg_all();
|
||||
|
||||
/* Enable global interrupts (disabled in CM4 startup assembly) */
|
||||
__enable_irq();
|
||||
#endif
|
||||
}
|
||||
Loading…
Reference in New Issue