Skip to content

Commit c9b0cc9

Browse files
committed
8.0.4
1 parent c37ee55 commit c9b0cc9

File tree

331 files changed

+15926
-31509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+15926
-31509
lines changed

arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,31 @@ PROJECT := blinky-qk
5555
#
5656

5757
# location of the QP/C framework (if not provided in an environment var.)
58-
ifeq ($(QPC),)
59-
QPC := ../../../../..
58+
ifeq ($(QP),)
59+
QP := ../../../../..
6060
endif
6161

6262
# QP port used in this project
63-
QP_PORT_DIR := $(QPC)/ports/arm-cm/qk/gnu
63+
QP_PORT_DIR := $(QP)/ports/arm-cm/qk/gnu
6464

6565
# list of all source directories used by this project
6666
VPATH = \
6767
.. \
6868
../.. \
69-
$(QPC)/src/qf \
70-
$(QPC)/src/qk \
71-
$(QPC)/src/qs \
69+
$(QP)/src/qf \
70+
$(QP)/src/qk \
71+
$(QP)/src/qs \
7272
$(QP_PORT_DIR) \
73-
$(QPC)/3rd_party/ek-tm4c123gxl \
74-
$(QPC)/3rd_party/ek-tm4c123gxl/gnu
73+
$(QP)/3rd_party/ek-tm4c123gxl \
74+
$(QP)/3rd_party/ek-tm4c123gxl/gnu
7575

7676
# list of all include directories needed by this project
7777
INCLUDES = \
7878
-I../.. \
79-
-I$(QPC)/include \
79+
-I$(QP)/include \
8080
-I$(QP_PORT_DIR) \
81-
-I$(QPC)/3rd_party/CMSIS/Include \
82-
-I$(QPC)/3rd_party/ek-tm4c123gxl
81+
-I$(QP)/3rd_party/CMSIS/Include \
82+
-I$(QP)/3rd_party/ek-tm4c123gxl
8383

8484
#-----------------------------------------------------------------------------
8585
# files
@@ -164,18 +164,19 @@ BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy
164164
##############################################################################
165165
# Typically, you should not need to change anything below this line
166166

167-
# basic utilities (included in Qtools for Windows), see:
168-
# http://sourceforge.net/projects/qpc/files/Qtools
167+
# basic utilities (included in QTools for Windows), see:
168+
# https://www.state-machine.com/qtools
169169

170170
MKDIR := mkdir
171171
RM := rm
172172

173173
#-----------------------------------------------------------------------------
174-
# build options for various configurations for ARM Cortex-M4F
174+
# build options for various configurations for ARM Cortex-M
175175
#
176176

177177
# combine all the sources...
178-
C_SRCS += $(QP_SRCS)
178+
C_SRCS += $(QP_SRCS)
179+
C_SRCS += syscalls.c
179180
ASM_SRCS += $(QP_ASMS)
180181

181182
ifeq (rel, $(CONF)) # Release configuration ..................................
@@ -186,11 +187,11 @@ ASFLAGS = $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU)
186187

187188
CFLAGS = -c $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
188189
-ffunction-sections -fdata-sections \
189-
-O1 $(INCLUDES) $(DEFINES) -DNDEBUG
190+
-O2 $(INCLUDES) $(DEFINES) -DNDEBUG
190191

191192
CPPFLAGS = -c $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
192193
-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \
193-
-O1 $(INCLUDES) $(DEFINES) -DNDEBUG
194+
-O2 $(INCLUDES) $(DEFINES) -DNDEBUG
194195

195196
else ifeq (spy, $(CONF)) # Spy configuration ................................
196197

@@ -229,7 +230,6 @@ LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
229230
-specs=nosys.specs -specs=nano.specs \
230231
-Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
231232

232-
233233
ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
234234
C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
235235
CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
@@ -251,14 +251,20 @@ endif
251251
# rules
252252
#
253253

254-
all: $(TARGET_BIN)
255-
#all: $(TARGET_ELF)
254+
.PHONY : run norun flash
255+
256+
ifeq ($(MAKECMDGOALS),norun)
257+
all : $(TARGET_BIN)
258+
norun : all
259+
else
260+
all : $(TARGET_BIN) run
261+
endif
256262

257263
$(TARGET_BIN): $(TARGET_ELF)
258264
$(BIN) -O binary $< $@
259265

260266
$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
261-
$(CC) $(CFLAGS) $(QPC)/src/qs/qstamp.c -o $(BIN_DIR)/qstamp.o
267+
$(CC) $(CFLAGS) $(QP)/src/qs/qstamp.c -o $(BIN_DIR)/qstamp.o
262268
$(LINK) $(LINKFLAGS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS)
263269

264270
$(BIN_DIR)/%.d : %.c
@@ -276,6 +282,8 @@ $(BIN_DIR)/%.o : %.c
276282
$(BIN_DIR)/%.o : %.cpp
277283
$(CPP) $(CPPFLAGS) $< -o $@
278284

285+
.PHONY : clean show
286+
279287
# include dependency files only if our goal depends on their existence
280288
ifneq ($(MAKECMDGOALS),clean)
281289
ifneq ($(MAKECMDGOALS),show)
@@ -284,7 +292,6 @@ ifneq ($(MAKECMDGOALS),clean)
284292
endif
285293

286294

287-
.PHONY : clean
288295
clean:
289296
-$(RM) $(BIN_DIR)/*.o \
290297
$(BIN_DIR)/*.d \

arm-cm/blinky_ek-tm4c123gxl/qk/gnu/blinky-qk.ld

Lines changed: 92 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,30 @@
11
/*****************************************************************************
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
2+
* Linker script for EK-TM4C123GXL, GNU-ARM linker
53
*
6-
* Q u a n t u m L e a P s
7-
* ---------------------------
8-
* innovating embedded systems
4+
* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
95
*
10-
* Copyright (C) Quantum Leaps, LLC. All rights reserved.
6+
* Q u a n t u m L e a P s
7+
* ------------------------
8+
* Modern Embedded Software
119
*
12-
* This program is open source software: you can redistribute it and/or
13-
* modify it under the terms of the GNU General Public License as published
14-
* by the Free Software Foundation, either version 3 of the License, or
15-
* (at your option) any later version.
10+
* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
1611
*
17-
* Alternatively, this program may be distributed and modified under the
18-
* terms of Quantum Leaps commercial licenses, which expressly supersede
19-
* the GNU General Public License and are specifically designed for
20-
* licensees interested in retaining the proprietary status of their code.
12+
* This software is dual-licensed under the terms of the open-source GNU
13+
* General Public License (GPL) or under the terms of one of the closed-
14+
* source Quantum Leaps commercial licenses.
2115
*
22-
* This program is distributed in the hope that it will be useful,
23-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25-
* GNU General Public License for more details.
16+
* Redistributions in source code must retain this top-level comment block.
17+
* Plagiarizing this software to sidestep the license obligations is illegal.
2618
*
27-
* You should have received a copy of the GNU General Public License
28-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
* NOTE:
20+
* The GPL does NOT permit the incorporation of this code into proprietary
21+
* programs. Please contact Quantum Leaps for commercial licensing options,
22+
* which expressly supersede the GPL and are designed explicitly for
23+
* closed-source distribution.
2924
*
30-
* Contact information:
31-
* Web : http://www.state-machine.com
32-
25+
* Quantum Leaps contact information:
26+
* <www.state-machine.com/licensing>
27+
3328
*****************************************************************************/
3429
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
3530
OUTPUT_ARCH(arm)
@@ -47,87 +42,131 @@ STACK_SIZE = 2048;
4742
HEAP_SIZE = 0;
4843

4944
SECTIONS {
50-
51-
.isr_vector : { /* the vector table goes FIRST into ROM */
52-
KEEP(*(.isr_vector)) /* vector table */
45+
/* Startup code into ROM type memory */
46+
.isr_vector : {
47+
. = ALIGN(4);
48+
KEEP(*(.isr_vector)) /* Startup code */
5349
. = ALIGN(4);
5450
} >ROM
5551

56-
.text : { /* code and constants */
52+
/* The program code and other data into ROM type memory */
53+
.text : {
5754
. = ALIGN(4);
5855
*(.text) /* .text sections (code) */
5956
*(.text*) /* .text* sections (code) */
60-
*(.rodata) /* .rodata sections (constants, strings, etc.) */
61-
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
57+
*(.glue_7) /* glue arm to thumb code */
58+
*(.glue_7t) /* glue thumb to arm code */
59+
*(.eh_frame)
6260

6361
KEEP (*(.init))
6462
KEEP (*(.fini))
6563

6664
. = ALIGN(4);
65+
_etext = .; /* define a global symbols at end of code */
66+
} >ROM
67+
68+
/* Constant data into ROM type memory */
69+
.rodata : {
70+
. = ALIGN(4);
71+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
72+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
73+
. = ALIGN(4);
74+
} >ROM
75+
76+
/* NOTE:
77+
* The "READONLY" keyword is only supported in GCC11 and later,
78+
* remove it if using GCC10 or earlier.
79+
*/
80+
.ARM.extab (READONLY) : {
81+
. = ALIGN(4);
82+
*(.ARM.extab* .gnu.linkonce.armextab.*)
83+
. = ALIGN(4);
84+
} >ROM
85+
86+
.ARM (READONLY) : {
87+
. = ALIGN(4);
88+
__exidx_start = .;
89+
*(.ARM.exidx*)
90+
__exidx_end = .;
91+
. = ALIGN(4);
6792
} >ROM
6893

69-
.preinit_array : {
94+
.preinit_array (READONLY) : {
95+
. = ALIGN(4);
7096
PROVIDE_HIDDEN (__preinit_array_start = .);
7197
KEEP (*(.preinit_array*))
7298
PROVIDE_HIDDEN (__preinit_array_end = .);
99+
. = ALIGN(4);
73100
} >ROM
74101

75-
.init_array : {
102+
.init_array (READONLY) : {
103+
. = ALIGN(4);
76104
PROVIDE_HIDDEN (__init_array_start = .);
77105
KEEP (*(SORT(.init_array.*)))
78106
KEEP (*(.init_array*))
79107
PROVIDE_HIDDEN (__init_array_end = .);
108+
. = ALIGN(4);
80109
} >ROM
81110

82-
.fini_array : {
111+
.fini_array (READONLY) : {
112+
. = ALIGN(4);
83113
PROVIDE_HIDDEN (__fini_array_start = .);
84-
KEEP (*(.fini_array*))
85114
KEEP (*(SORT(.fini_array.*)))
115+
KEEP (*(.fini_array*))
86116
PROVIDE_HIDDEN (__fini_array_end = .);
117+
. = ALIGN(4);
87118
} >ROM
88119

89-
_etext = .; /* global symbols at end of code */
90-
120+
/* RAM ------------------------------------------------------------*/
91121
.stack : {
122+
. = ALIGN(8);
92123
__stack_start__ = .;
93124
. = . + STACK_SIZE;
94125
. = ALIGN(4);
95126
__stack_end__ = .;
127+
. = ALIGN(8);
96128
} >RAM
97129

98-
.data : AT (_etext) {
99-
__data_load = LOADADDR (.data);
100-
__data_start = .;
130+
/* Used by the startup to initialize data */
131+
__data_load = LOADADDR(.data);
132+
133+
/* Initialized data sections into "RAM" Ram type memory */
134+
.data : {
135+
. = ALIGN(4);
136+
__data_start = .; /* create a global symbol at data start */
101137
*(.data) /* .data sections */
102138
*(.data*) /* .data* sections */
139+
*(.RamFunc) /* .RamFunc sections */
140+
*(.RamFunc*) /* .RamFunc* sections */
103141
. = ALIGN(4);
104-
__data_end__ = .;
142+
__data_end__ = .; /* define a global symbol at data end */
105143
_edata = __data_end__;
106-
} >RAM
144+
} >RAM AT> ROM
107145

146+
/* Uninitialized data section into "RAM" Ram type memory */
147+
. = ALIGN(4);
108148
.bss : {
109-
__bss_start__ = .;
149+
/* This is used by the startup in order to initialize the .bss section */
150+
__bss_start__ = .; /* define a global symbol at bss start */
151+
_sbss = __bss_start__;
110152
*(.bss)
111153
*(.bss*)
112154
*(COMMON)
113-
. = ALIGN(4);
114-
_ebss = .; /* define a global symbol at bss end */
115-
__bss_end__ = .;
116-
} >RAM
117155

118-
__exidx_start = .;
119-
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >RAM
120-
__exidx_end = .;
121-
122-
PROVIDE ( end = _ebss );
123-
PROVIDE ( _end = _ebss );
124-
PROVIDE ( __end__ = _ebss );
156+
. = ALIGN(4);
157+
__bss_end__ = .; /* define a global symbol at bss end */
158+
_ebss = __bss_end__;
159+
} >RAM
125160

126161
.heap : {
162+
. = ALIGN(8);
163+
PROVIDE ( end = . );
164+
PROVIDE ( _end = . );
127165
__heap_start__ = .;
128166
. = . + HEAP_SIZE;
129167
. = ALIGN(4);
130168
__heap_end__ = .;
169+
. = ALIGN(8);
131170
} >RAM
132171

133172
/* Remove information from the standard libraries */

0 commit comments

Comments
 (0)