Use stack-def.h.
[gnuk/neug.git] / src / neug.ld.in
index c1881cc..e486c7b 100644 (file)
@@ -1,12 +1,6 @@
 /*
  * ST32F103 memory setup.
  */
-__main_stack_size__      = 0x0080;      /* Exception handlers     */
-__process0_stack_size__  = 0x0140;      /* main */
-__process1_stack_size__  = 0x00c0;      /* led */
-__process2_stack_size__  = 0x0180;      /* rng */
-__process3_stack_size__  = 0x0140;      /* intr: usb */
-
 MEMORY
 {
     flash0 : org = @ORIGIN@, len = 4k
@@ -81,26 +75,12 @@ SECTIONS
     .stacks :
     {
         . = ALIGN(8);
-        __main_stack_base__ = .;
-        . += __main_stack_size__;
-        . = ALIGN(8);
-        __main_stack_end__ = .;
-        __process0_stack_base__ = .;
-        . += __process0_stack_size__;
-        . = ALIGN(8);
-        __process0_stack_end__ = .;
-        __process1_stack_base__ = .;
-        . += __process1_stack_size__;
-        . = ALIGN(8);
-        __process1_stack_end__ = .;
-        __process2_stack_base__ = .;
-        . += __process2_stack_size__;
-        . = ALIGN(8);
-        __process2_stack_end__ = .;
-        __process3_stack_base__ = .;
-        . += __process3_stack_size__;
+        *(.main_stack)
+        *(.process_stack.0)
+        *(.process_stack.1)
+        *(.process_stack.2)
+        *(.process_stack.3)
         . = ALIGN(8);
-        __process3_stack_end__ = .;
     } > ram
 
     .data :