[93] | 1 | /*
|
---|
| 2 | * TOPPERS/SSP Kernel
|
---|
| 3 | * Smallest Set Profile Kernel
|
---|
| 4 | *
|
---|
| 5 | * Copyright (C) 2010-2012 by Meika Sugimoto
|
---|
| 6 | * Copyright (C) 2014 by Naoki Saito
|
---|
| 7 | * Nagoya Municipal Industrial Research Institute, JAPAN
|
---|
| 8 | *
|
---|
| 9 | * ãLì ÒÍCÈºÌ (1)`(4) Ìðð½·êÉÀèC{\tgEF
|
---|
| 10 | * Ai{\tgEFAðüϵ½àÌðÜÞDȺ¯¶jðgpE¡»EüÏE
|
---|
| 11 | * ÄzziȺCpÆÄÔj·é±Æð³Åø·éD
|
---|
| 12 | * (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
|
---|
| 13 | * \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[X
|
---|
| 14 | * R[hÉÜÜêĢ鱯D
|
---|
| 15 | * (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJÉgp
|
---|
| 16 | * Å«é`ÅÄzz·éêÉÍCÄzzɺ¤hL
|
---|
| 17 | gipÒ}
|
---|
| 18 | * j
|
---|
| 19 | AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL̳Û
|
---|
| 20 | * ØKèðfÚ·é±ÆD
|
---|
| 21 | * (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJÉgp
|
---|
| 22 | * ūȢ`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±ÆD
|
---|
| 23 | * (a) Äzzɺ¤hL
|
---|
| 24 | gipÒ}j
|
---|
| 25 | AÈÇjÉCãLÌì
|
---|
| 26 | * \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
|
---|
| 27 | * (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉñ
|
---|
| 28 | * ·é±ÆD
|
---|
| 29 | * (4) {\tgEFAÌpÉæè¼ÚIܽÍÔÚIɶ¶é¢©Èé¹Q
|
---|
| 30 | * ©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆDܽC
|
---|
| 31 | * {\tgEFAÌ[UܽÍGh[U©çÌ¢©ÈéRÉîÃ
|
---|
| 32 | * ¿©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
|
---|
| 33 | *
|
---|
| 34 | * {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨æ
|
---|
| 35 | * ÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄCÁèÌgpÚIÉη
|
---|
| 36 | * éK«àÜßÄC¢©ÈéÛØàsíÈ¢DܽC{\tgEFAÌp
|
---|
| 37 | * Éæè¼ÚIܽÍÔÚIɶ¶½¢©Èé¹QÉÖµÄàC»ÌÓCð
|
---|
| 38 | * íÈ¢D
|
---|
| 39 | *
|
---|
| 40 | */
|
---|
| 41 |
|
---|
| 42 | #ifndef TOPPERS_SAMPLE1_H
|
---|
| 43 | #define TOPPERS_SAMPLE1_H
|
---|
| 44 |
|
---|
| 45 | /*
|
---|
| 46 | * ^[Qbg˶Ìè`
|
---|
| 47 | */
|
---|
| 48 | #include "target_test.h"
|
---|
| 49 |
|
---|
| 50 | #if TMAX_TPRI == 16
|
---|
| 51 |
|
---|
| 52 | #define INIT_PRIORITY (1)
|
---|
| 53 | #define ERRORTSK_PRIORITY (6)
|
---|
| 54 | #define MAIN_PRIORITY (7)
|
---|
| 55 | #define TASK1_PRIORITY (8)
|
---|
| 56 | #define TASK2_PRIORITY (9)
|
---|
| 57 | #define TASK3_PRIORITY (10)
|
---|
| 58 | #define TASK3_EXEPRIORITY (9)
|
---|
| 59 |
|
---|
| 60 | #else
|
---|
| 61 |
|
---|
| 62 | /* TMAX_TPRI == 8 */
|
---|
| 63 | #define INIT_PRIORITY (1)
|
---|
| 64 | #define ERRORTSK_PRIORITY (2)
|
---|
| 65 | #define MAIN_PRIORITY (3)
|
---|
| 66 | #define TASK1_PRIORITY (4)
|
---|
| 67 | #define TASK2_PRIORITY (5)
|
---|
| 68 | #define TASK3_PRIORITY (6)
|
---|
| 69 | #define TASK3_EXEPRIORITY (5)
|
---|
| 70 |
|
---|
| 71 | #endif /* TMAX_TPRI == 16 */
|
---|
| 72 |
|
---|
| 73 | #ifndef ALL_STACKSIZE
|
---|
| 74 | #define ALL_STACKSIZE (2048)
|
---|
| 75 | #endif /* ITSK_STACKSIZE */
|
---|
| 76 |
|
---|
| 77 | #ifndef INTERRUPT_STACKSIZE
|
---|
| 78 | #define INTERRUPT_STACKSIZE (1024)
|
---|
| 79 | #endif /* INTERRUPT_STACKSIZE */
|
---|
| 80 |
|
---|
| 81 |
|
---|
| 82 | #ifndef TASK_PORTID
|
---|
| 83 | #define TASK_PORTID 1 /* ¶üÍ·éVA|[gID */
|
---|
| 84 | #endif /* TASK_PORTID */
|
---|
| 85 |
|
---|
| 86 | #ifndef LOOP_REF
|
---|
| 87 | #define LOOP_REF ULONG_C(1000000) /* ¬xvªpÌ[vñ */
|
---|
| 88 | #endif /* LOOP_REF */
|
---|
| 89 |
|
---|
| 90 | #ifndef STACK_SIZE
|
---|
| 91 | #define STACK_SIZE (256)
|
---|
| 92 | #endif /* STACK_SIZE */
|
---|
| 93 |
|
---|
| 94 | #ifndef TOPPERS_MACRO_ONLY
|
---|
| 95 |
|
---|
| 96 | extern void init_task(intptr_t exinf);
|
---|
| 97 | extern void main_task(intptr_t exinf);
|
---|
| 98 | extern void task(intptr_t exinf);
|
---|
| 99 |
|
---|
| 100 | extern void main_task_cychdr(intptr_t exinf);
|
---|
| 101 | extern void cyclic_handler(intptr_t exinf);
|
---|
| 102 | extern void alarm_handler(intptr_t exinf);
|
---|
| 103 | extern void interrupt_service_routine(intptr_t exinf);
|
---|
| 104 | #ifdef CPUEXC1
|
---|
| 105 | extern void exc_handler(void *p_excinf);
|
---|
| 106 | #endif /* CPUEXC1 */
|
---|
| 107 |
|
---|
| 108 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
| 109 | #endif /* TOPPERS_SAMPLE1_H */
|
---|
| 110 |
|
---|