File tree Expand file tree Collapse file tree 4 files changed +4
-19
lines changed Expand file tree Collapse file tree 4 files changed +4
-19
lines changed Original file line number Diff line number Diff line change 2
2
%% macro copyright()
3
3
/*
4
4
* Copyright (c) 2011-2012, 2019, Fabian Greif
5
- * Copyright (c) 2012, 2015-2021 , Niklas Hauser
5
+ * Copyright (c) 2012, 2015-2022 , Niklas Hauser
6
6
* Copyright (c) 2013, Sascha Schade
7
7
* Copyright (c) 2013, 2015, Kevin Läufer
8
8
*
@@ -40,10 +40,7 @@ __{{memory.name}}_end = ORIGIN({{memory.name|upper}}) + LENGTH({{memory.name|upp
40
40
%% endfor
41
41
%#
42
42
43
- /* The handler stack is used for main program as well as interrupts */
44
- MAIN_STACK_SIZE = {{ options[":platform:cortex-m:main_stack_size"] }};
45
- PROCESS_STACK_SIZE = {{ process_stack_size }};
46
- TOTAL_STACK_SIZE = MAIN_STACK_SIZE + PROCESS_STACK_SIZE;
43
+ MAIN_STACK_SIZE = {{ options[":platform:cortex-m:main_stack_size"] }};
47
44
%% endmacro
48
45
49
46
@@ -85,10 +82,6 @@ TOTAL_STACK_SIZE = MAIN_STACK_SIZE + PROCESS_STACK_SIZE;
85
82
. = ALIGN(8);
86
83
__main_stack_top = .;
87
84
88
- . += PROCESS_STACK_SIZE;
89
- . = ALIGN(8);
90
- __process_stack_top = .;
91
-
92
85
__stack_end = .;
93
86
} >{{memory}}
94
87
%% endmacro
Original file line number Diff line number Diff line change @@ -123,7 +123,6 @@ def common_linkerscript(env):
123
123
Computes linkerscript properties
124
124
(\\ * *post-build only*):
125
125
126
- - `process_stack_size`: largest requested process stack size by any module
127
126
- `vector_table_location`: ram or rom
128
127
129
128
Stripped and newline-joined collector values of:
@@ -146,8 +145,6 @@ def common_linkerscript(env):
146
145
:returns: dictionary of linkerscript properties
147
146
"""
148
147
properties = {
149
- "process_stack_size" :
150
- max (env .collector_values (":platform:cortex-m:linkerscript.process_stack_size" , 0 )),
151
148
"vector_table_location" :
152
149
common_vector_table_location (env ),
153
150
@@ -254,11 +251,6 @@ def prepare(module, options):
254
251
StringCollector (
255
252
name = "linkerscript.table_extern.heap" ,
256
253
description = "Additions to the linkerscript's '.table.heap' section" ))
257
- module .add_collector (
258
- NumericCollector (
259
- name = "linkerscript.process_stack_size" ,
260
- description = "Maximum required size of the process stack" ,
261
- minimum = 0 ))
262
254
263
255
module .add_query (
264
256
EnvironmentQuery (name = "vector_table" , factory = common_vector_table ))
Original file line number Diff line number Diff line change 8
8
9
9
%% if vector_table_location == "ram"
10
10
/* Computes stack offset so that vector table is aligned */
11
- __stack_offset = ALIGN(TOTAL_STACK_SIZE , (1 << LOG2CEIL({{ highest_irq + 16 }})) * 8) - TOTAL_STACK_SIZE ;
11
+ __stack_offset = ALIGN(MAIN_STACK_SIZE , (1 << LOG2CEIL({{ highest_irq + 16 }})) * 8) - MAIN_STACK_SIZE ;
12
12
%#
13
13
%% endif
14
14
Original file line number Diff line number Diff line change 8
8
9
9
%% if vector_table_location == "ram"
10
10
/* Computes stack offset so that vector table is aligned */
11
- __stack_offset = ALIGN(TOTAL_STACK_SIZE , (1 << LOG2CEIL({{ highest_irq + 16 }})) * 8) - TOTAL_STACK_SIZE ;
11
+ __stack_offset = ALIGN(MAIN_STACK_SIZE , (1 << LOG2CEIL({{ highest_irq + 16 }})) * 8) - MAIN_STACK_SIZE ;
12
12
%#
13
13
%% endif
14
14
You can’t perform that action at this time.
0 commit comments