aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/ARMCM3-STM32F103/ch.ld18
-rw-r--r--demos/ARMCM3-STM32F103/chconf.h2
2 files changed, 17 insertions, 3 deletions
diff --git a/demos/ARMCM3-STM32F103/ch.ld b/demos/ARMCM3-STM32F103/ch.ld
index 4d97e7682..f929c0832 100644
--- a/demos/ARMCM3-STM32F103/ch.ld
+++ b/demos/ARMCM3-STM32F103/ch.ld
@@ -23,7 +23,6 @@
*/
__main_stack_size__ = 0x0400;
__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
MEMORY
{
@@ -98,6 +97,21 @@ SECTIONS
_etext = .;
_textdata = _etext;
+ .stacks :
+ {
+ . = ALIGN(8);
+ __main_stack_base__ = .;
+ . += __main_stack_size__;
+ . = ALIGN(8);
+ __main_stack_end__ = .;
+ __process_stack_base__ = .;
+ __main_thread_stack_base__ = .;
+ . += __process_stack_size__;
+ . = ALIGN(8);
+ __process_stack_end__ = .;
+ __main_thread_stack_end__ = .;
+ } > ram
+
.data :
{
PROVIDE(_data = .);
@@ -127,4 +141,4 @@ PROVIDE(end = .);
_end = .;
__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
+__heap_end__ = __ram_end__;
diff --git a/demos/ARMCM3-STM32F103/chconf.h b/demos/ARMCM3-STM32F103/chconf.h
index c9c4c286a..cdf4ee616 100644
--- a/demos/ARMCM3-STM32F103/chconf.h
+++ b/demos/ARMCM3-STM32F103/chconf.h
@@ -395,7 +395,7 @@
* @p panic_msg variable set to @p NULL.
*/
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
-#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#define CH_DBG_ENABLE_STACK_CHECK TRUE
#endif
/**