1 /* Startup code for M68HC11.
2 Copyright (C) 1999, 2000, 2002, 2008, 2009 Free Software Foundation, Inc.
4 This file is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 3, or (at your option) any
9 This file is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 Under Section 7 of GPL version 3, you are granted additional
15 permissions described in the GCC Runtime Library Exception, version
16 3.1, as published by the Free Software Foundation.
18 You should have received a copy of the GNU General Public License and
19 a copy of the GCC Runtime Library Exception along with this program;
20 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
21 <http://www.gnu.org/licenses/>. */
23 ;-----------------------------------------
25 ;-----------------------------------------
27 #ifdef __HAVE_SHORT_INT__
33 #if defined(__USE_RTC__) && defined(mc68hc12)
40 ;; The linker concatenate the .install* sections in the following order:
42 ;; .install0 Setup the stack pointer
43 ;; .install1 Place holder for applications
44 ;; .install2 Optional installation of data section in memory
45 ;; .install3 Place holder for applications
46 ;; .install4 Invokes the main
48 .sect .install0,"ax",@progbits
53 ;; At this step, the stack is not initialized and interrupts are masked.
54 ;; Applications only have 64 cycles to initialize some registers.
56 ;; To have a generic/configurable startup, initialize the stack to
57 ;; the end of some memory region. The _stack symbol is defined by
62 .sect .install2,"ax",@progbits
64 ;; Call a specific initialization operation. The default is empty.
65 ;; It can be overridden by applications. It is intended to initialize
66 ;; the 68hc11 registers. Function prototype is:
68 ;; int __premain(void);
75 .sect .install4,"ax",@progbits
81 ;-----------------------------------------
83 ;-----------------------------------------
84 ;; Force loading of data section mapping and bss clear
85 .2byte __map_data_section
86 .2byte __init_bss_section