Use stack-def.h.
[gnuk/neug.git] / src / neug.ld.in
index 03bc471..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__  = 0x01a0;      /* rng */
-__process3_stack_size__  = 0x0100;      /* intr: usb */
-
 MEMORY
 {
     flash0 : org = @ORIGIN@, len = 4k
@@ -30,10 +24,10 @@ SECTIONS
        KEEP(*(.sys.version))
        KEEP(*(.sys.board_id))
        KEEP(*(.sys.board_name))
-       build/sys.o(.text)
-       build/sys.o(.text.*)
-       build/sys.o(.rodata)
-       build/sys.o(.rodata.*)
+       build/sys-*.o(.text)
+       build/sys-*.o(.text.*)
+       build/sys-*.o(.rodata)
+       build/sys-*.o(.rodata.*)
        . = ALIGN(1024);
        *(.sys.0)
        *(.sys.1)
@@ -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 :