1 | /*
|
---|
2 | * TOPPERS ATK2
|
---|
3 | * Toyohashi Open Platform for Embedded Real-Time Systems
|
---|
4 | * Automotive Kernel Version 2
|
---|
5 | *
|
---|
6 | * Copyright (C) 2011-2015 by Center for Embedded Computing Systems
|
---|
7 | * Graduate School of Information Science, Nagoya Univ., JAPAN
|
---|
8 | * Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
|
---|
9 | * Copyright (C) 2011-2013 by Spansion LLC, USA
|
---|
10 | * Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
|
---|
11 | * Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
|
---|
12 | * Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
|
---|
13 | * Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
|
---|
14 | * Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
|
---|
15 | * Copyright (C) 2011-2015 by Witz Corporation
|
---|
16 | * Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
|
---|
17 | * Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
|
---|
18 | * Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
|
---|
19 | * Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
|
---|
20 | *
|
---|
21 | * ä¸è¨èä½æ¨©è
|
---|
22 | ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
|
---|
23 | * ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹
|
---|
24 | * å¤ã»åé
|
---|
25 | å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
26 | * (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
27 | * 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
28 | * ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
29 | * (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
30 | * ç¨ã§ããå½¢ã§åé
|
---|
31 | å¸ããå ´åã«ã¯ï¼åé
|
---|
32 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
33 | * è
|
---|
34 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
35 | * ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
36 | * (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
37 | * ç¨ã§ããªãå½¢ã§åé
|
---|
38 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
|
---|
39 | * ã¨ï¼
|
---|
40 | * (a) åé
|
---|
41 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
42 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
43 | * ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
44 | * (b) åé
|
---|
45 | å¸ã®å½¢æ
|
---|
46 | ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSããã¸ã§ã¯ãã«
|
---|
47 | * å ±åãããã¨ï¼
|
---|
48 | * (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
49 | * 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
50 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
51 | 責ãããã¨ï¼
|
---|
52 | * ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
|
---|
53 | * ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
|
---|
54 | ããã³TOPPERSããã¸ã§ã¯ãã
|
---|
55 | * å
|
---|
56 | 責ãããã¨ï¼
|
---|
57 | *
|
---|
58 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
|
---|
59 | * æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥ç財ç£æ¨©ã許諾ãããã®ã§
|
---|
60 | * ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
|
---|
61 | * ç¨ããè
|
---|
62 | ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
|
---|
63 | *
|
---|
64 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
65 | ã
|
---|
66 | * ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
|
---|
67 | * ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
|
---|
68 | * ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ã
|
---|
69 | * ã®è²¬ä»»ãè² ããªãï¼
|
---|
70 | *
|
---|
71 | * $Id: Os.h 500 2015-12-23 07:10:02Z ertl-ishikawa $
|
---|
72 | */
|
---|
73 |
|
---|
74 | /*
|
---|
75 | * ATK2 OSããããã¡ã¤ã«
|
---|
76 | *
|
---|
77 | * ATK2ããµãã¼ãããã·ã¹ãã ãµã¼ãã¹ã®å®£è¨ã¨ï¼å¿
|
---|
78 | è¦ãªãã¼
|
---|
79 | * ã¿åï¼å®æ°ï¼ãã¯ãã®å®ç¾©ãå«ãããããã¡ã¤ã«
|
---|
80 | *
|
---|
81 | * ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
|
---|
82 | * ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ãã
|
---|
83 | * ããã«ããï¼ãã¯ãå®ç¾©ä»¥å¤ãé¤ãããã«ãªã£ã¦ãã
|
---|
84 | *
|
---|
85 | * ãã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããåã«ã¤ã³ã¯ã«ã¼ããã¦ããã¹ããã¡ã¤ã«
|
---|
86 | * ã¯ãªã
|
---|
87 | */
|
---|
88 |
|
---|
89 | #ifndef TOPPERS_OS_H
|
---|
90 | #define TOPPERS_OS_H
|
---|
91 |
|
---|
92 | #ifdef TOPPERS_TRUSTED
|
---|
93 | #define TOPPERS_SVC_FUNCCALL
|
---|
94 | #endif
|
---|
95 |
|
---|
96 | #if defined(TOPPERS_TRUSTED) && defined(TOPPERS_NON_TRUSTED)
|
---|
97 | #error "both TOPPERS_TRUSTED and TOPPERS_NON_TRUSTED are defined!"
|
---|
98 | #endif
|
---|
99 |
|
---|
100 | /*
|
---|
101 | * å
|
---|
102 | ±éã®ãã¼ã¿åã»å®æ°ã»ãã¯ã
|
---|
103 | */
|
---|
104 | #include "Std_Types.h"
|
---|
105 | #include "MemMap.h"
|
---|
106 | #include "Rte_Os_Type.h"
|
---|
107 |
|
---|
108 | #if !defined(TOPPERS_CFG1_OUT) && !defined(OMIT_INCLUDE_OS_CFG)
|
---|
109 | #include "Os_Cfg.h"
|
---|
110 | #endif
|
---|
111 |
|
---|
112 | /*
|
---|
113 | * ã¿ã¼ã²ããä¾åé¨
|
---|
114 | */
|
---|
115 | #include "target_kernel.h"
|
---|
116 |
|
---|
117 | #ifndef TOPPERS_MACRO_ONLY
|
---|
118 |
|
---|
119 | /*
|
---|
120 | * ãã¼ã¿åã®å®ç¾©
|
---|
121 | */
|
---|
122 |
|
---|
123 | /*
|
---|
124 | * ãªãã¸ã§ã¯ãçªå·ã®åå®ç¾©
|
---|
125 | */
|
---|
126 | typedef uint8 TaskStateType; /* ã¿ã¹ã¯ç¶æ
|
---|
127 | */
|
---|
128 | typedef uint32 EventMaskType; /* ã¤ãã³ããã¹ã¯ */
|
---|
129 | typedef uint32 TickType; /* ã«ã¦ã³ã¿å¤ï¼ãã£ãã¯ï¼*/
|
---|
130 | typedef uint32 AppModeType; /* ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ã */
|
---|
131 | typedef uint8 OSServiceIdType; /* ã·ã¹ãã ãµã¼ãã¹ID */
|
---|
132 | typedef uint8 ScheduleTableStatusType; /* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¶æ
|
---|
133 | */
|
---|
134 | typedef uint8 ProtectionReturnType; /* ãããã¯ã·ã§ã³ããã¯ããã®è¿ãå¤ */
|
---|
135 | typedef uintptr MemorySizeType; /* ã¡ã¢ãªé åãµã¤ãº */
|
---|
136 | typedef uint8 ApplicationType; /* OSã¢ããªã±ã¼ã·ã§ã³ID */
|
---|
137 | typedef uint8 ObjectTypeType; /* OSãªãã¸ã§ã¯ãç¨®å¥ */
|
---|
138 | typedef uint8 ApplicationStateType; /* OSã¢ããªã±ã¼ã·ã§ã³ç¶æ
|
---|
139 | */
|
---|
140 | typedef uint8 AccessType; /* ã¡ã¢ãªé åã¢ã¯ã»ã¹æ¨© */
|
---|
141 | typedef boolean ObjectAccessType; /* OSãªãã¸ã§ã¯ãã¢ã¯ã»ã¹æ¨© */
|
---|
142 | typedef uint8 RestartType; /* OSAPãªã¹ã¿ã¼ãå±æ§ */
|
---|
143 |
|
---|
144 | typedef struct {
|
---|
145 | TickType maxallowedvalue; /* ã«ã¦ã³ã¿æå®ã®æå¤§å¤ */
|
---|
146 | TickType ticksperbase; /* OSã§ã¯ä½¿ç¨ããï¼ã¦ã¼ã¶ãèªç±ã«ä½¿ç¨ããå¤ */
|
---|
147 | TickType mincycle; /* ãµã¤ã¯ã«æå®ã®æå°å¤ */
|
---|
148 | } AlarmBaseType;
|
---|
149 |
|
---|
150 | /*
|
---|
151 | * æé©åããããï¼ä¾åé¨åå®ç¾©ã§ããå
|
---|
152 | */
|
---|
153 | #ifndef OMIT_DATA_TYPE
|
---|
154 | typedef uint32 TimeType; /* æé */
|
---|
155 | typedef uint32 AlarmType; /* ã¢ã©ã¼ã ID */
|
---|
156 | typedef uint32 ResourceType; /* ãªã½ã¼ã¹ID */
|
---|
157 | typedef uint32 TaskType; /* ã¿ã¹ã¯ID */
|
---|
158 | typedef uint32 ISRType; /* ISR ID */
|
---|
159 | typedef uint32 CounterType; /* ã«ã¦ã³ã¿ID */
|
---|
160 | typedef uint32 ScheduleTableType; /* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ID */
|
---|
161 | typedef float32 PhysicalTimeType; /* ï¼ãã£ãã¯ããæéã«æç®ç¨ï¼æé */
|
---|
162 | typedef uint32 IocType; /* IOC ID */
|
---|
163 | typedef uint8 SenderIdType; /* Sender ID */
|
---|
164 | typedef uint32 TrustedFunctionIndexType; /* Trusted Function Index */
|
---|
165 | #endif /* OMIT_DATA_TYPE */
|
---|
166 |
|
---|
167 | typedef AlarmBaseType * AlarmBaseRefType;
|
---|
168 | typedef TaskType * TaskRefType;
|
---|
169 | typedef TaskStateType * TaskStateRefType;
|
---|
170 | typedef EventMaskType * EventMaskRefType;
|
---|
171 | typedef TickType * TickRefType;
|
---|
172 | typedef ScheduleTableStatusType * ScheduleTableStatusRefType;
|
---|
173 | typedef ApplicationStateType * ApplicationStateRefType;
|
---|
174 | typedef void * MemoryStartAddressType; /* ã¡ã¢ãªé åå
|
---|
175 | é */
|
---|
176 | typedef void * TrustedFunctionParameterRefType; /* Trusted Function Parameter */
|
---|
177 |
|
---|
178 | /*
|
---|
179 | * ä¿è·éåãèµ·ãããå¦çåä½ã®å
|
---|
180 | */
|
---|
181 | typedef uint8 FaultyContextType;
|
---|
182 |
|
---|
183 | /*
|
---|
184 | * OSãªãã¸ã§ã¯ã宣è¨ç¨ã®ãã¯ã
|
---|
185 | */
|
---|
186 | #define DeclareTask(TaskIdentifier)
|
---|
187 | #define DeclareResource(ResourceIdentifier)
|
---|
188 | #define DeclareEvent(EventIdentifier)
|
---|
189 | #define DeclareAlarm(AlarmIdentifier)
|
---|
190 |
|
---|
191 | /*
|
---|
192 | * ã¡ã¤ã³ã«ã¼ãã³å®ç¾©ç¨ã®ãã¯ã
|
---|
193 | */
|
---|
194 | #define TASK(TaskName) void TaskMain ## TaskName(void)
|
---|
195 | #define ISR(ISRName) void ISRMain ## ISRName(void)
|
---|
196 | #ifndef C1ISR
|
---|
197 | #define C1ISR(ISRName) void C1ISRMain ## ISRName(void)
|
---|
198 | #endif /* C1ISR */
|
---|
199 |
|
---|
200 | #define TRUSTEDFUNCTION(TrustedFunctionName, FunctionIndex, FunctionParams) \
|
---|
201 | StatusType TrustedFunctionName( \
|
---|
202 | TrustedFunctionIndexType FunctionIndex, \
|
---|
203 | TrustedFunctionParameterRefType FunctionParams \
|
---|
204 | )
|
---|
205 |
|
---|
206 | /*
|
---|
207 | * ã¡ã¢ãªé å確ä¿ã®ããã®åå®ç¾©
|
---|
208 | */
|
---|
209 | #ifndef TOPPERS_STK_T
|
---|
210 | #define TOPPERS_STK_T sintptr
|
---|
211 | #endif /* TOPPERS_STK_T */
|
---|
212 | typedef TOPPERS_STK_T StackType; /* ã¹ã¿ãã¯é åã確ä¿ããããã®å */
|
---|
213 |
|
---|
214 | /*
|
---|
215 | * ã·ã¹ãã ãµã¼ãã¹ãã©ã¡ã¼ã¿åå¾ã®ããã®å®ç¾©
|
---|
216 | */
|
---|
217 | typedef union {
|
---|
218 | TaskType tskid;
|
---|
219 | TaskRefType p_tskid;
|
---|
220 | TaskStateRefType p_stat;
|
---|
221 | ResourceType resid;
|
---|
222 | EventMaskType mask;
|
---|
223 | EventMaskRefType p_mask;
|
---|
224 | AlarmType almid;
|
---|
225 | AlarmBaseRefType p_info;
|
---|
226 | TickRefType p_tick;
|
---|
227 | TickRefType p_val;
|
---|
228 | TickRefType p_eval;
|
---|
229 | TickType incr;
|
---|
230 | TickType cycle;
|
---|
231 | TickType start;
|
---|
232 | AppModeType mode;
|
---|
233 | CounterType cntid;
|
---|
234 | ScheduleTableType schtblid;
|
---|
235 | TickType offset;
|
---|
236 | ScheduleTableType schtblid_from;
|
---|
237 | ScheduleTableType schtblid_to;
|
---|
238 | ScheduleTableStatusRefType p_schtblstate;
|
---|
239 | StatusType error;
|
---|
240 | ISRType isrid;
|
---|
241 | IocType iocid;
|
---|
242 | SenderIdType senderid;
|
---|
243 | TrustedFunctionIndexType tfnid;
|
---|
244 | TrustedFunctionParameterRefType tfnpr;
|
---|
245 | MemoryStartAddressType adr;
|
---|
246 | MemorySizeType sz;
|
---|
247 | ApplicationType applid;
|
---|
248 | ApplicationStateRefType p_appstat;
|
---|
249 | RestartType restartoption;
|
---|
250 | } _ErrorHook_Par;
|
---|
251 |
|
---|
252 |
|
---|
253 | /*
|
---|
254 | * ã¡ã¢ãªé å確ä¿ã®ããã®ãã¯ã
|
---|
255 | *
|
---|
256 | * 以ä¸ã®TOPPERS_COUNT_SZã¨TOPPERS_ROUND_SZã®å®ç¾©ã¯ï¼unitã2ã®å·¾ä¹ã§ã
|
---|
257 | * ããã¨ãä»®å®ãã¦ããï¼
|
---|
258 | */
|
---|
259 | #ifndef TOPPERS_COUNT_SZ
|
---|
260 | #define TOPPERS_COUNT_SZ(sz, unit) ((((sz) + (unit)) - (1U)) / (unit))
|
---|
261 | #endif /* TOPPERS_COUNT_SZ */
|
---|
262 | #ifndef TOPPERS_ROUND_SZ
|
---|
263 | #define TOPPERS_ROUND_SZ(sz, unit) ((((sz) + (unit)) - (1U)) & (~((unit) - (1U))))
|
---|
264 | #endif /* TOPPERS_ROUND_SZ */
|
---|
265 |
|
---|
266 | #define COUNT_STK_T(sz) (TOPPERS_COUNT_SZ((sz), sizeof(StackType)))
|
---|
267 | #define ROUND_STK_T(sz) (TOPPERS_ROUND_SZ((sz), sizeof(StackType)))
|
---|
268 |
|
---|
269 | /*
|
---|
270 | * ããã¯ã«ã¼ãã³
|
---|
271 | */
|
---|
272 | #ifdef CFG_USE_ERRORHOOK
|
---|
273 | extern void ErrorHook(StatusType Error);
|
---|
274 | #endif /* CFG_USE_ERRORHOOK */
|
---|
275 |
|
---|
276 | #ifdef CFG_USE_PRETASKHOOK
|
---|
277 | extern void PreTaskHook(void);
|
---|
278 | #endif /* CFG_USE_PRETASKHOOK */
|
---|
279 |
|
---|
280 | #ifdef CFG_USE_POSTTASKHOOK
|
---|
281 | extern void PostTaskHook(void);
|
---|
282 | #endif /* CFG_USE_POSTTASKHOOK */
|
---|
283 |
|
---|
284 | #ifdef CFG_USE_STARTUPHOOK
|
---|
285 | extern void StartupHook(void);
|
---|
286 | #endif /* CFG_USE_STARTUPHOOK */
|
---|
287 |
|
---|
288 | #ifdef CFG_USE_SHUTDOWNHOOK
|
---|
289 | extern void ShutdownHook(StatusType Error);
|
---|
290 | #endif /* CFG_USE_SHUTDOWNHOOK */
|
---|
291 |
|
---|
292 | #ifdef CFG_USE_PROTECTIONHOOK
|
---|
293 | extern ProtectionReturnType ProtectionHook(StatusType FatalError);
|
---|
294 | #endif /* CFG_USE_PROTECTIONHOOK */
|
---|
295 |
|
---|
296 | /*
|
---|
297 | * ã©ã¤ãã©ãªã§æä¾ããã·ã¹ãã ãµã¼ãã¹
|
---|
298 | */
|
---|
299 | extern ObjectAccessType CheckObjectAccess(ApplicationType ApplID, ObjectTypeType ObjectType, ...);
|
---|
300 | extern ApplicationType CheckObjectOwnership(ObjectTypeType ObjectType, ...);
|
---|
301 |
|
---|
302 | /*
|
---|
303 | * ãã¡ã¤ã«åï¼è¡çªå·ã®åç
|
---|
304 | §ç¨ã®å¤æ°
|
---|
305 | */
|
---|
306 | extern const char8 *fatal_file_name; /* ãã¡ã¤ã«å */
|
---|
307 | extern sint32 fatal_line_num; /* è¡çªå· */
|
---|
308 |
|
---|
309 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
310 |
|
---|
311 | /*
|
---|
312 | * ã·ã¹ãã ãµã¼ãã¹å¼åºãã®ããã®å®ç¾©ã¨å®£è¨
|
---|
313 | */
|
---|
314 | #include "kernel_fncode.h" /* æ©è½ã³ã¼ãã®å®ç¾© */
|
---|
315 | #include "svc_funccall.h" /* é¢æ°å¼åºãã«ããå¼åºã */
|
---|
316 | #include "target_svc.h" /* ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããå¼åºã */
|
---|
317 |
|
---|
318 | #if !defined(TOPPERS_CFG1_OUT) && !defined(OMIT_INCLUDE_OS_CFG) && !defined(OMIT_INCLUDE_OS_LCFG)
|
---|
319 | #include "Os_Lcfg.h"
|
---|
320 | #endif
|
---|
321 |
|
---|
322 | /*
|
---|
323 | * OSã®ã¨ã©ã¼ã³ã¼ã
|
---|
324 | */
|
---|
325 | #define E_OS_ACCESS UINT_C(1)
|
---|
326 | #define E_OS_CALLEVEL UINT_C(2)
|
---|
327 | #define E_OS_ID UINT_C(3)
|
---|
328 | #define E_OS_LIMIT UINT_C(4)
|
---|
329 | #define E_OS_NOFUNC UINT_C(5)
|
---|
330 | #define E_OS_RESOURCE UINT_C(6)
|
---|
331 | #define E_OS_STATE UINT_C(7)
|
---|
332 | #define E_OS_VALUE UINT_C(8)
|
---|
333 | #define E_OS_SERVICEID UINT_C(9)
|
---|
334 | #define E_OS_ILLEGAL_ADDRESS UINT_C(10)
|
---|
335 | #define E_OS_MISSINGEND UINT_C(11)
|
---|
336 | #define E_OS_DISABLEDINT UINT_C(12)
|
---|
337 | #define E_OS_STACKFAULT UINT_C(13)
|
---|
338 | #define E_OS_PROTECTION_MEMORY UINT_C(14)
|
---|
339 | #define E_OS_PROTECTION_TIME_TASK UINT_C(15)
|
---|
340 | #define E_OS_PROTECTION_TIME_ISR UINT_C(16)
|
---|
341 | #define E_OS_PROTECTION_ARRIVAL_TASK UINT_C(17)
|
---|
342 | #define E_OS_PROTECTION_ARRIVAL_ISR UINT_C(18)
|
---|
343 | #define E_OS_PROTECTION_LOCKED_RESOURCE UINT_C(19)
|
---|
344 | #define E_OS_PROTECTION_LOCKED_OSINT UINT_C(20)
|
---|
345 | #define E_OS_PROTECTION_LOCKED_ALLINT UINT_C(21)
|
---|
346 | #define E_OS_PROTECTION_EXCEPTION UINT_C(22)
|
---|
347 | #define E_OS_PROTECTION_FATAL UINT_C(23)
|
---|
348 | #define E_OS_MODE UINT_C(24)
|
---|
349 | #define E_OS_SHUTDOWN_FATAL UINT_C(25)
|
---|
350 | #define E_OS_PARAM_POINTER UINT_C(26)
|
---|
351 | #define E_OS_SYS_ASSERT_FATAL UINT_C(27)
|
---|
352 | #define E_OS_STACKINSUFFICIENT UINT_C(28)
|
---|
353 | #define E_OS_CORE UINT_C(29)
|
---|
354 | #define E_OS_SPINLOCK UINT_C(30)
|
---|
355 | #define E_OS_INTERFERENCE_DEADLOCK UINT_C(31)
|
---|
356 | #define E_OS_NESTING_DEADLOCK UINT_C(32)
|
---|
357 | #define E_OS_SHUTDOWN_OTHER_CORE UINT_C(33)
|
---|
358 | #define E_OS_TIMEINSUFFICIENT UINT_C(34)
|
---|
359 | #define E_OS_PROTECTION_TIMEWINDOW UINT_C(35)
|
---|
360 | #define E_OS_PROTECTION_COUNT_ISR UINT_C(36)
|
---|
361 |
|
---|
362 | /* AUTOSARä»æ§R4.0.3ã¨ã®äºææ§èæ
|
---|
363 | ® */
|
---|
364 | #define OS_E_PARAM_POINTER E_OS_PARAM_POINTER
|
---|
365 |
|
---|
366 | #define ERRCODE_NUM UINT_C(36) /* ã¨ã©ã¼ã³ã¼ãæ° */
|
---|
367 | /*
|
---|
368 | * IOCã®ã¨ã©ã¼ã³ã¼ã
|
---|
369 | */
|
---|
370 | #define IOC_E_OK UINT_C(0)
|
---|
371 | #define IOC_E_NOK UINT_C(1)
|
---|
372 | #define IOC_E_LIMIT UINT_C(130)
|
---|
373 | #define IOC_E_LOST_DATA UINT_C(64)
|
---|
374 | #define IOC_E_NO_DATA UINT_C(131)
|
---|
375 |
|
---|
376 | /*
|
---|
377 | * ãã®ä»ã®å®æ°å¤
|
---|
378 | */
|
---|
379 | #define UINT32_INVALID UINT_C(0xffffffff)
|
---|
380 | #define UINT8_INVALID UINT_C(0xff)
|
---|
381 |
|
---|
382 | #define SUSPENDED ((TaskStateType) 0) /* ä¼æ¢ç¶æ
|
---|
383 | */
|
---|
384 | #define RUNNING ((TaskStateType) 1) /* å®è¡ç¶æ
|
---|
385 | */
|
---|
386 | #define READY ((TaskStateType) 2) /* å®è¡å¯è½ç¶æ
|
---|
387 | */
|
---|
388 | #define WAITING ((TaskStateType) 3) /* å¾
|
---|
389 | ã¡ç¶æ
|
---|
390 | */
|
---|
391 |
|
---|
392 | /*
|
---|
393 | * æé©åããããï¼ä¾åé¨ã§ã®åå®ç¾©ãå¿
|
---|
394 | è¦
|
---|
395 | */
|
---|
396 | #ifndef OMIT_DATA_TYPE
|
---|
397 | #define INVALID_TASK ((TaskType) UINT32_INVALID)
|
---|
398 | #define INVALID_ISR ((ISRType) UINT32_INVALID)
|
---|
399 | #endif /* OMIT_DATA_TYPE */
|
---|
400 | #define INVALID_APPMODETYPE ((AppModeType) UINT32_INVALID)
|
---|
401 | #define INVALID_OSAPPLICATION ((ApplicationType) UINT8_INVALID)
|
---|
402 |
|
---|
403 | /*
|
---|
404 | * ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®ã¹ãã¼ã¿ã¹å®ç¾©
|
---|
405 | */
|
---|
406 | #define SCHEDULETABLE_STOPPED ((ScheduleTableStatusType) 0x01)
|
---|
407 | #define SCHEDULETABLE_NEXT ((ScheduleTableStatusType) 0x02)
|
---|
408 | #define SCHEDULETABLE_WAITING ((ScheduleTableStatusType) 0x04)
|
---|
409 | #define SCHEDULETABLE_RUNNING ((ScheduleTableStatusType) 0x08)
|
---|
410 | #define SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS ((ScheduleTableStatusType) 0x10)
|
---|
411 |
|
---|
412 | /*
|
---|
413 | * OSã¢ããªã±ã¼ã·ã§ã³ã®ç¶æ
|
---|
414 |
|
---|
415 | */
|
---|
416 | #define APPLICATION_ACCESSIBLE ((ApplicationStateType) 0) /* å©ç¨å¯è½ç¶æ
|
---|
417 | */
|
---|
418 | #define APPLICATION_RESTARTING ((ApplicationStateType) 1) /* åèµ·åç¶æ
|
---|
419 | */
|
---|
420 | #define APPLICATION_TERMINATED ((ApplicationStateType) 2) /* ã¢ããªã±ã¼ã·ã§ã³çµäºç¶æ
|
---|
421 | */
|
---|
422 |
|
---|
423 | /*
|
---|
424 | * ã¢ã¯ã»ã¹æ
|
---|
425 | å ±
|
---|
426 | */
|
---|
427 | #define ACCESS (TRUE)
|
---|
428 | #define NO_ACCESS (FALSE)
|
---|
429 |
|
---|
430 | /*
|
---|
431 | * ã·ã¹ãã ãµã¼ãã¹ID
|
---|
432 | */
|
---|
433 | #define OSServiceId_GetApplicationID ((OSServiceIdType) 0x00)
|
---|
434 | #define OSServiceId_GetISRID ((OSServiceIdType) 0x01)
|
---|
435 | #define OSServiceId_CallTrustedFunction ((OSServiceIdType) 0x02)
|
---|
436 | #define OSServiceId_CheckISRMemoryAccess ((OSServiceIdType) 0x03)
|
---|
437 | #define OSServiceId_CheckTaskMemoryAccess ((OSServiceIdType) 0x04)
|
---|
438 | #define OSServiceId_StartScheduleTableRel ((OSServiceIdType) 0x07)
|
---|
439 | #define OSServiceId_StartScheduleTableAbs ((OSServiceIdType) 0x08)
|
---|
440 | #define OSServiceId_StopScheduleTable ((OSServiceIdType) 0x09)
|
---|
441 | #define OSServiceId_NextScheduleTable ((OSServiceIdType) 0x0a)
|
---|
442 | #define OSServiceId_GetScheduleTableStatus ((OSServiceIdType) 0x0e)
|
---|
443 | #define OSServiceId_IncrementCounter ((OSServiceIdType) 0x0f)
|
---|
444 | #define OSServiceId_GetCounterValue ((OSServiceIdType) 0x10)
|
---|
445 | #define OSServiceId_GetElapsedValue ((OSServiceIdType) 0x11)
|
---|
446 | #define OSServiceId_TerminateApplication ((OSServiceIdType) 0x12)
|
---|
447 | #define OSServiceId_AllowAccess ((OSServiceIdType) 0x13)
|
---|
448 | #define OSServiceId_GetApplicationState ((OSServiceIdType) 0x14)
|
---|
449 | #define IOCServiceId_IOC_Send ((OSServiceIdType) 0x1e)
|
---|
450 | #define IOCServiceId_IOC_Write ((OSServiceIdType) 0x1f)
|
---|
451 | #define IOCServiceId_IOC_SendGroup ((OSServiceIdType) 0x20)
|
---|
452 | #define IOCServiceId_IOC_WriteGroup ((OSServiceIdType) 0x21)
|
---|
453 | #define IOCServiceId_IOC_Receive ((OSServiceIdType) 0x22)
|
---|
454 | #define IOCServiceId_IOC_Read ((OSServiceIdType) 0x23)
|
---|
455 | #define IOCServiceId_IOC_ReceiveGroup ((OSServiceIdType) 0x24)
|
---|
456 | #define IOCServiceId_IOC_ReadGroup ((OSServiceIdType) 0x25)
|
---|
457 | #define IOCServiceId_IOC_EmptyQueue ((OSServiceIdType) 0x26)
|
---|
458 |
|
---|
459 | #define OSServiceId_EnableInterruptSource ((OSServiceIdType) 0xa0)
|
---|
460 | #define OSServiceId_DisableInterruptSource ((OSServiceIdType) 0xa1)
|
---|
461 | #define OSServiceId_CheckTaskAccess ((OSServiceIdType) 0xa2)
|
---|
462 | #define OSServiceId_CheckISRAccess ((OSServiceIdType) 0xa3)
|
---|
463 | #define OSServiceId_CheckAlarmAccess ((OSServiceIdType) 0xa4)
|
---|
464 | #define OSServiceId_CheckResourceAccess ((OSServiceIdType) 0xa5)
|
---|
465 | #define OSServiceId_CheckCounterAccess ((OSServiceIdType) 0xa6)
|
---|
466 | #define OSServiceId_CheckScheduleTableAccess ((OSServiceIdType) 0xa7)
|
---|
467 | #define OSServiceId_CheckTaskOwnership ((OSServiceIdType) 0xa9)
|
---|
468 | #define OSServiceId_CheckISROwnership ((OSServiceIdType) 0xaa)
|
---|
469 | #define OSServiceId_CheckAlarmOwnership ((OSServiceIdType) 0xab)
|
---|
470 | #define OSServiceId_CheckCounterOwnership ((OSServiceIdType) 0xac)
|
---|
471 | #define OSServiceId_CheckScheduleTableOwnership ((OSServiceIdType) 0xad)
|
---|
472 | #define OSServiceId_TaskMissingEnd ((OSServiceIdType) 0xaf)
|
---|
473 | #define OSServiceId_ISRMissingEnd ((OSServiceIdType) 0xb0)
|
---|
474 | #define OSServiceId_HookMissingEnd ((OSServiceIdType) 0xb1)
|
---|
475 |
|
---|
476 | #define OSServiceId_ActivateTask ((OSServiceIdType) 0xe0)
|
---|
477 | #define OSServiceId_TerminateTask ((OSServiceIdType) 0xe1)
|
---|
478 | #define OSServiceId_ChainTask ((OSServiceIdType) 0xe2)
|
---|
479 | #define OSServiceId_Schedule ((OSServiceIdType) 0xe3)
|
---|
480 | #define OSServiceId_GetTaskID ((OSServiceIdType) 0xe4)
|
---|
481 | #define OSServiceId_GetTaskState ((OSServiceIdType) 0xe5)
|
---|
482 | #define OSServiceId_EnableAllInterrupts ((OSServiceIdType) 0xe6)
|
---|
483 | #define OSServiceId_DisableAllInterrupts ((OSServiceIdType) 0xe7)
|
---|
484 | #define OSServiceId_ResumeAllInterrupts ((OSServiceIdType) 0xe8)
|
---|
485 | #define OSServiceId_SuspendAllInterrupts ((OSServiceIdType) 0xe9)
|
---|
486 | #define OSServiceId_ResumeOSInterrupts ((OSServiceIdType) 0xea)
|
---|
487 | #define OSServiceId_SuspendOSInterrupts ((OSServiceIdType) 0xeb)
|
---|
488 | #define OSServiceId_GetResource ((OSServiceIdType) 0xec)
|
---|
489 | #define OSServiceId_ReleaseResource ((OSServiceIdType) 0xed)
|
---|
490 | #define OSServiceId_SetEvent ((OSServiceIdType) 0xee)
|
---|
491 | #define OSServiceId_ClearEvent ((OSServiceIdType) 0xef)
|
---|
492 | #define OSServiceId_GetEvent ((OSServiceIdType) 0xf0)
|
---|
493 | #define OSServiceId_WaitEvent ((OSServiceIdType) 0xf1)
|
---|
494 | #define OSServiceId_GetAlarmBase ((OSServiceIdType) 0xf2)
|
---|
495 | #define OSServiceId_GetAlarm ((OSServiceIdType) 0xf3)
|
---|
496 | #define OSServiceId_SetRelAlarm ((OSServiceIdType) 0xf4)
|
---|
497 | #define OSServiceId_SetAbsAlarm ((OSServiceIdType) 0xf5)
|
---|
498 | #define OSServiceId_CancelAlarm ((OSServiceIdType) 0xf6)
|
---|
499 | #define OSServiceId_GetActiveApplicationMode ((OSServiceIdType) 0xf7)
|
---|
500 | #define OSServiceId_StartOS ((OSServiceIdType) 0xf8)
|
---|
501 | #define OSServiceId_ShutdownOS ((OSServiceIdType) 0xf9)
|
---|
502 |
|
---|
503 | #define OSServiceId_INVALID ((OSServiceIdType) 0xff) /* ç¡å¹ãªã·ã¹ãã ãµã¼ãã¹ID */
|
---|
504 |
|
---|
505 | /*
|
---|
506 | * ä¿è·éåãèµ·ãããå¦çåä½ã®å®ç¾©
|
---|
507 | */
|
---|
508 | #define FC_INVALID UINT_C(0x00) /* ä¿è·éåãèµ·ãããå¦çåä½ãç¹å®ã§ããªã */
|
---|
509 | #define FC_TASK UINT_C(0x01) /* ä¿è·éåãèµ·ãããå¦çåä½ãã¿ã¹ã¯ */
|
---|
510 | #define FC_C2ISR UINT_C(0x02) /* ä¿è·éåãèµ·ãããå¦çåä½ãC2ISR */
|
---|
511 | #define FC_SYSTEM_HOOK UINT_C(0x03) /* ä¿è·éåãèµ·ãããå¦çåä½ããã㯠*/
|
---|
512 | #define FC_TRUSTED_FUNC UINT_C(0x04) /* ä¿è·éåãèµ·ãããå¦çåä½ãä¿¡é ¼é¢æ° */
|
---|
513 |
|
---|
514 | /*
|
---|
515 | * ã·ã¹ãã ãµã¼ãã¹ãã©ã¡ã¼ã¿åå¾ã®ããã®å®ç¾©
|
---|
516 | */
|
---|
517 | #ifndef TOPPERS_MACRO_ONLY
|
---|
518 |
|
---|
519 | /*
|
---|
520 | * ã¨ã©ã¼ããã¯OFFæï¼ãµã¼ãã¹IDåå¾ã¨ãã©ã¡ã¼ã¿åå¾ãOFFã«ãªã
|
---|
521 | */
|
---|
522 | #ifdef CFG_USE_ERRORHOOK
|
---|
523 |
|
---|
524 | #ifdef CFG_USE_GETSERVICEID
|
---|
525 | extern OSServiceIdType _errorhook_svcid;
|
---|
526 | #endif /* CFG_USE_GETSERVICEID */
|
---|
527 |
|
---|
528 | #ifdef CFG_USE_PARAMETERACCESS
|
---|
529 | extern _ErrorHook_Par errorhook_par1;
|
---|
530 | extern _ErrorHook_Par errorhook_par2;
|
---|
531 | extern _ErrorHook_Par errorhook_par3;
|
---|
532 | #endif /* CFG_USE_PARAMETERACCESS */
|
---|
533 |
|
---|
534 | #endif /* CFG_USE_ERRORHOOK */
|
---|
535 |
|
---|
536 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
537 |
|
---|
538 | /*
|
---|
539 | * ã¨ã©ã¼ããã¯OFFæï¼ãµã¼ãã¹IDåå¾ã¨ãã©ã¡ã¼ã¿åå¾ãOFFã«ãªã
|
---|
540 | */
|
---|
541 | #ifdef CFG_USE_ERRORHOOK
|
---|
542 |
|
---|
543 | /*
|
---|
544 | * ãã¯ãã®å®ç¾©
|
---|
545 | */
|
---|
546 | #ifdef CFG_USE_GETSERVICEID
|
---|
547 | #define OSErrorGetServiceId() (_errorhook_svcid)
|
---|
548 | #endif /* CFG_USE_GETSERVICEID */
|
---|
549 |
|
---|
550 | /*
|
---|
551 | * ã¨ã©ã¼ãå¼ãèµ·ãããã·ã¹ãã ãµã¼ãã¹ID
|
---|
552 | */
|
---|
553 | #ifdef CFG_USE_PARAMETERACCESS
|
---|
554 | #define OSError_StartOS_Mode() (errorhook_par1.mode)
|
---|
555 | #define OSError_ActivateTask_TaskID() (errorhook_par1.tskid)
|
---|
556 | #define OSError_ChainTask_TaskID() (errorhook_par1.tskid)
|
---|
557 | #define OSError_GetTaskID_TaskID() (errorhook_par1.p_tskid)
|
---|
558 | #define OSError_GetTaskState_TaskID() (errorhook_par1.tskid)
|
---|
559 | #define OSError_GetTaskState_State() (errorhook_par2.p_stat)
|
---|
560 | #define OSError_GetResource_ResID() (errorhook_par1.resid)
|
---|
561 | #define OSError_ReleaseResource_ResID() (errorhook_par1.resid)
|
---|
562 | #define OSError_SetEvent_TaskID() (errorhook_par1.tskid)
|
---|
563 | #define OSError_SetEvent_Mask() (errorhook_par2.mask)
|
---|
564 | #define OSError_ClearEvent_Mask() (errorhook_par1.mask)
|
---|
565 | #define OSError_GetEvent_TaskID() (errorhook_par1.tskid)
|
---|
566 | #define OSError_GetEvent_Event() (errorhook_par2.p_mask)
|
---|
567 | #define OSError_WaitEvent_Mask() (errorhook_par1.mask)
|
---|
568 | #define OSError_GetAlarmBase_AlarmID() (errorhook_par1.almid)
|
---|
569 | #define OSError_GetAlarmBase_Info() (errorhook_par2.p_info)
|
---|
570 | #define OSError_GetAlarm_AlarmID() (errorhook_par1.almid)
|
---|
571 | #define OSError_GetAlarm_Tick() (errorhook_par2.p_tick)
|
---|
572 | #define OSError_SetRelAlarm_AlarmID() (errorhook_par1.almid)
|
---|
573 | #define OSError_SetRelAlarm_increment() (errorhook_par2.incr)
|
---|
574 | #define OSError_SetRelAlarm_cycle() (errorhook_par3.cycle)
|
---|
575 | #define OSError_SetAbsAlarm_AlarmID() (errorhook_par1.almid)
|
---|
576 | #define OSError_SetAbsAlarm_start() (errorhook_par2.start)
|
---|
577 | #define OSError_SetAbsAlarm_cycle() (errorhook_par3.cycle)
|
---|
578 | #define OSError_CancelAlarm_AlarmID() (errorhook_par1.almid)
|
---|
579 | #define OSError_IncrementCounter_CounterID() (errorhook_par1.cntid)
|
---|
580 | #define OSError_GetCounterValue_CounterID() (errorhook_par1.cntid)
|
---|
581 | #define OSError_GetCounterValue_Value() (errorhook_par2.p_val)
|
---|
582 | #define OSError_GetElapsedValue_CounterID() (errorhook_par1.cntid)
|
---|
583 | #define OSError_GetElapsedValue_Value() (errorhook_par2.p_val)
|
---|
584 | #define OSError_GetElapsedValue_ElapsedValue() (errorhook_par3.p_eval)
|
---|
585 | #define OSError_StartScheduleTableRel_ScheduleTableID() (errorhook_par1.schtblid)
|
---|
586 | #define OSError_StartScheduleTableRel_Offset() (errorhook_par2.offset)
|
---|
587 | #define OSError_StartScheduleTableAbs_ScheduleTableID() (errorhook_par1.schtblid)
|
---|
588 | #define OSError_StartScheduleTableAbs_Start() (errorhook_par2.start)
|
---|
589 | #define OSError_StopScheduleTable_ScheduleTableID() (errorhook_par1.schtblid)
|
---|
590 | #define OSError_NextScheduleTable_ScheduleTableID_From() (errorhook_par1.schtblid_from)
|
---|
591 | #define OSError_NextScheduleTable_ScheduleTableID_To() (errorhook_par2.schtblid_to)
|
---|
592 | #define OSError_GetScheduleTableStatus_ScheduleTableID() (errorhook_par1.schtblid)
|
---|
593 | #define OSError_GetScheduleTableStatus_ScheduleStatus() (errorhook_par2.p_schtblstate)
|
---|
594 | #define OSError_ShutdownOS_Error() (errorhook_par1.error)
|
---|
595 | #define OSError_DisableInterruptSource_DisableISR() (errorhook_par1.isrid)
|
---|
596 | #define OSError_EnableInterruptSource_EnableISR() (errorhook_par1.isrid)
|
---|
597 | #define OSError_GetApplicationState_Application() (errorhook_par1.applid)
|
---|
598 | #define OSError_GetApplicationState_Value() (errorhook_par2.p_appstat)
|
---|
599 | #define OSError_CallTrustedFunction_FunctionIndex() (errorhook_par1.tfnid)
|
---|
600 | #define OSError_CallTrustedFunction_FunctionParams() (errorhook_par2.tfnpr)
|
---|
601 | #define OSError_CheckISRMemoryAccess_ISRID() (errorhook_par1.isrid)
|
---|
602 | #define OSError_CheckISRMemoryAccess_Address() (errorhook_par2.adr)
|
---|
603 | #define OSError_CheckISRMemoryAccess_Size() (errorhook_par3.sz)
|
---|
604 | #define OSError_CheckTaskMemoryAccess_TaskID() (errorhook_par1.tskid)
|
---|
605 | #define OSError_CheckTaskMemoryAccess_Address() (errorhook_par2.adr)
|
---|
606 | #define OSError_CheckTaskMemoryAccess_Size() (errorhook_par3.sz)
|
---|
607 | #define OSError_CheckTaskAccess_ApplID() (errorhook_par1.applid)
|
---|
608 | #define OSError_CheckTaskAccess_TaskID() (errorhook_par2.tskid)
|
---|
609 | #define OSError_CheckISRAccess_ApplID() (errorhook_par1.applid)
|
---|
610 | #define OSError_CheckISRAccess_ISRID() (errorhook_par2.isrid)
|
---|
611 | #define OSError_CheckAlarmAccess_ApplID() (errorhook_par1.applid)
|
---|
612 | #define OSError_CheckAlarmAccess_AlarmID() (errorhook_par2.almid)
|
---|
613 | #define OSError_CheckResourceAccess_ApplID() (errorhook_par1.applid)
|
---|
614 | #define OSError_CheckResourceAccess_ResID() (errorhook_par2.resid)
|
---|
615 | #define OSError_CheckCounterAccess_ApplID() (errorhook_par1.applid)
|
---|
616 | #define OSError_CheckCounterAccess_CounterID() (errorhook_par2.cntid)
|
---|
617 | #define OSError_CheckScheduleTableAccess_ApplID() (errorhook_par1.applid)
|
---|
618 | #define OSError_CheckScheduleTableAccess_ScheduleTableID() (errorhook_par2.schtblid)
|
---|
619 | #define OSError_CheckTaskOwnership_TaskID() (errorhook_par1.tskid)
|
---|
620 | #define OSError_CheckISROwnership_ISRID() (errorhook_par1.isrid)
|
---|
621 | #define OSError_CheckAlarmOwnership_AlarmID() (errorhook_par1.almid)
|
---|
622 | #define OSError_CheckCounterOwnership_CounterID() (errorhook_par1.cntid)
|
---|
623 | #define OSError_CheckScheduleTableOwnership_ScheduleTableID() (errorhook_par1.schtblid)
|
---|
624 | #define OSError_IocSend_IocId() (errorhook_par1.iocid)
|
---|
625 | #define OSError_IocSend_SenderId() (errorhook_par2.senderid)
|
---|
626 | #define OSError_IocWrite_IocId() (errorhook_par1.iocid)
|
---|
627 | #define OSError_IocWrite_SenderId() (errorhook_par2.senderid)
|
---|
628 | #define OSError_IocReceive_IocId() (errorhook_par1.iocid)
|
---|
629 | #define OSError_IocRead_IocId() (errorhook_par1.iocid)
|
---|
630 | #define OSError_IocEmptyQueue_IocId() (errorhook_par1.iocid)
|
---|
631 | #define OSError_TerminateApplication_Application() (errorhook_par1.applid)
|
---|
632 | #define OSError_TerminateApplication_RestartOption() (errorhook_par2.restartoption)
|
---|
633 |
|
---|
634 | #endif /* CFG_USE_PARAMETERACCESS */
|
---|
635 |
|
---|
636 | #endif /* CFG_USE_ERRORHOOK */
|
---|
637 |
|
---|
638 | /*
|
---|
639 | * ãããã¯ã·ã§ã³ããã¯é¢ä¿ã®ãã¯ã
|
---|
640 | */
|
---|
641 | #define PRO_IGNORE UINT_C(0x00)
|
---|
642 | #define PRO_SHUTDOWN UINT_C(0x01)
|
---|
643 | #define PRO_TERMINATETASKISR UINT_C(0x02)
|
---|
644 | #define PRO_TERMINATEAPPL UINT_C(0x03)
|
---|
645 | #define PRO_TERMINATEAPPL_RESTART UINT_C(0x04)
|
---|
646 |
|
---|
647 | /*
|
---|
648 | * OSAPçµäº/åèµ·åé¢ä¿ã®ãã¯ã
|
---|
649 | */
|
---|
650 | #define NO_RESTART UINT_C(0x00)
|
---|
651 | #define RESTART UINT_C(0x01)
|
---|
652 |
|
---|
653 | /*
|
---|
654 | * ã¡ã¢ãªã¢ã¯ã»ã¹æ¨©éãã§ãã¯ã®ããã®ãã¯ã
|
---|
655 | */
|
---|
656 |
|
---|
657 | /*
|
---|
658 | * ã¡ã¢ãªé å 権é
|
---|
659 | */
|
---|
660 |
|
---|
661 | #define AP_NoAccess UINT_C(0x0)
|
---|
662 | #define AP_Executable UINT_C(0x1)
|
---|
663 | #define AP_Readable UINT_C(0x2)
|
---|
664 | #define AP_Writable UINT_C(0x4)
|
---|
665 | #define AP_StackSpace UINT_C(0x8)
|
---|
666 |
|
---|
667 | /*
|
---|
668 | * ã¢ã¯ã»ã¹ãã§ãã¯ãã¯ã
|
---|
669 | */
|
---|
670 | #define OSMEMORY_IS_READABLE(AccessType) ((AccessType) & AP_Readable)
|
---|
671 | #define OSMEMORY_IS_WRITEABLE(AccessType) ((AccessType) & AP_Writable)
|
---|
672 | #define OSMEMORY_IS_EXECUTABLE(AccessType) ((AccessType) & AP_Executable)
|
---|
673 | #define OSMEMORY_IS_STACKSPACE(AccessType) ((AccessType) & AP_StackSpace)
|
---|
674 |
|
---|
675 | /*
|
---|
676 | * ãªãã¸ã§ã¯ãã¿ã¤ã
|
---|
677 | */
|
---|
678 | #define OBJECT_TASK UINT_C(0x01)
|
---|
679 | #define OBJECT_ISR UINT_C(0x02)
|
---|
680 | #define OBJECT_ALARM UINT_C(0x03)
|
---|
681 | #define OBJECT_RESOURCE UINT_C(0x04)
|
---|
682 | #define OBJECT_COUNTER UINT_C(0x05)
|
---|
683 | #define OBJECT_SCHEDULETABLE UINT_C(0x06)
|
---|
684 |
|
---|
685 | /*
|
---|
686 | * ãã¼ã¸ã§ã³æ
|
---|
687 | å ±
|
---|
688 | */
|
---|
689 | #define OS_SW_MAJOR_VERSION UINT_C(1) /* ãµãã©ã¤ã¤ã¼ãã¼ã¸ã§ã³ */
|
---|
690 | #define OS_SW_MINOR_VERSION UINT_C(4)
|
---|
691 | #define OS_SW_PATCH_VERSION UINT_C(0)
|
---|
692 |
|
---|
693 | #define OS_AR_RELEASE_MAJOR_VERSION UINT_C(4) /* AUTOSARãªãªã¼ã¹ãã¼ã¸ã§ã³ */
|
---|
694 | #define OS_AR_RELEASE_MINOR_VERSION UINT_C(0)
|
---|
695 | #define OS_AR_RELEASE_REVISION_VERSION UINT_C(3)
|
---|
696 |
|
---|
697 | #define TKERNEL_NAME "TOPPERS/ATK2-SC3" /* ã«ã¼ãã«å称ï¼ç¬èªä»æ§ï¼ */
|
---|
698 |
|
---|
699 | #endif /* TOPPERS_OS_H */
|
---|