| 1 |
27 |
dgisselq |
/*******************************************************************************
|
| 2 |
|
|
*
|
| 3 |
|
|
* Filename: cmodram.ld
|
| 4 |
|
|
*
|
| 5 |
|
|
* Project: Cmod S6 ZipCPU demonstration
|
| 6 |
|
|
*
|
| 7 |
|
|
* Purpose: This script provides a description of the Cmod S6 Zip CPU
|
| 8 |
|
|
* build for the purposes of where to place memory when linking.
|
| 9 |
|
|
*
|
| 10 |
|
|
* This script is different from the cmod.ld script in that this script
|
| 11 |
|
|
* places specific pieces of code into RAM rather than FLASH. This is to
|
| 12 |
|
|
* speed up those particular pieces of code. This script also depends
|
| 13 |
|
|
* upon a bootloader to load the RAM sections into RAM with their initial
|
| 14 |
|
|
* values.
|
| 15 |
|
|
*
|
| 16 |
|
|
* Creator: Dan Gisselquist, Ph.D.
|
| 17 |
|
|
* Gisselquist Technology, LLC
|
| 18 |
|
|
*
|
| 19 |
|
|
********************************************************************************
|
| 20 |
|
|
*
|
| 21 |
|
|
* Copyright (C) 2016, Gisselquist Technology, LLC
|
| 22 |
|
|
*
|
| 23 |
|
|
* This program is free software (firmware): you can redistribute it and/or
|
| 24 |
|
|
* modify it under the terms of the GNU General Public License as published
|
| 25 |
|
|
* by the Free Software Foundation, either version 3 of the License, or (at
|
| 26 |
|
|
* your option) any later version.
|
| 27 |
|
|
*
|
| 28 |
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
| 29 |
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
| 30 |
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
| 31 |
|
|
* for more details.
|
| 32 |
|
|
*
|
| 33 |
|
|
* License: GPL, v3, as defined and found on www.gnu.org,
|
| 34 |
|
|
* http://www.gnu.org/licenses/gpl.html
|
| 35 |
|
|
*
|
| 36 |
|
|
*
|
| 37 |
|
|
*******************************************************************************/
|
| 38 |
|
|
|
| 39 |
|
|
ENTRY(_start)
|
| 40 |
|
|
|
| 41 |
|
|
MEMORY
|
| 42 |
|
|
{
|
| 43 |
|
|
blkram (wx) : ORIGIN = 0x002000, LENGTH = 0x001000
|
| 44 |
|
|
flash (rx) : ORIGIN = 0x400000, LENGTH = 0x400000
|
| 45 |
|
|
}
|
| 46 |
|
|
|
| 47 |
|
|
_top_of_stack = ORIGIN(blkram) + LENGTH(blkram) - 1;
|
| 48 |
|
|
|
| 49 |
|
|
SECTIONS
|
| 50 |
|
|
{
|
| 51 |
|
|
. = 0x0480000;
|
| 52 |
|
|
.rocode 0x0480000 : { *(.start)
|
| 53 |
|
|
obj-zip/bootloader.o(.text)
|
| 54 |
|
|
obj-zip/ksetup.o(.text)
|
| 55 |
|
|
obj-zip/pipesetup.o(.text)
|
| 56 |
|
|
obj-zip/taskp.o(.text)
|
| 57 |
|
|
obj-zip/doorbell.o(.text)
|
| 58 |
|
|
obj-zip/keypad.o(.text)
|
| 59 |
|
|
obj-zip/display.o(.text)
|
| 60 |
|
|
obj-zip/rtcsim.o(.text)
|
| 61 |
|
|
*(.rodata) *(.strings)
|
| 62 |
|
|
load_image_start = . ;
|
| 63 |
|
|
} > flash
|
| 64 |
|
|
.ramcode : {
|
| 65 |
|
|
obj-zip/kernel.o(.text)
|
| 66 |
|
|
obj-zip/syspipe.o(.text)
|
| 67 |
|
|
} > blkram AT> flash
|
| 68 |
|
|
.data : { *(.fixdata) *(.data) *(COMMON)
|
| 69 |
|
|
load_image_end = . ;
|
| 70 |
|
|
} > blkram AT> flash
|
| 71 |
|
|
.bss : { *(.bss) bss_image_end = . ; } > blkram
|
| 72 |
|
|
_top_of_heap = .;
|
| 73 |
|
|
}
|