初始提交
This commit is contained in:
55
inc/compiler/gcc/cpl_types.h
Normal file
55
inc/compiler/gcc/cpl_types.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/****************************************************************************
|
||||
|
||||
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
||||
|
||||
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
||||
be copied by any method or incorporated into another program without
|
||||
the express written consent of Aerospace C.Power. This Information or any portion
|
||||
thereof remains the property of Aerospace C.Power. The Information contained herein
|
||||
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
||||
liability for its use in any way and conveys no license or title under
|
||||
any patent or copyright and makes no representation or warranty that this
|
||||
Information is free from patent or copyright infringement.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CPL_TYPES_H
|
||||
#define CPL_TYPES_H
|
||||
|
||||
/* export includes */
|
||||
#include "cpl_types_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void cpl_utils_init();
|
||||
|
||||
#undef snprintf
|
||||
#define snprintf iot_snprintf
|
||||
|
||||
#undef strlen
|
||||
#define strlen iot_strlen
|
||||
|
||||
#ifdef IRAM_SECTION_DISABLE
|
||||
#define IRAM_ATTR
|
||||
#else
|
||||
#define IRAM_ATTR __attribute__((section(".iram")))
|
||||
#endif
|
||||
|
||||
/* Note: enable this macro define when code run in flash for cco */
|
||||
#if PLC_SUPPORT_CCO_ROLE && (RUN_IN_PSRAM == 0)
|
||||
#define IRAM_ATTR_CCO IRAM_ATTR
|
||||
#else
|
||||
#define IRAM_ATTR_CCO
|
||||
#endif
|
||||
|
||||
/* put this define at the funtion entry to get the function caller. */
|
||||
#define RISC_GET_REG_RA(reg_ra) __asm volatile("mv %0, ra":"=r"(reg_ra))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CPL_TYPES_H */
|
||||
|
34
inc/compiler/msvc/cpl_types.h
Normal file
34
inc/compiler/msvc/cpl_types.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/****************************************************************************
|
||||
|
||||
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
||||
|
||||
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
||||
be copied by any method or incorporated into another program without
|
||||
the express written consent of Aerospace C.Power. This Information or any portion
|
||||
thereof remains the property of Aerospace C.Power. The Information contained herein
|
||||
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
||||
liability for its use in any way and conveys no license or title under
|
||||
any patent or copyright and makes no representation or warranty that this
|
||||
Information is free from patent or copyright infringement.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CPL_TYPES_H
|
||||
#define CPL_TYPES_H
|
||||
|
||||
/* export includes */
|
||||
#include "cpl_types_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RISC_GET_REG_RA(reg_ra) (reg_ra = 0)
|
||||
|
||||
void cpl_utils_init();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CPL_TYPES_H */
|
Reference in New Issue
Block a user