diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm0plus.sct b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm0plus.sct index 902b7bf83f..4e4f4f598b 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm0plus.sct +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm0plus.sct @@ -142,7 +142,13 @@ LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000) * (.noinit) } - ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -Stack_Size + ; Application heap area (HEAP) + ARM_LIB_HEAP +0 + { + * (HEAP) + } + + ARM_LIB_STACK RAM_START + RAM_SIZE EMPTY - Stack_Size { ; Stack region growing down } } diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/ipc_rpc_m0.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/ipc_rpc_m0.c index 5757ab5cd6..13c5d9125e 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/ipc_rpc_m0.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/ipc_rpc_m0.c @@ -19,7 +19,7 @@ #include "ipc_rpc.h" #include "rpc_defs.h" #include "cy_ipc_config.h" -#include "ipc/cy_ipc_pipe.h" +#include "cy_ipc_pipe.h" #define RPC_GEN RPC_GEN_IMPLEMENTATION #include "rpc_api.h" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/system_psoc63_cm0plus.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/system_psoc63_cm0plus.c index 47cf6a1c18..f56d00fcba 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/system_psoc63_cm0plus.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M0/system_psoc63_cm0plus.c @@ -21,11 +21,11 @@ #if defined(CY_DEVICE_PSOC6ABLE2) #if !defined(CY_PSOC6ABLE2_REV_0A_SUPPORT_DISABLE) - #include "syslib/cy_syslib.h" + #include "cy_syslib.h" #endif /* !defined(CY_PSOC6ABLE2_REV_0A_SUPPORT_DISABLE) */ #if !defined(CY_IPC_DEFAULT_CFG_DISABLE) - #include "ipc/cy_ipc_drv.h" - #include "flash/cy_flash.h" + #include "cy_ipc_drv.h" + #include "cy_flash.h" #endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */ #endif /* defined(CY_DEVICE_PSOC6ABLE2) */ @@ -583,7 +583,7 @@ void Cy_SysResetCM4(void) * linker configuration files. The following symbols used by the cymcuelftool. * *******************************************************************************/ -#if defined (__ARMCC_VERSION) +#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION < 6000000) __asm void Cy_MemorySymbols(void) { /* Flash */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm4_dual.sct b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm4_dual.sct index e101199e50..1e8716a9c3 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm4_dual.sct +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm4_dual.sct @@ -132,10 +132,6 @@ LR_IROM1 FLASH_START FLASH_SIZE .ANY (+RW, +ZI) } - ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -Stack_Size - { ; Stack region growing down - } - ; Place variables in the section that should not be initialized during the ; device startup. RW_IRAM1 +0 UNINIT @@ -143,6 +139,16 @@ LR_IROM1 FLASH_START FLASH_SIZE * (.noinit) } + ; Application heap area (HEAP) + ARM_LIB_HEAP +0 + { + * (HEAP) + } + + ARM_LIB_STACK RAM_START + RAM_SIZE EMPTY - Stack_Size + { ; Stack region growing down + } + ; Used for the digital signature of the secure application and the ; Bootloader SDK appication. The size of the section depends on the required ; data size. diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/ipc_rpc.cpp b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/ipc_rpc.cpp index c331b23adc..d74b633ab4 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/ipc_rpc.cpp +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/ipc_rpc.cpp @@ -20,7 +20,7 @@ #include "Semaphore.h" #include "mbed_assert.h" #include "cy_ipc_config.h" -#include "ipc/cy_ipc_pipe.h" +#include "cy_ipc_pipe.h" #include #include "platform/SingletonPtr.h" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/system_psoc63_cm4.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/system_psoc63_cm4.c index 2102061595..c28f055d67 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/system_psoc63_cm4.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/TARGET_MCU_PSOC6_M4/system_psoc63_cm4.c @@ -20,8 +20,8 @@ #include "psoc6_utils.h" #if defined(CY_DEVICE_PSOC6ABLE2) && !defined(CY_IPC_DEFAULT_CFG_DISABLE) - #include "ipc/cy_ipc_drv.h" - #include "flash/cy_flash.h" + #include "cy_ipc_drv.h" + #include "cy_flash.h" #endif /* defined(CY_DEVICE_PSOC6ABLE2) && !defined(CY_IPC_DEFAULT_CFG_DISABLE) */ @@ -409,7 +409,7 @@ void Cy_SystemInitFpuEnable(void) * linker configuration files. The following symbols used by the cymcuelftool. * *******************************************************************************/ -#if defined (__ARMCC_VERSION) +#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION < 6000000) __asm void Cy_MemorySymbols(void) { /* Flash */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/device/cy_ipc_config.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/device/cy_ipc_config.c index 1394c20dbe..a0bccb9f86 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/device/cy_ipc_config.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_CY8C63XX/device/cy_ipc_config.c @@ -12,9 +12,9 @@ * SPDX-License-Identifier: Apache-2.0 *******************************************************************************/ -#include "ipc/cy_ipc_drv.h" -#include "ipc/cy_ipc_pipe.h" -#include "ipc/cy_ipc_sema.h" +#include "cy_ipc_drv.h" +#include "cy_ipc_pipe.h" +#include "cy_ipc_sema.h" #include "cy_ipc_config.h" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_FUTURE_SEQUANA/TARGET_FUTURE_SEQUANA_M0/board_config.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_FUTURE_SEQUANA/TARGET_FUTURE_SEQUANA_M0/board_config.c index 6570356cfb..8e0e922c13 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_FUTURE_SEQUANA/TARGET_FUTURE_SEQUANA_M0/board_config.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/TARGET_FUTURE_SEQUANA/TARGET_FUTURE_SEQUANA_M0/board_config.c @@ -17,18 +17,18 @@ #include #include "device.h" -#include "gpio/cy_gpio.h" -#include "syslib/cy_syslib.h" -#include "sysclk/cy_sysclk.h" -#include "systick/cy_systick.h" -#include "sysanalog/cy_sysanalog.h" +#include "cy_gpio.h" +#include "cy_syslib.h" +#include "cy_sysclk.h" +#include "cy_systick.h" +#include "cy_sysanalog.h" #if FEATURE_BLE #include "ble/cy_ble_clk.h" #endif // FEATURE_BLE #define CY_NEED_CYCLOCKSTARTUPERROR 1 -#include "syspm/cy_syspm.h" +#include "cy_syspm.h" #include "psoc6_utils.h" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctb/cy_ctb.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ctb.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctb/cy_ctb.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ctb.h index cceedf093b..e1fee09035 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctb/cy_ctb.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ctb.h @@ -300,8 +300,8 @@ #include #include #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" -#include "sysanalog/cy_sysanalog.h" +#include "cy_syslib.h" +#include "cy_sysanalog.h" #ifndef CY_IP_MXS40PASS_CTB #error "The CTB driver is not supported on this device" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctdac/cy_ctdac.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ctdac.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctdac/cy_ctdac.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ctdac.h index ddfb6b9922..82c31a0960 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctdac/cy_ctdac.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ctdac.h @@ -338,9 +338,9 @@ #include #include #include "cy_device_headers.h" -#include "syspm/cy_syspm.h" -#include "syslib/cy_syslib.h" -#include "sysclk/cy_sysclk.h" +#include "cy_syspm.h" +#include "cy_syslib.h" +#include "cy_sysclk.h" #ifndef CY_IP_MXS40PASS_CTDAC #error "The CTDAC driver is not supported on this device" @@ -922,10 +922,12 @@ __STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptStatus(const CTDAC_Type *base) *******************************************************************************/ __STATIC_INLINE void Cy_CTDAC_ClearInterrupt(CTDAC_Type *base) { + uint32_t unused; + base->INTR = CTDAC_INTR_VDAC_EMPTY_Msk; /* Dummy read for buffered writes. */ - (void) base->INTR; + unused = base->INTR; } /******************************************************************************* diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/dma/cy_dma.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_dma.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/dma/cy_dma.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_dma.h index 85b1857aaa..b7563e8c20 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/dma/cy_dma.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_dma.h @@ -150,7 +150,7 @@ #include #include #include -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #include "cy_device_headers.h" #ifndef CY_IP_M4CPUSS_DMA diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/efuse/cy_efuse.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_efuse.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/efuse/cy_efuse.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_efuse.h index 4c8a12763a..0df60c139d 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/efuse/cy_efuse.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_efuse.h @@ -109,7 +109,7 @@ */ #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" /*************************************** * Macro Definitions diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/flash/cy_flash.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_flash.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/flash/cy_flash.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_flash.h index 07b0b7a82f..0276476390 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/flash/cy_flash.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_flash.h @@ -296,7 +296,7 @@ */ #include -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #if defined(__cplusplus) extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/gpio/cy_gpio.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_gpio.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/gpio/cy_gpio.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_gpio.h index 6b5d97f7e4..50156f9d7f 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/gpio/cy_gpio.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_gpio.h @@ -120,7 +120,7 @@ #define CY_GPIO_H #include -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #include "cy_device_headers.h" #if defined(__cplusplus) @@ -1566,15 +1566,17 @@ __STATIC_INLINE uint32_t Cy_GPIO_GetInterruptStatus(GPIO_PRT_Type* base, uint32_ *******************************************************************************/ __STATIC_INLINE void Cy_GPIO_ClearInterrupt(GPIO_PRT_Type* base, uint32_t pinNum) { + uint32_t unused; + CY_ASSERT_L2(CY_GPIO_IS_FILTER_PIN_VALID(pinNum)); /* Any INTR MMIO registers AHB clearing must be preceded with an AHB read access */ - (void)base->INTR; + unused = base->INTR; base->INTR = CY_GPIO_INTR_STATUS_MASK << pinNum; /* This read ensures that the initial write has been flushed out to the hardware */ - (void)base->INTR; + unused = base->INTR; } diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/i2s/cy_i2s.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_i2s.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/i2s/cy_i2s.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_i2s.h index 0e89d1a5c4..1e324ef2ed 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/i2s/cy_i2s.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_i2s.h @@ -142,8 +142,8 @@ #include #include -#include "syslib/cy_syslib.h" -#include "syspm/cy_syspm.h" +#include "cy_syslib.h" +#include "cy_syspm.h" #ifndef CY_IP_MXAUDIOSS #error "The I2S driver is not supported on this device" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_drv.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ipc_drv.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_drv.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ipc_drv.h index bf8005a7af..d68c0ed211 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_drv.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ipc_drv.h @@ -282,7 +282,7 @@ /******************************************************************************/ /* Include files */ /******************************************************************************/ -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #include "cy_device_headers.h" #include "cy_ipc_config.h" #include @@ -615,11 +615,13 @@ __STATIC_INLINE void Cy_IPC_Drv_SetInterrupt(IPC_INTR_STRUCT_Type* base, uint32 *******************************************************************************/ __STATIC_INLINE void Cy_IPC_Drv_ClearInterrupt(IPC_INTR_STRUCT_Type* base, uint32_t ipcReleaseMask, uint32_t ipcNotifyMask) { + uint32_t unused; + CY_ASSERT_L1(0ul == (ipcNotifyMask & ~(uint32_t)(IPC_STRUCT_NOTIFY_INTR_NOTIFY_Msk))); CY_ASSERT_L1(0ul == (ipcReleaseMask & ~(uint32_t)(IPC_STRUCT_RELEASE_INTR_RELEASE_Msk))); base->INTR = _VAL2FLD(IPC_INTR_STRUCT_INTR_NOTIFY, ipcNotifyMask) | _VAL2FLD(IPC_INTR_STRUCT_INTR_RELEASE, ipcReleaseMask); - (void)base->INTR; /* Read the register to flush the cache */ + unused = base->INTR; /* Read the register to flush the cache */ } /** \} group_ipc_functions */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_pipe.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ipc_pipe.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_pipe.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ipc_pipe.h index 0bac9a0e16..b8847c2c16 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_pipe.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ipc_pipe.h @@ -17,9 +17,9 @@ /******************************************************************************/ /* Include files */ /******************************************************************************/ -#include "ipc/cy_ipc_drv.h" -#include "syslib/cy_syslib.h" -#include "sysint/cy_sysint.h" +#include "cy_ipc_drv.h" +#include "cy_syslib.h" +#include "cy_sysint.h" /** * \addtogroup group_ipc_pipe IPC pipes layer (IPC_PIPE) diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_sema.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ipc_sema.h similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_sema.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ipc_sema.h diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lpcomp/cy_lpcomp.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_lpcomp.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lpcomp/cy_lpcomp.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_lpcomp.h index 1e57e7da0e..687ad32861 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lpcomp/cy_lpcomp.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_lpcomp.h @@ -150,8 +150,8 @@ #include #include #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" -#include "syspm/cy_syspm.h" +#include "cy_syslib.h" +#include "cy_syspm.h" #ifndef CY_IP_MXLPCOMP #error "The LPCOMP driver is not supported on this device" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lvd/cy_lvd.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_lvd.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lvd/cy_lvd.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_lvd.h index 5c9d529006..346adccd95 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lvd/cy_lvd.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_lvd.h @@ -105,7 +105,7 @@ #if !defined CY_LVD_H #define CY_LVD_H -#include "syspm/cy_syspm.h" +#include "cy_syspm.h" #ifdef __cplusplus extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/mcwdt/cy_mcwdt.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_mcwdt.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/mcwdt/cy_mcwdt.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_mcwdt.h index eff6854b1e..08d631a5db 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/mcwdt/cy_mcwdt.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_mcwdt.h @@ -121,7 +121,7 @@ extern "C" { #include #include #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #ifndef CY_IP_MXS40SRSS_MCWDT #error "The MCWDT driver is not supported on this device" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/pdm_pcm/cy_pdm_pcm.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_pdm_pcm.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/pdm_pcm/cy_pdm_pcm.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_pdm_pcm.h index 7c02136cd2..3739cd616f 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/pdm_pcm/cy_pdm_pcm.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_pdm_pcm.h @@ -161,8 +161,8 @@ /******************************************************************************/ #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" -#include "syspm/cy_syspm.h" +#include "cy_syslib.h" +#include "cy_syspm.h" #include #include diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/profile/cy_profile.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_profile.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/profile/cy_profile.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_profile.h index adbfec9604..9ce10f05b6 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/profile/cy_profile.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_profile.h @@ -178,7 +178,7 @@ #define CY_PROFILE_H #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #include #ifndef CY_IP_MXPROFILE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/prot/cy_prot.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_prot.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/prot/cy_prot.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_prot.h index c5f2235e07..d13376da96 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/prot/cy_prot.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_prot.h @@ -380,7 +380,7 @@ #include #include -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #include "cy_device_headers.h" #if defined(__cplusplus) diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/rtc/cy_rtc.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_rtc.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/rtc/cy_rtc.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_rtc.h index 5f3153cd71..1cb4c4b245 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/rtc/cy_rtc.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_rtc.h @@ -280,8 +280,8 @@ #include #include #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" -#include "syspm/cy_syspm.h" +#include "cy_syslib.h" +#include "cy_syspm.h" #ifndef CY_IP_MXS40SRSS_RTC #error "The RTC driver is not supported on this device" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sar/cy_sar.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sar.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sar/cy_sar.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sar.h index 2e1c2b5bac..0441644929 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sar/cy_sar.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sar.h @@ -584,8 +584,8 @@ #include #include #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" -#include "syspm/cy_syspm.h" +#include "cy_syslib.h" +#include "cy_syspm.h" #ifndef CY_IP_MXS40PASS_SAR #error "The SAR driver is not supported on this device" @@ -1556,12 +1556,14 @@ __STATIC_INLINE uint32_t Cy_SAR_GetInterruptStatus(const SAR_Type *base) *******************************************************************************/ __STATIC_INLINE void Cy_SAR_ClearInterrupt(SAR_Type *base, uint32_t intrMask) { + uint32_t unused; + CY_ASSERT_L2(CY_SAR_INTRMASK(intrMask)); base->INTR = intrMask; /* Dummy read for buffered writes. */ - (void) base->INTR; + unused = base->INTR; } /******************************************************************************* @@ -1710,12 +1712,14 @@ __STATIC_INLINE uint32_t Cy_SAR_GetRangeInterruptStatus(const SAR_Type *base) *******************************************************************************/ __STATIC_INLINE void Cy_SAR_ClearRangeInterrupt(SAR_Type *base, uint32_t chanMask) { + uint32_t unused; + CY_ASSERT_L2(CY_SAR_CHANMASK(chanMask)); base->RANGE_INTR = chanMask; /* Dummy read for buffered writes. */ - (void) base->RANGE_INTR; + unused = base->RANGE_INTR; } /******************************************************************************* @@ -1851,12 +1855,14 @@ __STATIC_INLINE uint32_t Cy_SAR_GetSatInterruptStatus(const SAR_Type *base) *******************************************************************************/ __STATIC_INLINE void Cy_SAR_ClearSatInterrupt(SAR_Type *base, uint32_t chanMask) { + uint32_t unused; + CY_ASSERT_L2(CY_SAR_CHANMASK(chanMask)); base->SATURATE_INTR = chanMask; /* Dummy read for buffered writes. */ - (void) base->SATURATE_INTR; + unused = base->SATURATE_INTR; } /******************************************************************************* diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_common.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_common.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_common.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_common.h index 24d2513b18..59371d9414 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_common.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_common.h @@ -99,8 +99,8 @@ #include #include #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" -#include "syspm/cy_syspm.h" +#include "cy_syslib.h" +#include "cy_syspm.h" #ifndef CY_IP_MXSCB #error "The SCB driver is not supported on this device" @@ -660,10 +660,12 @@ __STATIC_INLINE uint32_t Cy_SCB_GetRxSrValid(CySCB_Type const *base) *******************************************************************************/ __STATIC_INLINE void Cy_SCB_ClearRxFifo(CySCB_Type* base) { + uint32_t unused; + base->RX_FIFO_CTRL |= (uint32_t) SCB_RX_FIFO_CTRL_CLEAR_Msk; base->RX_FIFO_CTRL &= (uint32_t) ~SCB_RX_FIFO_CTRL_CLEAR_Msk; - (void) base->RX_FIFO_CTRL; + unused = base->RX_FIFO_CTRL; } @@ -785,10 +787,12 @@ __STATIC_INLINE bool Cy_SCB_IsTxComplete(CySCB_Type const *base) *******************************************************************************/ __STATIC_INLINE void Cy_SCB_ClearTxFifo(CySCB_Type *base) { + uint32_t unused; + base->TX_FIFO_CTRL |= (uint32_t) SCB_TX_FIFO_CTRL_CLEAR_Msk; base->TX_FIFO_CTRL &= (uint32_t) ~SCB_TX_FIFO_CTRL_CLEAR_Msk; - (void) base->TX_FIFO_CTRL; + unused = base->TX_FIFO_CTRL; } @@ -958,10 +962,12 @@ __STATIC_INLINE uint32_t Cy_SCB_GetRxInterruptStatusMasked(CySCB_Type const *bas *******************************************************************************/ __STATIC_INLINE void Cy_SCB_ClearRxInterrupt(CySCB_Type *base, uint32_t interruptMask) { + uint32_t unused; + CY_ASSERT_L2(CY_SCB_IS_INTR_VALID(interruptMask, CY_SCB_RX_INTR_MASK)); base->INTR_RX = interruptMask; - (void) base->INTR_RX; + unused = base->INTR_RX; } @@ -1104,10 +1110,12 @@ __STATIC_INLINE uint32_t Cy_SCB_GetTxInterruptStatusMasked(CySCB_Type const *bas *******************************************************************************/ __STATIC_INLINE void Cy_SCB_ClearTxInterrupt(CySCB_Type *base, uint32_t interruptMask) { + uint32_t unused; + CY_ASSERT_L2(CY_SCB_IS_INTR_VALID(interruptMask, CY_SCB_TX_INTR_MASK)); base->INTR_TX = interruptMask; - (void) base->INTR_TX; + unused = base->INTR_TX; } @@ -1241,10 +1249,12 @@ __STATIC_INLINE uint32_t Cy_SCB_GetMasterInterruptStatusMasked(CySCB_Type const *******************************************************************************/ __STATIC_INLINE void Cy_SCB_ClearMasterInterrupt(CySCB_Type *base, uint32_t interruptMask) { + uint32_t unused; + CY_ASSERT_L2(CY_SCB_IS_INTR_VALID(interruptMask, CY_SCB_MASTER_INTR_MASK)); base->INTR_M = interruptMask; - (void) base->INTR_M; + unused = base->INTR_M; } @@ -1380,10 +1390,12 @@ __STATIC_INLINE uint32_t Cy_SCB_GetSlaveInterruptStatusMasked(CySCB_Type const * *******************************************************************************/ __STATIC_INLINE void Cy_SCB_ClearSlaveInterrupt(CySCB_Type *base, uint32_t interruptMask) { + uint32_t unused; + CY_ASSERT_L2(CY_SCB_IS_INTR_VALID(interruptMask, CY_SCB_SLAVE_INTR_MASK)); base->INTR_S = interruptMask; - (void) base->INTR_S; + unused = base->INTR_S; } @@ -1516,10 +1528,12 @@ __STATIC_INLINE uint32_t Cy_SCB_GetI2CInterruptStatusMasked(CySCB_Type const *ba *******************************************************************************/ __STATIC_INLINE void Cy_SCB_ClearI2CInterrupt(CySCB_Type *base, uint32_t interruptMask) { + uint32_t unused; + CY_ASSERT_L2(CY_SCB_IS_INTR_VALID(interruptMask, CY_SCB_I2C_INTR_MASK)); base->INTR_I2C_EC = interruptMask; - (void) base->INTR_I2C_EC; + unused = base->INTR_I2C_EC; } @@ -1629,10 +1643,12 @@ __STATIC_INLINE uint32_t Cy_SCB_GetSpiInterruptStatusMasked(CySCB_Type const *ba *******************************************************************************/ __STATIC_INLINE void Cy_SCB_ClearSpiInterrupt(CySCB_Type *base, uint32_t interruptMask) { + uint32_t unused; + CY_ASSERT_L2(CY_SCB_IS_INTR_VALID(interruptMask, CY_SCB_SPI_INTR_MASK)); base->INTR_SPI_EC = interruptMask; - (void) base->INTR_SPI_EC; + unused = base->INTR_SPI_EC; } /** \cond INTERNAL */ @@ -1707,6 +1723,8 @@ __STATIC_INLINE bool Cy_SCB_IsTxDataWidthByte(CySCB_Type const *base) *******************************************************************************/ __STATIC_INLINE void Cy_SCB_FwBlockReset(CySCB_Type *base) { + uint32_t unused; + base->CTRL &= (uint32_t) ~SCB_CTRL_ENABLED_Msk; /* Clean-up command registers */ @@ -1715,7 +1733,7 @@ __STATIC_INLINE void Cy_SCB_FwBlockReset(CySCB_Type *base) base->CTRL |= (uint32_t) SCB_CTRL_ENABLED_Msk; - (void) base->CTRL; + unused = base->CTRL; } diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_ezi2c.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_ezi2c.h similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_ezi2c.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_ezi2c.h diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_i2c.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_i2c.h similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_i2c.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_i2c.h diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_spi.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_spi.h similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_spi.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_spi.h diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_uart.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_uart.h similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_uart.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_uart.h diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_smif.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_smif.h index 228a24dff3..b2092b1536 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_smif.h @@ -247,8 +247,8 @@ #include #include #include -#include "syslib/cy_syslib.h" -#include "syspm/cy_syspm.h" +#include "cy_syslib.h" +#include "cy_syspm.h" #include "cy_device_headers.h" #ifndef CY_IP_MXSMIF diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif_memslot.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_smif_memslot.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif_memslot.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_smif_memslot.h index d26f4bf5c4..d5c0dad708 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif_memslot.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_smif_memslot.h @@ -19,7 +19,7 @@ #include #include -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #include "cy_device_headers.h" #include "cy_smif.h" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysanalog/cy_sysanalog.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysanalog.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysanalog/cy_sysanalog.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysanalog.h index 276cf8f683..52bbb69cb7 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysanalog/cy_sysanalog.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysanalog.h @@ -144,8 +144,8 @@ #include #include #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" -#include "syspm/cy_syspm.h" +#include "cy_syslib.h" +#include "cy_syspm.h" #ifndef CY_IP_MXS40PASS #error "The SysAnalog driver is not supported on this device" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysclk/cy_sysclk.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysclk.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysclk/cy_sysclk.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysclk.h index d242f5eeb3..e8305b7444 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysclk/cy_sysclk.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysclk.h @@ -574,8 +574,8 @@ #define __CY_SYSCLK_H__ #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" -#include "syspm/cy_syspm.h" +#include "cy_syslib.h" +#include "cy_syspm.h" #include #if defined(__cplusplus) @@ -2069,6 +2069,8 @@ __STATIC_INLINE cy_en_sysclk_status_t Cy_SysClk_PeriphEnableDivider(cy_en_divider_types_t dividerType, uint32_t dividerNum) { cy_en_sysclk_status_t retval = CY_SYSCLK_BAD_PARAM; + uint32_t unused; + if (dividerType <= CY_SYSCLK_DIV_24_5_BIT) { if (((dividerType == CY_SYSCLK_DIV_8_BIT) && (dividerNum < PERI_DIV_8_NR)) || @@ -2082,7 +2084,7 @@ __STATIC_INLINE cy_en_sysclk_status_t PERI_DIV_CMD_PA_DIV_SEL_Msk | _VAL2FLD(PERI_DIV_CMD_TYPE_SEL, dividerType) | _VAL2FLD(PERI_DIV_CMD_DIV_SEL, dividerNum); - (void)PERI->DIV_CMD; /* dummy read to handle buffered writes */ + unused = PERI->DIV_CMD; /* dummy read to handle buffered writes */ retval = CY_SYSCLK_SUCCESS; } } diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysint/cy_sysint.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysint.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysint/cy_sysint.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysint.h index 918991101e..d20522e14c 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysint/cy_sysint.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysint.h @@ -154,7 +154,7 @@ #define CY_SYSINT_H #include -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #include "cy_device_headers.h" #if defined(__cplusplus) diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/cy_syslib.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_syslib.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/cy_syslib.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_syslib.h index 28edddfa7f..d0e002c395 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/cy_syslib.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_syslib.h @@ -407,7 +407,7 @@ typedef enum /******************************************************************************* * Memory model definitions *******************************************************************************/ -#if defined(__ARMCC_VERSION) +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 6000000) /** To create cross compiler compatible code, use the CY_NOINIT, CY_SECTION, CY_UNUSED, CY_ALIGN * attributes at the first place of declaration/definition. * For example: CY_NOINIT uint32_t noinitVar; diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syspm/cy_syspm.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_syspm.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syspm/cy_syspm.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_syspm.h index a267d4dc70..bd841689b4 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syspm/cy_syspm.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_syspm.h @@ -621,7 +621,7 @@ #include #include #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #ifdef __cplusplus extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/systick/cy_systick.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_systick.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/systick/cy_systick.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_systick.h index 6df517a5d1..978dd9c604 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/systick/cy_systick.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_systick.h @@ -84,7 +84,7 @@ */ #include -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #ifdef __cplusplus extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm.h index e95d9c22cd..6a817744c8 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm.h @@ -201,7 +201,7 @@ #include #include #include -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #include "cy_device_headers.h" #ifndef CY_IP_MXTCPWM @@ -535,8 +535,10 @@ __STATIC_INLINE uint32_t Cy_TCPWM_GetInterruptStatus(TCPWM_Type const *base, uin *******************************************************************************/ __STATIC_INLINE void Cy_TCPWM_ClearInterrupt(TCPWM_Type *base, uint32_t cntNum, uint32_t source) { + uint32_t unused; + base->CNT[cntNum].INTR = source; - (void)base->CNT[cntNum].INTR; + unused = base->CNT[cntNum].INTR; } diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_counter.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm_counter.h similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_counter.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm_counter.h diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_pwm.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm_pwm.h similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_pwm.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm_pwm.h diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_quaddec.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm_quaddec.h similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_quaddec.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm_quaddec.h diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/trigmux/cy_trigmux.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_trigmux.h similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/trigmux/cy_trigmux.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_trigmux.h index b9b8d0782d..30a0fa77c9 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/trigmux/cy_trigmux.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_trigmux.h @@ -132,7 +132,7 @@ #define CY_TRIGMUX_H #include "cy_device_headers.h" -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #ifndef CY_IP_MXPERI_TR #error "The TRIGMUX driver is not supported on this device" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/wdt/cy_wdt.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_wdt.h similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/wdt/cy_wdt.h rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_wdt.h diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/TOOLCHAIN_ARM_STD/cy_syslib_mdk.S b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/TOOLCHAIN_ARM_STD/cy_syslib_mdk.S similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/TOOLCHAIN_ARM_STD/cy_syslib_mdk.S rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/TOOLCHAIN_ARM_STD/cy_syslib_mdk.S diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.S b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.S similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.S rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.S diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/TOOLCHAIN_IAR/cy_syslib_iar.S b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/TOOLCHAIN_IAR/cy_syslib_iar.S similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/TOOLCHAIN_IAR/cy_syslib_iar.S rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/TOOLCHAIN_IAR/cy_syslib_iar.S diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctb/cy_ctb.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ctb.c similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctb/cy_ctb.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ctb.c index ba0d725b21..f00bd85e85 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctb/cy_ctb.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ctb.c @@ -11,7 +11,7 @@ * SPDX-License-Identifier: Apache-2.0 *******************************************************************************/ -#include "ctb/cy_ctb.h" +#include "cy_ctb.h" #if defined(__cplusplus) extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctdac/cy_ctdac.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ctdac.c similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctdac/cy_ctdac.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ctdac.c index 7ec4d5838d..8c3bd40081 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ctdac/cy_ctdac.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ctdac.c @@ -10,7 +10,7 @@ * SPDX-License-Identifier: Apache-2.0 *******************************************************************************/ -#include "ctdac/cy_ctdac.h" +#include "cy_ctdac.h" #if defined(__cplusplus) extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/dma/cy_dma.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_dma.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/dma/cy_dma.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_dma.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/efuse/cy_efuse.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_efuse.c similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/efuse/cy_efuse.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_efuse.c index 0892255e78..62c70e9d43 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/efuse/cy_efuse.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_efuse.c @@ -12,7 +12,7 @@ *******************************************************************************/ #include "cy_efuse.h" -#include "ipc/cy_ipc_drv.h" +#include "cy_ipc_drv.h" /** \cond INTERNAL */ #define CY_EFUSE_OPCODE_SUCCESS (0xA0000000UL) /**< The command completed with no errors */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/flash/cy_flash.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_flash.c similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/flash/cy_flash.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_flash.c index 84434d6ded..bb1c34f23a 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/flash/cy_flash.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_flash.c @@ -10,12 +10,12 @@ * Copyright 2016-2018, Cypress Semiconductor Corporation. All rights reserved. * SPDX-License-Identifier: Apache-2.0 *******************************************************************************/ -#include "flash/cy_flash.h" -#include "sysclk/cy_sysclk.h" -#include "sysint/cy_sysint.h" -#include "ipc/cy_ipc_drv.h" -#include "ipc/cy_ipc_sema.h" -#include "ipc/cy_ipc_pipe.h" +#include "cy_flash.h" +#include "cy_sysclk.h" +#include "cy_sysint.h" +#include "cy_ipc_drv.h" +#include "cy_ipc_sema.h" +#include "cy_ipc_pipe.h" /*************************************** * Data Structure definitions diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/gpio/cy_gpio.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_gpio.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/gpio/cy_gpio.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_gpio.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/i2s/cy_i2s.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_i2s.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/i2s/cy_i2s.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_i2s.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_drv.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ipc_drv.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_drv.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ipc_drv.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_pipe.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ipc_pipe.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_pipe.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ipc_pipe.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_sema.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ipc_sema.c similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_sema.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ipc_sema.c index 1154997e23..2ac1e2ef0f 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/ipc/cy_ipc_sema.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_ipc_sema.c @@ -12,9 +12,9 @@ * SPDX-License-Identifier: Apache-2.0 *******************************************************************************/ -#include "ipc/cy_ipc_drv.h" -#include "ipc/cy_ipc_sema.h" -#include "syslib/cy_syslib.h" +#include "cy_ipc_drv.h" +#include "cy_ipc_sema.h" +#include "cy_syslib.h" #include /* The memset() definition */ /* Defines a mask to Check if semaphore count is a multiple of 32 */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lpcomp/cy_lpcomp.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_lpcomp.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lpcomp/cy_lpcomp.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_lpcomp.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lvd/cy_lvd.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_lvd.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/lvd/cy_lvd.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_lvd.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/mcwdt/cy_mcwdt.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_mcwdt.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/mcwdt/cy_mcwdt.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_mcwdt.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/pdm_pcm/cy_pdm_pcm.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_pdm_pcm.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/pdm_pcm/cy_pdm_pcm.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_pdm_pcm.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/profile/cy_profile.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_profile.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/profile/cy_profile.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_profile.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/prot/cy_prot.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_prot.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/prot/cy_prot.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_prot.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/rtc/cy_rtc.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_rtc.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/rtc/cy_rtc.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_rtc.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sar/cy_sar.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_sar.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sar/cy_sar.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_sar.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_common.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_common.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_common.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_common.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_ezi2c.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_ezi2c.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_ezi2c.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_ezi2c.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_i2c.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_i2c.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_i2c.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_i2c.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_spi.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_spi.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_spi.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_spi.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_uart.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_uart.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/scb/cy_scb_uart.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_scb_uart.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_smif.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_smif.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif_memslot.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_smif_memslot.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/smif/cy_smif_memslot.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_smif_memslot.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysanalog/cy_sysanalog.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_sysanalog.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysanalog/cy_sysanalog.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_sysanalog.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysclk/cy_sysclk.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_sysclk.c similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysclk/cy_sysclk.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_sysclk.c index 59495b8a50..48cb68f467 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysclk/cy_sysclk.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_sysclk.c @@ -12,7 +12,7 @@ #include "cy_sysclk.h" -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #include #include diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysint/cy_sysint.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_sysint.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/sysint/cy_sysint.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_sysint.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/cy_syslib.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_syslib.c similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/cy_syslib.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_syslib.c index 8250f02b0b..7e9872e452 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syslib/cy_syslib.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_syslib.c @@ -12,7 +12,7 @@ *******************************************************************************/ #include "cy_syslib.h" -#include "ipc/cy_ipc_drv.h" +#include "cy_ipc_drv.h" #if !defined(NDEBUG) #include #endif /* NDEBUG */ @@ -47,7 +47,7 @@ CY_NOINIT cy_stc_fault_frame_t cy_faultFrame; #endif /* (CY_ARM_FAULT_DEBUG == CY_ARM_FAULT_DEBUG_ENABLED) */ -#if defined(__ARMCC_VERSION) +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 6000000) static __ASM void Cy_SysLib_AsmInfiniteLoop(void) { b . }; #endif /* (__ARMCC_VERSION) */ @@ -500,7 +500,7 @@ void Cy_SysLib_FaultHandler(uint32_t const *faultStackAddr) *******************************************************************************/ __WEAK void Cy_SysLib_ProcessingFault(void) { - #if defined(__ARMCC_VERSION) + #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 6000000) /* Assembly implementation of an infinite loop * is used for the armcc compiler to preserve the call stack. * Otherwise, the compiler destroys the call stack, diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syspm/cy_syspm.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_syspm.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/syspm/cy_syspm.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_syspm.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/systick/cy_systick.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_systick.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/systick/cy_systick.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_systick.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_counter.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_tcpwm_counter.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_counter.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_tcpwm_counter.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_pwm.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_tcpwm_pwm.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_pwm.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_tcpwm_pwm.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_quaddec.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_tcpwm_quaddec.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/tcpwm/cy_tcpwm_quaddec.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_tcpwm_quaddec.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/trigmux/cy_trigmux.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_trigmux.c similarity index 100% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/trigmux/cy_trigmux.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_trigmux.c diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/wdt/cy_wdt.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_wdt.c similarity index 99% rename from targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/wdt/cy_wdt.c rename to targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_wdt.c index 637868a418..35f235f418 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/peripheral/wdt/cy_wdt.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/source/cy_wdt.c @@ -11,7 +11,7 @@ *******************************************************************************/ #include "cy_wdt.h" -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #if defined(__cplusplus) extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/flash_api.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/flash_api.c index b76ca6c447..f4726dbbba 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/flash_api.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/flash_api.c @@ -16,7 +16,8 @@ #include "device.h" #include "flash_api.h" -#include "drivers/peripheral/flash/cy_flash.h" +#include "cy_flash.h" +#include #if DEVICE_FLASH diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/gpio_object.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/gpio_object.h index 2fd677f247..c4027c75f2 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/gpio_object.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/gpio_object.h @@ -22,7 +22,7 @@ #include "PinNamesTypes.h" #include "PinNames.h" -#include "drivers/peripheral/gpio/cy_gpio.h" +#include "cy_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/i2c_api.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/i2c_api.c index 0080366048..d3ef55c693 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/i2c_api.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/i2c_api.c @@ -23,10 +23,10 @@ #include "i2c_api.h" #include "psoc6_utils.h" -#include "drivers/peripheral/sysclk/cy_sysclk.h" -#include "drivers/peripheral/gpio/cy_gpio.h" -#include "drivers/peripheral/scb/cy_scb_i2c.h" -#include "drivers/peripheral/sysint/cy_sysint.h" +#include "cy_sysclk.h" +#include "cy_gpio.h" +#include "cy_scb_i2c.h" +#include "cy_sysint.h" #define I2C_DEFAULT_SPEED 100000 #define NUM_I2C_PORTS 8 diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/ipcpipe_transport.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/ipcpipe_transport.c index 14d9234895..d5d3dd07ee 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/ipcpipe_transport.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/ipcpipe_transport.c @@ -17,8 +17,7 @@ #include "ipcpipe_transport.h" #include "cy_ipc_config.h" -#include "ipc/cy_ipc_pipe.h" -//#include "syspm/cy_syspm.h" +#include "cy_ipc_pipe.h" #ifdef __cplusplus extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/lp_ticker.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/lp_ticker.c index 7e4e14d751..4dac0b86c1 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/lp_ticker.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/lp_ticker.c @@ -19,8 +19,8 @@ #include "device.h" #include "mbed_error.h" #include "lp_ticker_api.h" -#include "device/drivers/peripheral/mcwdt/cy_mcwdt.h" -#include "device/drivers/peripheral/sysint/cy_sysint.h" +#include "cy_mcwdt.h" +#include "cy_sysint.h" #include "psoc6_utils.h" #if DEVICE_LPTICKER diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/objects.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/objects.h index d7d88e26f8..43daa3e7a9 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/objects.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/objects.h @@ -25,8 +25,8 @@ #include "gpio_irq_api.h" #include "gpio_object.h" -#include "drivers/peripheral/sysclk/cy_sysclk.h" -#include "drivers/peripheral/syspm/cy_syspm.h" +#include "cy_sysclk.h" +#include "cy_syspm.h" #ifdef __cplusplus extern "C" { diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/psoc6_utils.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/psoc6_utils.c index 27efaa03bd..2dce63094b 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/psoc6_utils.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/psoc6_utils.c @@ -30,7 +30,7 @@ * a global static variable for interrupt status saving. */ -#include "syslib/cy_syslib.h" +#include "cy_syslib.h" #define error(arg) CY_ASSERT(0) #define MBED_ASSERT CY_ASSERT diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/psoc6_utils.h b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/psoc6_utils.h index 78d5a977e7..c408d85f42 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/psoc6_utils.h +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/psoc6_utils.h @@ -22,8 +22,8 @@ #include #include -#include "drivers/peripheral/gpio/cy_gpio.h" -#include "drivers/peripheral/sysclk/cy_sysclk.h" +#include "cy_gpio.h" +#include "cy_sysclk.h" #else diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/serial_api.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/serial_api.c index acbf957c07..8cfb4b6873 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/serial_api.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/serial_api.c @@ -27,10 +27,10 @@ #include "serial_api.h" #include "psoc6_utils.h" -#include "drivers/peripheral/sysclk/cy_sysclk.h" -#include "drivers/peripheral/gpio/cy_gpio.h" -#include "drivers/peripheral/scb/cy_scb_uart.h" -#include "drivers/peripheral/sysint/cy_sysint.h" +#include "cy_sysclk.h" +#include "cy_gpio.h" +#include "cy_scb_uart.h" +#include "cy_sysint.h" #define UART_OVERSAMPLE 12 #define UART_DEFAULT_BAUDRATE 115200 diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/spi_api.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/spi_api.c index a21413d61e..f0a94bc74b 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/spi_api.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/spi_api.c @@ -24,10 +24,10 @@ #include "spi_api.h" #include "psoc6_utils.h" -#include "drivers/peripheral/sysclk/cy_sysclk.h" -#include "drivers/peripheral/gpio/cy_gpio.h" -#include "drivers/peripheral/scb/cy_scb_spi.h" -#include "drivers/peripheral/sysint/cy_sysint.h" +#include "cy_sysclk.h" +#include "cy_gpio.h" +#include "cy_scb_spi.h" +#include "cy_sysint.h" #define SPI_DEFAULT_SPEED 100000 #define NUM_SPI_PORTS 8 diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/us_ticker.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/us_ticker.c index a4f79b4e48..2d036d85af 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/us_ticker.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/us_ticker.c @@ -23,10 +23,10 @@ #include "mbed_error.h" #include "psoc6_utils.h" -#include "drivers/peripheral/sysint/cy_sysint.h" -#include "drivers/peripheral/sysclk/cy_sysclk.h" -#include "drivers/peripheral/tcpwm/cy_tcpwm_counter.h" -#include "drivers/peripheral/syspm/cy_syspm.h" +#include "cy_sysint.h" +#include "cy_sysclk.h" +#include "cy_tcpwm_counter.h" +#include "cy_syspm.h" /** Each CPU core in PSoC6 needs its own usec timer. ** Although each of TCPWM timers have two compare registers, diff --git a/targets/targets.json b/targets/targets.json index 790ce905ff..bb9ba49618 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -8330,6 +8330,7 @@ }, "FUTURE_SEQUANA_M0": { "inherits": ["MCU_PSOC6_M0"], + "supported_toolchains": ["GCC_ARM", "ARM", "IAR"], "supported_form_factors": ["ARDUINO"], "extra_labels_add": ["PSOC6_FUTURE", "CY8C63XX", "FUTURE_SEQUANA"], "extra_labels_remove": ["PSOC6"], @@ -8359,6 +8360,7 @@ }, "FUTURE_SEQUANA": { "inherits": ["MCU_PSOC6_M4"], + "supported_toolchains": ["GCC_ARM", "ARM", "IAR"], "supported_form_factors": ["ARDUINO"], "extra_labels_add": ["PSOC6_FUTURE", "CY8C63XX", "CORDIO"], "extra_labels_remove": ["PSOC6"],