]> git.sur5r.net Git - freertos/blob - Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/startcf.h
Start to re-arrange files to include FreeRTOS+ in main download.
[freertos] / Demo / ColdFire_MCF51CN128_CodeWarrior / Sources / startcf.h
1 /******************************************************************************\r
2   FILE    : startcf.h\r
3   PURPOSE : startup code for ColdFire\r
4   LANGUAGE: C\r
5 \r
6 \r
7   Notes:\r
8         1) Default entry point is _startup. \r
9            . disable interrupts\r
10            . the SP is set to __SP_AFTER_RESET\r
11            . SP must be initialized to valid memory \r
12              in case the memory it points to is not valid using MEMORY_INIT macro\r
13         2) __initialize_hardware is called. Here you can initialize memory and some peripherics\r
14            at this point global variables are not initialized yet\r
15         3) After __initialize_hardware memory is setup; initialize SP to _SP_INIT and perform \r
16            needed initialisations for the language (clear memory, data rom copy).\r
17         4) void __initialize_system(void); is called\r
18            to allow additional hardware initialization (UART, GPIOs, etc...)\r
19         5) Jump to main \r
20 \r
21 */\r
22 /********************************************************************************/\r
23 \r
24 #ifndef STARTCF_H\r
25 #define STARTCF_H\r
26 \r
27 \r
28 #ifdef __cplusplus\r
29 extern "C" {\r
30 #endif\r
31 \r
32 #ifdef STARTCF_INCLUDE\r
33 #include STARTCF_INCLUDE\r
34 #endif\r
35 \r
36 #pragma warn_any_ptr_int_conv off\r
37 #pragma warn_absolute off\r
38 \r
39 extern unsigned long far __SP_INIT[];\r
40 extern unsigned long far __SP_AFTER_RESET[];\r
41 \r
42 #ifndef MEMORY_INIT\r
43 /* If MEMORY_INIT is set then it performs\r
44    minimal memory initialization (to preset SP to __SP_AFTER_RESET, etc...) \r
45 */\r
46 #define MEMORY_INIT\r
47 #endif\r
48 \r
49 void _startup(void);\r
50 \r
51 #ifndef SUPPORT_ROM_TO_RAM\r
52   /*\r
53    * If SUPPORT_ROM_TO_RAM is set, _S_romp is used to define the copy to be performed.\r
54    * If it is not set, there's a single block to copy, performed directly without \r
55    * using the __S_romp structure, based on __DATA_RAM, __DATA_ROM and\r
56    * __DATA_END symbols.\r
57    *\r
58    * Set to 0 for more aggressive dead stripping ...\r
59    */\r
60 #define SUPPORT_ROM_TO_RAM 1\r
61 #endif\r
62 \r
63 /* format of the ROM table info entry ... */\r
64 typedef struct RomInfo {\r
65         void            *Source;\r
66         void            *Target;\r
67         unsigned long    Size;\r
68 } RomInfo;\r
69 \r
70 /* imported data */\r
71 extern far RomInfo _S_romp[];           /* linker defined symbol */\r
72 \r
73 #ifdef __cplusplus\r
74 }\r
75 #endif\r
76 \r
77 #endif\r