EFR32 Blue Gecko 1 Software Documentation  efr32bg1-doc-5.1.2
em_ramfunc.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef EM_RAMFUNC_H
34 #define EM_RAMFUNC_H
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /***************************************************************************/
93  /*******************************************************************************
94  ****************************** DEFINES ***********************************
95  ******************************************************************************/
96 
106 #if defined(DOXY_DOC_ONLY)
107 #define SL_RAMFUNC_DISABLE
108 #endif
109 
110 #if defined(SL_RAMFUNC_DISABLE)
111 
112 #define SL_RAMFUNC_DECLARATOR
113 
115 #define SL_RAMFUNC_DEFINITION_BEGIN
116 
118 #define SL_RAMFUNC_DEFINITION_END
119 
120 #elif defined(__CC_ARM)
121 /* MDK-ARM compiler */
122 #define SL_RAMFUNC_DECLARATOR
123 #define SL_RAMFUNC_DEFINITION_BEGIN _Pragma("arm section code=\"ram_code\"")
124 #define SL_RAMFUNC_DEFINITION_END _Pragma("arm section code")
125 
126 #elif defined(__ICCARM__)
127 /* IAR Embedded Workbench */
128 #define SL_RAMFUNC_DECLARATOR __ramfunc
129 #define SL_RAMFUNC_DEFINITION_BEGIN SL_RAMFUNC_DECLARATOR
130 #define SL_RAMFUNC_DEFINITION_END
131 
132 #elif defined(__GNUC__) && defined(__CROSSWORKS_ARM)
133 /* Rowley Crossworks */
134 #define SL_RAMFUNC_DECLARATOR __attribute__ ((section(".fast")))
135 #define SL_RAMFUNC_DEFINITION_BEGIN SL_RAMFUNC_DECLARATOR
136 #define SL_RAMFUNC_DEFINITION_END
137 
138 #elif defined(__GNUC__)
139 /* Simplicity Studio, Atollic and vanilla armgcc */
140 #define SL_RAMFUNC_DECLARATOR __attribute__ ((section(".ram")))
141 #define SL_RAMFUNC_DEFINITION_BEGIN SL_RAMFUNC_DECLARATOR
142 #define SL_RAMFUNC_DEFINITION_END
143 
144 #endif
145 
147 /* Deprecated macro names and user config */
148 #if defined(RAMFUNC_DISABLE)
149 #define SL_RAMFUNC_DISABLE
150 #endif
151 
152 #define RAMFUNC_DECLARATOR SL_RAMFUNC_DECLARATOR
153 #define RAMFUNC_DEFINITION_BEGIN SL_RAMFUNC_DEFINITION_BEGIN
154 #define RAMFUNC_DEFINITION_END SL_RAMFUNC_DEFINITION_END
155 
160 #ifdef __cplusplus
161 }
162 #endif
163 
164 #endif /* EM_RAMFUNC_H */