mirror of https://github.com/ARMmbed/mbed-os.git
FUTURE_SEQUANA: Fixed ARMC6 compiler errors and warnings
parent
270f368bbd
commit
48d12c39e5
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "device.h"
|
||||
#include "flash_api.h"
|
||||
#include "cy_flash.h"
|
||||
#include <string.h>
|
||||
|
||||
#if DEVICE_FLASH
|
||||
|
||||
|
|
Loading…
Reference in New Issue