1 /*
2 * lowinit.c
3 *
4 * This module contains the function '__low_level_init', a function
5 * that is called before the 'main' function of the program. Normally
6 * low-level initializations - such as setting the prefered interrupt
7 * level or setting the watchdog - can be performed here.
8 *
9 * Note that this function is called before the data segments are
10 * initialized, this means that this function can't rely on the
11 * values of global or static variables.
12 *
13 * When this function returns zero, the startup code will inhibit the
14 * initialization of the data segments. The result is faster startup,
15 * the drawback is that neither global nor static data will be
16 * initialized.
17 *
18 *
19 * Copyright 2009-2010 IAR Systems AB.
20 *
21 * $Revision: 2717 $
22 */
23
24 #pragma language=extended
25
26 #include <iorx65n.h>
27 #include <intrinsics.h>
28 #include "hwsetup.h"
29
30 __intrinsic
__low_level_init(void)31 int __low_level_init ( void )
32 {
33 hardware_setup();
34
35 /*==================================*/
36 /* Choose if segment initialization */
37 /* should be done or not. */
38 /* Return: 0 to omit seg_init */
39 /* 1 to run seg_init */
40 /*==================================*/
41 return (1);
42 }
43 #pragma language=default
44