d50c190957
* moving folders and files and adjust server demo build * Fix Makefile for apps/server on Linux * fix unit test source file folders * fix datetime convert UTC functions. Add Code::Blocks project for datetime testing * added some ignore extensions * disable parallel make option * fix build for abort, dcc, and epics apps * fix build for dcc, epics, error, and getevent apps. * Fixed building of all apps * fix the ipv4 to ipv6 router app build * Change indent style from Google to Webkit * make pretty to re-format style * removed common Makefile since we already had one and two was too many * remove scripts from root folder that are no longer maintained or used * remove mercurial EOL and ignore files for git repo * remove .vscodeconfig files from repo * tweak clang-format style * clang-format src and apps with tweaked style * added clang-tidy to fix readability if braces in src * result of make tidy for src and apps * fix clang-tidy mangling * Added code::blocks project for BACnet server simulation * added code::blocks linux project for WhoIs app * update text files for EOL * fix EOL in some files * fixed make win32 apps for older gcc * Removed Borland C++ Makefile in apps. Unable to maintain support for Borland C++ compiler. * created codeblocks project for apps/epics for Windows * fixing ports/xplained to work with new data structure. * fix ports/xplained example for Atmel Studio compile * fix ports/stm32f10x example for gcc Makefile compile * fix ports/stm32f10x example for IAR EWARM compile * fix ports/xplained timer callback * fix ports/bdk_atxx_mspt build with subdirs * fix ports/bdk_atxx_mspt build with subdirs * updated git ignore for IAR build artifacts * updated gitignore for non-tracked files and folders * fixed bdk-atxx4-mstp port for Rowley Crossworks project file * fixed bdk-atxx4-mstp port for GCC AVR Makefile * fixed atmega168 port for IAR AVR and GCC AVR Makefile * fixed at91sam7s port for IAR ARM and GCC ARM Makefile * removed unmaintainable DOS, RTOS32, and atmega8 ports. Updated rx62n (untested). * changed arm7 to uip port
157 lines
13 KiB
Plaintext
157 lines
13 KiB
Plaintext
/* ****************************************************************************************************** */
|
|
/* LINKER SCRIPT */
|
|
/* */
|
|
/* */
|
|
/* The Linker Script defines how the code and data emitted by the GNU C compiler and assembler are */
|
|
/* to be loaded into memory (code goes into FLASH, variables go into RAM). */
|
|
/* */
|
|
/* Any symbols defined in the Linker Script are automatically global and available to the rest of the */
|
|
/* program. */
|
|
/* */
|
|
/* To force the linker to use this LINKER SCRIPT, just add the -T AT91SAM7S256.LD */
|
|
/* directive to the linker flags in the makefile. For example, */
|
|
/* */
|
|
/* LFLAGS = -Map main.map -nostartfiles -T AT91SAM7S256.LD */
|
|
/* */
|
|
/* */
|
|
/* The order that the object files are listed in the makefile determines what .text section is */
|
|
/* placed first. */
|
|
/* */
|
|
/* For example: $(LD) $(LFLAGS) -o main.out crt.o main.o lowlevelinit.o */
|
|
/* */
|
|
/* crt.o is first in the list of objects, so it will be placed at address 0x00000000 */
|
|
/* */
|
|
/* */
|
|
/* The top of the stack (_stack_end) is (last_byte_of_ram +1) - 4 */
|
|
/* */
|
|
/* Therefore: _stack_end = (0x00020FFFF + 1) - 4 = 0x00210000 - 4 = 0x0020FFFC */
|
|
/* Therefore: _stack_end = (0x000203FFF + 1) - 4 = 0x00204000 - 4 = 0x00203FFC */
|
|
/* */
|
|
/* Note that this symbol (_stack_end) is automatically GLOBAL and will be used by the crt.s */
|
|
/* startup assembler routine to specify all stacks for the various ARM modes */
|
|
/* */
|
|
/* MEMORY MAP */
|
|
/* | | */
|
|
/* .-------->|---------------------------------|0x00210000 */
|
|
/* . | |0x0020FFFC <---------- _stack_end */
|
|
/* . | UDF Stack 16 bytes | */
|
|
/* . | | */
|
|
/* . |---------------------------------|0x0020FFEC */
|
|
/* . | | */
|
|
/* . | ABT Stack 16 bytes | */
|
|
/* . | | */
|
|
/* . |---------------------------------|0x0020FFDC */
|
|
/* . | | */
|
|
/* . | | */
|
|
/* . | FIQ Stack 128 bytes | */
|
|
/* . | | */
|
|
/* . | | */
|
|
/* RAM |---------------------------------|0x0020FF5C */
|
|
/* . | | */
|
|
/* . | | */
|
|
/* . | IRQ Stack 128 bytes | */
|
|
/* . | | */
|
|
/* . | | */
|
|
/* . |---------------------------------|0x0020FEDC */
|
|
/* . | | */
|
|
/* . | SVC Stack 16 bytes | */
|
|
/* . | | */
|
|
/* . |---------------------------------|0x0020FECC */
|
|
/* . | | */
|
|
/* . | stack area for user program | */
|
|
/* . | | */
|
|
/* . | | */
|
|
/* . | | */
|
|
/* . | free ram | */
|
|
/* . | | */
|
|
/* . |.................................|0x002006D8 <---------- _bss_end */
|
|
/* . | | */
|
|
/* . | .bss uninitialized variables | */
|
|
/* . |.................................|0x002006D0 <---------- _bss_start, _edata */
|
|
/* . | | */
|
|
/* . | .data initialized variables | */
|
|
/* . | | */
|
|
/* .-------->|_________________________________|0x00200000 */
|
|
/* */
|
|
/* */
|
|
/* .-------->|---------------------------------|0x00100000 */
|
|
/* . | | */
|
|
/* . | | */
|
|
/* . | free flash | */
|
|
/* . | | */
|
|
/* . | | */
|
|
/* . |.................................|0x000006D0 <---------- _bss_start, _edata */
|
|
/* . | | */
|
|
/* . | .data initialized variables | */
|
|
/* . | | */
|
|
/* . |---------------------------------|0x000006C4 <----------- _etext */
|
|
/* . | | */
|
|
/* . | C code | */
|
|
/* . | | */
|
|
/* . | | */
|
|
/* . |---------------------------------|0x00000118 main() */
|
|
/* . | | */
|
|
/* . | Startup Code (crt.s) | */
|
|
/* . | (assembler) | */
|
|
/* . | | */
|
|
/* . |---------------------------------|0x00000020 */
|
|
/* . | | */
|
|
/* . | Interrupt Vector Table | */
|
|
/* . | 32 bytes | */
|
|
/* .-------->|---------------------------------|0x00000000 _vec_reset */
|
|
/* */
|
|
/* */
|
|
/* Author: James P. Lynch May 12, 2007 */
|
|
/* */
|
|
/* ****************************************************************************************************** */
|
|
|
|
|
|
/* identify the Entry Point (_vec_reset is defined in file crt.s) */
|
|
ENTRY(_vec_reset)
|
|
|
|
/* specify the AT91SAM7S64 memory areas */
|
|
MEMORY
|
|
{
|
|
flash : ORIGIN = 0, LENGTH = 64K /* FLASH EPROM */
|
|
ram : ORIGIN = 0x00200000, LENGTH = 16K /* static RAM area */
|
|
}
|
|
|
|
|
|
/* define a global symbol _stack_end (see analysis in annotation above) */
|
|
/*_stack_end = 0x20FFFC;*/
|
|
_stack_end = 0x203FFC;
|
|
|
|
/* now define the output sections */
|
|
SECTIONS
|
|
{
|
|
. = 0; /* set location counter to address zero */
|
|
|
|
.text : /* collect all sections that should go into FLASH after startup */
|
|
{
|
|
*(.text*) /* all .text sections (code) */
|
|
*(.rodata) /* all .rodata sections (constants, strings, etc.) */
|
|
*(.rodata*) /* all .rodata* sections (constants, strings, etc.) */
|
|
*(.glue_7) /* all .glue_7 sections (no idea what these are) */
|
|
*(.glue_7t) /* all .glue_7t sections (no idea what these are) */
|
|
_etext = .; /* define a global symbol _etext just after the last code byte */
|
|
} >flash /* put all the above into FLASH */
|
|
|
|
.data : /* collect all initialized .data sections that go into RAM */
|
|
{
|
|
_data = .; /* create a global symbol marking the start of the .data section */
|
|
*(.data*) /* all .data sections */
|
|
_edata = .; /* define a global symbol marking the end of the .data section */
|
|
} >ram AT >flash /* put all the above into RAM (but load the LMA initializer copy into FLASH) */
|
|
|
|
.bss : /* collect all uninitialized .bss sections that go into RAM */
|
|
{
|
|
_bss_start = .; /* define a global symbol marking the start of the .bss section */
|
|
*(.bss*) /* all .bss sections */
|
|
} >ram /* put all the above in RAM (it will be cleared in the startup code */
|
|
|
|
. = ALIGN(4); /* advance location counter to the next 32-bit boundary */
|
|
_bss_end = . ; /* define a global symbol marking the end of the .bss section */
|
|
}
|
|
_end = .; /* define a global symbol marking the end of application RAM */
|
|
|