VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
source
utilities
compiler
rv
rv_compiler.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright(C)2009-2022 by VSF Team *
3
* *
4
* Licensed under the Apache License, Version 2.0 (the "License"); *
5
* you may not use this file except in compliance with the License. *
6
* You may obtain a copy of the License at *
7
* *
8
* http://www.apache.org/licenses/LICENSE-2.0 *
9
* *
10
* Unless required by applicable law or agreed to in writing, software *
11
* distributed under the License is distributed on an "AS IS" BASIS, *
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13
* See the License for the specific language governing permissions and *
14
* limitations under the License. *
15
* *
16
****************************************************************************/
17
18
#ifndef __USE_RV_COMPILER_H_PART_1__
19
#define __USE_RV_COMPILER_H_PART_1__
20
21
/*============================ INCLUDES ======================================*/
22
23
#include "
./rv_compiler_detect.h
"
24
25
#endif
/* end of __USE_RV_COMPILER_H_PART_1__ */
26
27
/*========================== Multiple-Entry Start ============================*/
28
29
#if __IS_COMPILER_IAR__
30
# include <intrinsics.h>
31
#endif
32
33
#ifndef __VSF_HEADER_ONLY_SHOW_COMPILER_INFO__
34
# include "
./type.h
"
35
#endif
36
#include "../__common/__compiler.h"
37
38
/*========================== Multiple-Entry End ==============================*/
39
40
#ifndef __USE_RV_COMPILER_H_PART_2__
41
#define __USE_RV_COMPILER_H_PART_2__
42
43
#ifdef __cplusplus
44
extern
"C"
{
45
#endif
46
47
/* ----------------- Start of section using anonymous unions -------------- */
48
#if __IS_COMPILER_IAR__
49
#pragma language=extended
50
#elif __IS_COMPILER_GCC__
51
/* anonymous unions are enabled by default */
52
#else
53
#warning Not supported compiler type
54
#endif
55
56
/*============================ MACROS ========================================*/
57
59
#ifndef NOP
60
#define NOP() __asm__ __volatile__ ("nop");
61
#endif
62
63
65
#if __IS_COMPILER_IAR__
66
# define VSF_CAL_NO_INIT __no_init
67
# define VSF_CAL_NO_RETURN __attribute__((noreturn))
68
# define VSF_CAL_ROOT __root
69
# define VSF_CAL_INLINE inline
70
# define VSF_CAL_NO_INLINE __attribute__((noinline))
71
# define VSF_CAL_ALWAYS_INLINE inline __attribute__((always_inline))
72
# define VSF_CAL_WEAK(...) __weak
73
# define VSF_CAL_RAMFUNC __ramfunc
74
# define __asm__ __asm
75
# define __VSF_CAL_ALIGN(__N) __attribute__((aligned (__N)))
76
# define __VSF_CAL_AT_ADDR(__ADDR) @ __ADDR
77
# define __VSF_CAL_SECTION(__SEC) __attribute__((section (__SEC)))
78
# define __VSF_CAL_WEAK_ALIAS(__ORIGIN, __ALIAS) \
79
_Pragma(__VSF_STR(weak __ORIGIN=__ALIAS))
80
# define VSF_CAL_PACKED __attribute__((packed))
81
# define VSF_CAL_UNALIGNED __attribute__((packed))
82
# define VSF_CAL_TRANSPARENT_UNION __attribute__((transparent_union))
83
# define __VSF_CAL_ALIGN_OF(...) __ALIGNOF__(__VA_ARGS__)
84
85
# define __IAR_STARTUP_DATA_INIT __iar_data_init3
86
87
# define __VSF_CAL_ISR(__VEC) void __VEC(void)
88
89
#endif
90
91
/*============================ TYPES =========================================*/
92
/*============================ PROTOTYPES ====================================*/
93
94
extern
void
vsf_stdio_init
(
void
);
95
96
#ifdef __cplusplus
97
}
98
#endif
99
100
#endif
/* end of __USE_RV_COMPILER_H_PART_2__ */
vsf_stdio_init
void vsf_stdio_init(void)
none standard memory types
rv_compiler_detect.h
type.h
Generated by
1.9.8