Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

FUTURE_SEQUANA: Add suport for ARMC6 #10346

Merged
merged 3 commits into from Apr 9, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -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
}
}
@@ -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"
@@ -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 */
@@ -132,17 +132,23 @@ 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
{
* (.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.
@@ -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 <stdarg.h>
#include "platform/SingletonPtr.h"

@@ -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 */
@@ -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"

@@ -17,18 +17,18 @@

#include <string.h>
#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"

@@ -300,8 +300,8 @@
#include <stdbool.h>
#include <stddef.h>
#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"
@@ -338,9 +338,9 @@
#include <stdbool.h>
#include <stddef.h>
#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;
}

/*******************************************************************************
@@ -150,7 +150,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include "syslib/cy_syslib.h"
#include "cy_syslib.h"
#include "cy_device_headers.h"

#ifndef CY_IP_M4CPUSS_DMA
@@ -109,7 +109,7 @@
*/

#include "cy_device_headers.h"
#include "syslib/cy_syslib.h"
#include "cy_syslib.h"

/***************************************
* Macro Definitions
@@ -296,7 +296,7 @@
*/

#include <cy_device_headers.h>
#include "syslib/cy_syslib.h"
#include "cy_syslib.h"

#if defined(__cplusplus)
extern "C" {
@@ -120,7 +120,7 @@
#define CY_GPIO_H

#include <stddef.h>
#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;
}


@@ -142,8 +142,8 @@

#include <stddef.h>
#include <stdbool.h>
#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"
@@ -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 <stddef.h>
@@ -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;

This comment has been minimized.

Copy link
@orenc17

orenc17 Apr 8, 2019

Contributor

i think you should add volatile so the compiler wont optimize that out

This comment has been minimized.

Copy link
@lrusinowicz

lrusinowicz Apr 8, 2019

Author Contributor

I was thinking about it, but the ARM clang reference manual states (section 7.12 Qualifiers):

Value computation of an lvalue expression with a volatile qualified type constitutes an access to the corresponding object, even when the value is discarded.

So I think it's ok, as it's hw register (data field), that is declared volatile. Variable unused could be skipped.
Same holds true for GCC.


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 */
@@ -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)
@@ -150,8 +150,8 @@
#include <stdbool.h>
#include <stddef.h>
#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"
@@ -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" {
@@ -121,7 +121,7 @@ extern "C" {
#include <stdbool.h>
#include <stddef.h>
#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"
@@ -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 <stddef.h>
#include <stdbool.h>

@@ -178,7 +178,7 @@
#define CY_PROFILE_H

#include "cy_device_headers.h"
#include "syslib/cy_syslib.h"
#include "cy_syslib.h"
#include <stddef.h>

#ifndef CY_IP_MXPROFILE
@@ -380,7 +380,7 @@

#include <stdbool.h>
#include <stddef.h>
#include "syslib/cy_syslib.h"
#include "cy_syslib.h"
#include "cy_device_headers.h"

#if defined(__cplusplus)
@@ -280,8 +280,8 @@
#include <stddef.h>
#include <stdbool.h>
#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"
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.