-
Notifications
You must be signed in to change notification settings - Fork 6
/
lnk-am33xx.cmd
51 lines (44 loc) · 2.56 KB
/
lnk-am33xx.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/****************************************************************************/
/* LNK.CMD */
/* */
/* Usage: clpru <src files...> -z -o <out file> -m <map file> lnk.cmd */
/* */
/* Description: This file is a sample command file that can be used */
/* for linking programs built with the PRU C */
/* Compiler. Use it as a guideline; you may want to change */
/* the allocation scheme according to the size of your */
/* program and the memory layout of your target system. */
/* */
/* Notes: (1) You must specify the directory in which rts.lib is */
/* located. Either add a "-i<directory>" line to this */
/* file, or use the system environment variable PRU_C_DIR to */
/* specify a search path for libraries. */
/* */
/* */
/****************************************************************************/
-cr /* LINK USING C CONVENTIONS */
-stack 0x0200 /* SOFTWARE STACK SIZE */
-heap 0x0200 /* HEAP AREA SIZE */
/*--args 0x100 */
/* SPECIFY THE SYSTEM MEMORY MAP */
/* memory map for am335x (8K data, 8K code) */
MEMORY
{
PAGE 0:
P_MEM : org = 0x00000000 len = 0x00002000
PAGE 1:
D_MEM : org = 0x00000000 len = 0x00002000
}
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
SECTIONS
{
.bss : {} > D_MEM, PAGE 1 /* GLOBAL & STATIC VARS */
.data : {} > D_MEM, PAGE 1
.sysmem : {} > D_MEM, PAGE 1 /* DYNAMIC MEMORY ALLOCATION AREA */
.stack : {} > D_MEM, PAGE 1 /* SOFTWARE SYSTEM STACK */
.cinit : {} > D_MEM, PAGE 1 /* INITIALIZATION TABLES */
.const : {} > D_MEM, PAGE 1 /* CONSTANT DATA */
.args : {} > D_MEM, PAGE 1
.init_array : {} > D_MEM, PAGE 1 /* C++ CONSTRUCTOR TABLES */
.text : {} > P_MEM, PAGE 0 /* CODE */
}