-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathplo.c
49 lines (41 loc) · 938 Bytes
/
plo.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Phoenix-RTOS
*
* Operating system loader
*
* Initial loader's routines
*
* Copyright 2012, 2017, 2020-2021 Phoenix Systems
* Copyright 2001, 2005 Pawel Pisarczyk
* Authors: Pawel Pisarczyk, Lukasz Kosinski, Hubert Buczynski
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/
#include <hal/hal.h>
#include <lib/lib.h>
#include <cmds/cmd.h>
#include <devices/devs.h>
#include <syspage.h>
static void nop(void)
{
}
void hal_customInit(void) __attribute__((weak, alias("nop")));
void hal_customDone(void) __attribute__((weak, alias("nop")));
int main(void)
{
hal_init();
hal_customInit();
syspage_init();
lib_printf(CONSOLE_BOLD "Phoenix-RTOS loader v. " VERSION CONSOLE_NORMAL);
lib_printf(CONSOLE_CURSOR_HIDE CONSOLE_MAGENTA "\nhal: %s", hal_cpuInfo());
devs_init();
cmd_run();
lib_printf(CONSOLE_CURSOR_SHOW CONSOLE_NORMAL);
cmd_prompt();
devs_done();
hal_done();
hal_customDone();
return 0;
}