1 /* Copyright 2008 Fred Cooke
3 This file is part of the FreeEMS project.
5 FreeEMS software is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 FreeEMS software is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
18 We ask that if you make any changes to this file you email them upstream to
19 us at admin(at)diyefi(dot)org or, even better, fork the code on github.com!
21 Thank you for choosing FreeEMS to run your engine! */
26 * Memory region location definition file for inclusion into the linker
27 * script. It defines the names, types, start addresses and lengths of
28 * each memory region available for the linker to populate with code and
29 * data. See hc9s12xdp512elfb.x and regions.x for more information.
31 * A description of what some of this means can be found at the following URL:
32 * http://www.gnu.org/software/m68hc11/m68hc11_binutils.html
33 * http://m68hc11.serveftp.org/wiki/index.php/FAQ:Link
41 /* regs (r) : ORIGIN = 0x0000, LENGTH = 0x0800 /* 2k register space DON'T use! */
42 eeprom (r) : ORIGIN = 0x0800, LENGTH = 0x0800 /* 2K of eeprom for now, 4K requires paging */
44 /* RAM space split up for tuning and flash burning use as well as GP use */
45 rpage (rw) : ORIGIN = 0x1000, LENGTH = 0x1000 /* 4k WINDOW for large tables etc */
46 txbuf (rw) : ORIGIN = 0x2000, LENGTH = 0x0820 /* ~2k FIXED transmission buffer */
47 rxbuf (rw) : ORIGIN = 0x2820, LENGTH = 0x0810 /* ~2k FIXED reception buffer */
48 data (rw) : ORIGIN = 0x3030, LENGTH = 0x0FD0 /* ~4k FIXED general purpose RAM */
49 /* The TX and RX buffers are slightly larger than 2k because the RX buffer */
50 /* needs to also receive a header, checksum and attributes for the data */
51 /* involved and the TX buffer needs to handle all of those two fold. */
53 /* Flash space in linear space while using the page window (16k + 14k + 2k SM = 30k usable, 2k protected) */
54 text1 (rx) : ORIGIN = 0x4000, LENGTH = 0x3800 /* Unpaged 14k flash block before page window */
55 fixedconf1 (rx) : ORIGIN = 0x7800, LENGTH = 0x0400 /* Unpaged 1K flash block before page window */
56 fixedconf2 (rx) : ORIGIN = 0x7C00, LENGTH = 0x0400 /* Unpaged 1K flash block before page window */
57 /*ppaged (rx) : ORIGIN = 0x8000, LENGTH = 0x4000 16K flash page window, DO NOT USE */
58 text (rx) : ORIGIN = 0xC000, LENGTH = 0x3710 /* Unpaged 14K flash block after page window minus serial monitor and vector space */
59 /* TODO split the above text and text1 regions into halves or similar to allow us to know how the linear space is being spent, eg perf/required/isr etc */
61 /* These are correct as of the 0.0.17 release */
62 ppageE0 (rx) : ORIGIN = 0x390000, LENGTH = 0x4000
63 ppageE1 (rx) : ORIGIN = 0x394000, LENGTH = 0x4000
64 ppageE2 (rx) : ORIGIN = 0x398000, LENGTH = 0x4000
65 ppageE3 (rx) : ORIGIN = 0x39C000, LENGTH = 0x4000
66 ppageE4 (rx) : ORIGIN = 0x3A0000, LENGTH = 0x4000
67 ppageE5 (rx) : ORIGIN = 0x3A4000, LENGTH = 0x4000
68 ppageE6 (rx) : ORIGIN = 0x3A8000, LENGTH = 0x4000
69 ppageE7 (rx) : ORIGIN = 0x3AC000, LENGTH = 0x4000
70 ppageE8 (rx) : ORIGIN = 0x3B0000, LENGTH = 0x4000
71 ppageE9 (rx) : ORIGIN = 0x3B4000, LENGTH = 0x4000
72 ppageEA (rx) : ORIGIN = 0x3B8000, LENGTH = 0x4000
73 ppageEB (rx) : ORIGIN = 0x3BC000, LENGTH = 0x4000
74 ppageEC (rx) : ORIGIN = 0x3C0000, LENGTH = 0x4000
75 ppageED (rx) : ORIGIN = 0x3C4000, LENGTH = 0x4000
76 ppageEE (rx) : ORIGIN = 0x3C8000, LENGTH = 0x4000
77 ppageEF (rx) : ORIGIN = 0x3CC000, LENGTH = 0x4000
78 ppageF0 (rx) : ORIGIN = 0x3D0000, LENGTH = 0x4000
79 ppageF1 (rx) : ORIGIN = 0x3D4000, LENGTH = 0x4000
80 ppageF2 (rx) : ORIGIN = 0x3D8000, LENGTH = 0x4000
81 ppageF3 (rx) : ORIGIN = 0x3DC000, LENGTH = 0x4000
82 ppageF4 (rx) : ORIGIN = 0x3E0000, LENGTH = 0x4000
83 ppageF5 (rx) : ORIGIN = 0x3E4000, LENGTH = 0x4000
84 ppageF6 (rx) : ORIGIN = 0x3E8000, LENGTH = 0x4000
85 ppageF7 (rx) : ORIGIN = 0x3EC000, LENGTH = 0x4000
86 ppageF8 (rx) : ORIGIN = 0x3F0000, LENGTH = 0x4000
87 fpageF9 (rx) : ORIGIN = 0x3F4000, LENGTH = 0x2000
88 dpageF9 (rx) : ORIGIN = 0x3F6000, LENGTH = 0x2000
89 fpageFA (rx) : ORIGIN = 0x3F8000, LENGTH = 0x2000
90 dpageFA (rx) : ORIGIN = 0x3FA000, LENGTH = 0x2000
91 fpageFB (rx) : ORIGIN = 0x3FC000, LENGTH = 0x2000
92 dpageFB1 (rx) : ORIGIN = 0x3FE000, LENGTH = 0x0400
93 dpageFB2 (rx) : ORIGIN = 0x3FE400, LENGTH = 0x0400
94 dpageFB3 (rx) : ORIGIN = 0x3FE800, LENGTH = 0x0400
95 dpageFB4 (rx) : ORIGIN = 0x3FEC00, LENGTH = 0x0400
96 dpageFB5 (rx) : ORIGIN = 0x3FF000, LENGTH = 0x0400
97 dpageFB6 (rx) : ORIGIN = 0x3FF400, LENGTH = 0x0400
98 dpageFB7 (rx) : ORIGIN = 0x3FF800, LENGTH = 0x0400
99 dpageFB8 (rx) : ORIGIN = 0x3FFC00, LENGTH = 0x0400
100 fpageFC (rx) : ORIGIN = 0x400000, LENGTH = 0x2000
101 dpageFC (rx) : ORIGIN = 0x402000, LENGTH = 0x2000
102 ppageFE (rx) : ORIGIN = 0x408000, LENGTH = 0x4000 /* Represents 0x8000 - 0xC000 ("text2" paged) */
103 /* ppageFD (rx) : ORIGIN = 0x404000, LENGTH = 0x4000 ** Represents 0x4000 - 0x8000 ("text1" paged) */
104 /* ppageFF (rx) : ORIGIN = 0x40C000, LENGTH = 0x3710 ** Represents 0xC000 - 0xFFFF ("text" paged) */
105 /* The previous two lines are included for clarity only. */
106 /* Changes to this file should be reflected in memory.h and Makefile also */
109 PROVIDE (_stack = 0x4000-1); /* Start the stack immediately after ram */
110 /* Vectors are located via the linker command line, not here. */