uc-sdk
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
init.c
Go to the documentation of this file.
1
#include <
stdlib.h
>
2
#include <
string.h
>
3
#include <BoardConsole.h>
4
5
int
main
(
int
,
char
**,
char
**);
6
7
void
BoardEarlyInit
();
8
void
BoardInit
();
9
void
BoardLateInit
();
10
11
void
BoardExceptionHandler
(
int
);
12
void
BoardShutdown
();
13
14
void
cpu_early_init
();
15
void
cpu_init
();
16
void
cpu_late_init
();
17
18
void
libc_init
();
19
20
void
_exit
(
int
return_code)
__attribute__
((noreturn));
21
void
_exit
(
int
return_code) {
22
if
(return_code)
23
BoardExceptionHandler
(return_code);
24
BoardShutdown
();
25
while
(1);
26
}
27
28
void
_start
() {
29
BoardEarlyInit
();
30
cpu_early_init
();
31
32
BoardConsoleInit
();
33
BoardConsolePuts
(
"uC-sdk - booting."
);
34
35
libc_init
();
36
37
BoardInit
();
38
cpu_init
();
39
40
BoardLateInit
();
41
cpu_late_init
();
42
43
exit
(
main
(0,
NULL
,
NULL
));
44
}
45
46
void
startup_memcpy
(
void
* dest,
const
void
* src,
size_t
n) {
47
memcpy(dest, src, n);
48
}
49
50
void
startup_memset
(
void
* dest,
int
c,
size_t
n) {
51
memset(dest, c, n);
52
}
os
src
init.c
Generated on Fri Nov 15 2013 05:00:16 for uc-sdk by
1.8.4