1 /******************************************************************************
\r
3 PURPOSE : startup code for ColdFire
\r
8 1) Default entry point is _startup.
\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
22 /********************************************************************************/
\r
32 #include "support_common.h"
\r
34 extern unsigned long far __SP_INIT[];
\r
35 extern unsigned long far __SP_AFTER_RESET[];
\r
39 /* If MEMORY_INIT is set then it performs
\r
40 minimal memory initialization (to preset SP to __SP_AFTER_RESET, etc...)
\r
46 void _startup(void);
\r
48 #ifndef SUPPORT_ROM_TO_RAM
\r
50 * If SUPPORT_ROM_TO_RAM is set, _S_romp is used to define the copy to be performed.
\r
51 * If it is not set, there's a single block to copy, performed directly without
\r
52 * using the __S_romp structure, based on __DATA_RAM, __DATA_ROM and
\r
53 * __DATA_END symbols.
\r
55 * Set to 0 for more aggressive dead stripping ...
\r
57 #define SUPPORT_ROM_TO_RAM 1
\r
60 /* format of the ROM table info entry ... */
\r
61 typedef struct RomInfo {
\r
68 extern far RomInfo _S_romp[]; /* linker defined symbol */
\r