source: ssp_qb_r5f100le_cs/trunk/arch/arm_m_gcc/start.S@ 93

Last change on this file since 93 was 93, checked in by nmir-saito, 8 years ago

add Combined package of SSP kernel for QB-R5F100LE-TB(RL78 processor)

File size: 4.1 KB
Line 
1/*
2 * TOPPERS Software
3 * Toyohashi Open Platform for Embedded Real-Time Systems
4 *
5 * Copyright (C) 2008 by Embedded and Real-Time Systems Laboratory
6 * Graduate School of Information Science, Nagoya Univ., JAPAN
7 * Copyright (C) 2015 by Naoki Saito
8 * Nagoya Municipal Industrial Research Institute, JAPAN
9 *
10 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
11 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
12 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
13 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
14 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
15 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
16 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
17 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
18ƒƒ“ƒgi—˜—p
19 * ŽÒƒ}ƒjƒ…
20ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
21 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
22 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
23 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
24 * ‚ƁD
25 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
26ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
27ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
28 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
29 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
30 * •ñ‚·‚邱‚ƁD
31 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
32 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
33 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
34 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
35 * –Ɛӂ·‚邱‚ƁD
36 *
37 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
38 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
39 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
40 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
41 * ‚̐ӔC‚𕉂í‚È‚¢D
42 *
43 * @(#) $Id: start.S 1304 2008-08-27 07:28:36Z ertl-honda $
44 */
45
46/*
47 * ƒJ[ƒlƒ‹—p‚̃Xƒ^[ƒgƒAƒbƒvƒ‚ƒWƒ…
48[ƒ‹(ARM-M—p)
49 */
50#define TOPPERS_MACRO_ONLY
51#define UINT_C(val) (val) /* uint_tŒ^‚̒萔‚ðì‚éƒ}ƒNƒ */
52#define ULONG_C(val) (val) /* ulong_tŒ^‚̒萔‚ðì‚éƒ}ƒNƒ */
53#define CAST(type, val) (val) /* Œ^ƒLƒƒƒXƒg‚ðs‚¤ƒ}ƒNƒ */
54
55#include "kernel_impl.h"
56#include "arm_m.h"
57
58/*
59 * ƒXƒ^[ƒgƒAƒbƒvƒ‹[ƒ`ƒ“
60 *
61 * Threadƒ‚[ƒh‚ŌĂяo‚³‚ê‚邱‚Æ‚ð‘O’ñ‚Æ‚µ‚Ä‚éD
62 */
63 .text
64 .align 2
65 .code 16
66 .syntax unified
67 .globl _start
68 .type _start, function
69_start:
70 cpsid f /* Š„ž‚݃ƒbƒNó‘Ô‚Ö */
71
72#ifdef INIT_MSP
73 /*
74 * MSP‚̐ݒè
75 */
76 mov r0, #CONTROL_MSP /* MSP‚ð—LŒø‚É */
77 msr control, r0
78 isb /* control ‚Ì‘€ìŒã‚É•K—v */
79 ldr r0,=_kernel_istkpt
80 ldr r1,[r0]
81 msr msp, r1
82#endif /* INIT_MSP */
83
84 /*
85 * hardware_init_hook‚̌Ăяo‚µ i0‚Å‚È‚¢ê‡j
86 *
87 * ƒ^[ƒQƒbƒgƒn[ƒhƒEƒFƒA‚Ɉˑ¶‚µ‚Ä•K—v‚ȏ‰Šú‰»ˆ—‚ª‚ ‚éê‡
88 * ‚́Chardware_init_hook ‚Æ‚¢‚¤ŠÖ”‚ð—pˆÓ‚·‚é
89 */
90 ldr r0, =hardware_init_hook
91 cbz r0, start_1
92 blx r0
93
94start_1:
95#ifndef OMIT_BSS_INIT
96 /*
97 * BSSƒZƒNƒVƒ‡ƒ“‰Šú‰»
98 */
99 mov r0, #0
100 ldr r1, =__bss_start
101 ldr r2, =__bss_end
102 cmp r1, r2
103 bhs start_3
104start_2:
105 str r0, [r1]
106 add r1,r1, #4
107 cmp r1, r2
108 blo start_2
109#endif /* OMIT_BSS_INIT */
110
111
112start_3:
113
114#ifndef OMIT_DATA_INIT
115 /*
116 * DATAƒZƒNƒVƒ‡ƒ“‰Šú‰»
117 * __idata_start ‚©‚ç __idata_end ‚Ü‚Å‚ðC__data_start ˆÈ~‚É
118 * ƒRƒs[‚·‚é
119 */
120 ldr r1, =__idata_start
121 ldr r2, =__idata_end
122 cmp r1, r2
123 bhs start_5
124 ldr r3, =__data_start
125start_4:
126 ldr r0, [r1]
127 str r0, [r3]
128 add r1, #4
129 add r3, #4
130 cmp r1, r2
131 blo start_4
132#endif /* OMIT_DATA_INIT */
133
134 /*
135 * software_init_hook ‚ðŒÄo‚µi0 ‚Å‚È‚¢ê‡j
136 *
137 * ƒ\ƒtƒgƒEƒFƒAŠÂ‹«i“Á‚Ƀ‰ƒCƒuƒ‰ƒŠj‚Ɉˑ¶‚µ‚Ä•K—v‚ȏ‰Šú‰»ˆ
138 * —‚ª‚ ‚éê‡‚́Csoftware_init_hook ‚Æ‚¢‚¤ŠÖ”‚ð—pˆÓ‚·‚ê‚Î
139 * ‚æ‚¢D
140 */
141start_5:
142 ldr r0, =software_init_hook
143 cbz r0, start_6
144 blx r0
145
146start_6:
147 bl sta_ker
148
149l_end:
150 b l_end
Note: See TracBrowser for help on using the repository browser.