Skip to content

Commit 1133207

Browse files
committed
updated lesson #12
1 parent a036f7c commit 1133207

15 files changed

+5138
-77
lines changed

Diff for: lesson-12/ek-tm4c123gxl/README.txt

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This directory contains the support code for the EK-TM4C123GXL board
2+
(TivaC LauchPad).
3+
4+
The sub-directories contain code that is specific to the particular
5+
ARM toolchains, such as ARM (MDK-ARM), GCC, and IAR.
6+
7+
8+
CMSIS-Compliant Device Files
9+
============================
10+
The code also includes the CMSIS-compliant interface to the TM4C123GH6PM
11+
MCU files:
12+
13+
TM4C123GH6PM.h
14+
system_TM4C123GH6PM.h
15+
system_TM4C123GH6PM.c
16+
arm\startup_TM4C123GH6PM.s
17+
gcc\startup_TM4C123GH6PM.c
18+
iar\startup_TM4C123GH6PM.s
19+
20+
21+
Adjusting the CPU Clock Speed
22+
-----------------------------
23+
The current setting is to run at 50MHz from PLL, but the CPU clock speed
24+
can be modified by editing the file system_TM4C123GH6PM.c.

Diff for: lesson-12/ek-tm4c123gxl/TM4C123GH6PM.h

+1,830
Large diffs are not rendered by default.

Diff for: lesson-12/ek-tm4c123gxl/arm/startup_TM4C123GH6PM.s

+685
Large diffs are not rendered by default.

Diff for: lesson-12/ek-tm4c123gxl/gnu/ek-tm4c123gxl.ld

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/*****************************************************************************
2+
* Product: Linker script for EK-TM4C123GXL, GNU-ARM linker
3+
* Last Updated for Version: 5.9.8
4+
* Date of the Last Update: 2017-09-13
5+
*
6+
* Q u a n t u m L e a P s
7+
* ---------------------------
8+
* innovating embedded systems
9+
*
10+
* Copyright (C) Quantum Leaps, LLC. All rights reserved.
11+
*
12+
*****************************************************************************/
13+
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
14+
OUTPUT_ARCH(arm)
15+
ENTRY(Reset_Handler) /* entry Point */
16+
17+
MEMORY { /* memory map of Tiva TM4C123GH6PM */
18+
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 256K
19+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
20+
}
21+
22+
/* The size of the stack used by the application. NOTE: you need to adjust */
23+
STACK_SIZE = 2048;
24+
25+
/* The size of the heap used by the application. NOTE: you need to adjust */
26+
HEAP_SIZE = 0;
27+
28+
SECTIONS {
29+
30+
.isr_vector : { /* the vector table goes FIRST into ROM */
31+
KEEP(*(.isr_vector)) /* vector table */
32+
. = ALIGN(4);
33+
} >ROM
34+
35+
.text : { /* code and constants */
36+
. = ALIGN(4);
37+
*(.text) /* .text sections (code) */
38+
*(.text*) /* .text* sections (code) */
39+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
40+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
41+
42+
KEEP (*(.init))
43+
KEEP (*(.fini))
44+
45+
. = ALIGN(4);
46+
} >ROM
47+
48+
.preinit_array : {
49+
PROVIDE_HIDDEN (__preinit_array_start = .);
50+
KEEP (*(.preinit_array*))
51+
PROVIDE_HIDDEN (__preinit_array_end = .);
52+
} >ROM
53+
54+
.init_array : {
55+
PROVIDE_HIDDEN (__init_array_start = .);
56+
KEEP (*(SORT(.init_array.*)))
57+
KEEP (*(.init_array*))
58+
PROVIDE_HIDDEN (__init_array_end = .);
59+
} >ROM
60+
61+
.fini_array : {
62+
PROVIDE_HIDDEN (__fini_array_start = .);
63+
KEEP (*(.fini_array*))
64+
KEEP (*(SORT(.fini_array.*)))
65+
PROVIDE_HIDDEN (__fini_array_end = .);
66+
} >ROM
67+
68+
_etext = .; /* global symbols at end of code */
69+
70+
.stack : {
71+
__stack_start__ = .;
72+
. = . + STACK_SIZE;
73+
. = ALIGN(4);
74+
__stack_end__ = .;
75+
} >RAM
76+
77+
.data : AT (_etext) {
78+
__data_load = LOADADDR (.data);
79+
__data_start = .;
80+
*(.data) /* .data sections */
81+
*(.data*) /* .data* sections */
82+
. = ALIGN(4);
83+
__data_end__ = .;
84+
_edata = __data_end__;
85+
} >RAM
86+
87+
.bss : {
88+
__bss_start__ = .;
89+
*(.bss)
90+
*(.bss*)
91+
*(COMMON)
92+
. = ALIGN(4);
93+
_ebss = .; /* define a global symbol at bss end */
94+
__bss_end__ = .;
95+
} >RAM
96+
97+
__exidx_start = .;
98+
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >RAM
99+
__exidx_end = .;
100+
101+
PROVIDE ( end = _ebss );
102+
PROVIDE ( _end = _ebss );
103+
PROVIDE ( __end__ = _ebss );
104+
105+
.heap : {
106+
__heap_start__ = .;
107+
. = . + HEAP_SIZE;
108+
. = ALIGN(4);
109+
__heap_end__ = .;
110+
} >RAM
111+
112+
/* Remove information from the standard libraries */
113+
/DISCARD/ : {
114+
libc.a ( * )
115+
libm.a ( * )
116+
libgcc.a ( * )
117+
}
118+
}

Diff for: lesson-12/ek-tm4c123gxl/gnu/startup_TM4C123GH6PM.c

+447
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)