File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
11
11
12
12
- Main function no longer needs to be close to _ start. A linker script may copy
13
13
all code to RAM and keep .init in flash/ROM.
14
+ - By default, the stack is now split into equal parts based on the number of
15
+ harts.
14
16
15
17
### Fixed
16
18
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ ${INCLUDE_LINKER_FILES}
72
72
PROVIDE(_stext = ORIGIN(REGION_TEXT));
73
73
PROVIDE(_stack_start = ORIGIN(REGION_STACK) + LENGTH(REGION_STACK));
74
74
PROVIDE(_max_hart_id = 0);
75
- PROVIDE(_hart_stack_size = 2K );
75
+ PROVIDE(_hart_stack_size = SIZEOF(.stack) / (_max_hart_id + 1) );
76
76
PROVIDE(_heap_size = 0);
77
77
78
78
SECTIONS
Original file line number Diff line number Diff line change 90
90
//!
91
91
//! This symbol defines stack area size for *one* hart.
92
92
//!
93
- //! If omitted this symbol value will default to 2K.
93
+ //! If omitted this symbol value will default to `SIZEOF(.stack) / (_max_hart_id + 1)`.
94
+ //!
95
+ //! Note that due to alignment, each individual stack may differ slightly in
96
+ //! size.
94
97
//!
95
98
//! ### `_stack_start`
96
99
//!
You can’t perform that action at this time.
0 commit comments