Bootstrap Examples
These examples are very small and they are designed to fit in less than 256 bytes (less than 240 to leave room for the stack). They represent typical programs that can be uploaded during the 68HC11 bootstrap mode.
In general to compile and link these programs, you will use the following command:
- Hello World Tutorial for 68HC11 bootstrap mode
- Blink program for a Christmas tree.
- Simple Hello World for 68HC11 bootstrap mode
- External RAM booter.
- Check the memory and return the target board memory layout.
- Dump the content of memory.
- Internal Eprom loader and burner.
m6811-elf-gcc -o file.elf -nostdlib -nostartfiles \ -Wl,-defsym,_io_ports=0x1000 \ -Wl,-defsym,_.tmp=0x0 -Wl,-defsym,_.z=0x2 \ -Wl,-m,m68hc11elfb \ -mshort -Os -fomit-frame-pointer -msoft-reg-count=0 \ file.cIn this cryptic and long command, the following options are used by the compiler:
-mshort This option tells gcc to use 16-bit integers.-Os This option tells gcc to optimize for size.-fomit-frame-pointer This option tells gcc to remove the frame pointer.-msoft-reg-count=0 This option tells gcc to avoid to use soft registers (except _.tmp and _.z which are sometimes necessary)And the following options are used by the linker:
-nostdlib The standard libraries are not passed to the linker.-nostartfiles The standard startup files are not used during the link.-defsym _io_ports=0x1000 The linker will define the symbol_io_portsand assign it the value0x1000. This symbol is used by the examples to access the 68HC11 registers.-defsym _.tmp=0x0
-defsym _.z=0x0 This will define the symbol_.tmpused by gcc.
Copyright (C) 1999, 2000, 2001, 2002, 2003 Stéphane Carrez, France
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.