Index: trunk/softs/soft_sort_giet/Makefile
===================================================================
--- trunk/softs/soft_sort_giet/Makefile	(revision 744)
+++ trunk/softs/soft_sort_giet/Makefile	(revision 810)
@@ -13,6 +13,6 @@
 GIET =	../giet_tsar
 
-bin.soft: $(OBJS) ldscript
-	$(LD) -o $@ -T ldscript $(OBJS)
+bin.soft: $(OBJS) giet.ld
+	$(LD) -o $@ -T giet.ld $(OBJS)
 	$(DU) -D $@ > $@.txt
 
@@ -33,4 +33,7 @@
 	$(DU) -D $@ > $@.txt
 
+giet.ld: giet.ld.in
+	$(CC) -x c -P -E -I. $< -o $@
+
 clean:
-	rm -f *.o bin.soft *.txt core term* temp
+	rm -f *.o bin.soft *.txt core term* temp giet.ld
Index: trunk/softs/soft_sort_giet/giet.ld.in
===================================================================
--- trunk/softs/soft_sort_giet/giet.ld.in	(revision 810)
+++ trunk/softs/soft_sort_giet/giet.ld.in	(revision 810)
@@ -0,0 +1,79 @@
+/**
+ * \file   : giet.ld.in
+ * \author : Cesar Fuguet
+ * \date   : September 19, 2014
+ *
+ * \brief  : giet ldscript template
+ * \note   : must be compiled with gcc to generate an instance
+ */
+
+#include <hard_config.h>
+
+seg_reset_base   = RESET_ADDRESS;           /* boot code                   */
+
+seg_kcode_base   = SEG_RAM_BASE + 0x10000;  /* kernel code                 */
+seg_kdata_base   = SEG_RAM_BASE + 0x20000;  /* kernel cacheable data       */
+seg_kunc_base    = SEG_RAM_BASE + 0x30000;  /* kernel uncacheable data     */
+seg_code_base    = SEG_RAM_BASE + 0x40000;  /* application code            */
+seg_data_base    = SEG_RAM_BASE + 0x50000;  /* application data            */
+seg_heap_base    = SEG_RAM_BASE + 0x100000; /* heaps for applications      */
+seg_stack_base   = SEG_RAM_BASE + 0x300000; /* stacks ifor applications    */
+seg_ramdisk_base = SEG_RAM_BASE + 0x800000; /* virtual disk                */
+
+seg_xcu_base     = SEG_XCU_BASE;            /* controler XCU               */
+seg_tty_base     = SEG_TTY_BASE;            /* controler TTY               */
+seg_fbf_base     = SEG_FBF_BASE;            /* controler FBF               */
+seg_ioc_base     = SEG_IOC_BASE;            /* controler IOC               */
+seg_nic_base     = SEG_NIC_BASE;            /* controler NIC               */
+seg_cma_base     = SEG_CMA_BASE;            /* controler CMA               */
+seg_pic_base     = SEG_PIC_BASE;            /* controler PIC               */
+seg_mmc_base     = SEG_MMC_BASE;            /* config    MMC               */
+
+/* Grouping sections into segments */
+
+ENTRY(reset)
+
+SECTIONS
+{
+   . = seg_kcode_base;
+   seg_kcode : {
+      *(.giet)
+      *(.switch)
+      *(.drivers)
+      *(.isr)
+   }
+   . = seg_kdata_base;
+   seg_kdata : {
+      *(.kdata)
+   }
+   . = seg_kunc_base;
+   seg_kunc : {
+      *(.unckdata)
+   }
+   . = seg_kdata_base;
+   seg_kdata : {
+      *(.ksave)
+   }
+   . = seg_code_base;
+   seg_code : {
+      *(.text)
+   }
+   . = seg_reset_base;
+   seg_reset : {
+      *(.reset)
+   }
+   . = seg_data_base;
+   seg_data : {
+      *(.rodata)
+      . = ALIGN(4);
+      *(.rodata.*)
+      . = ALIGN(4);
+      *(.data)
+      . = ALIGN(4);
+      *(.sdata)
+      . = ALIGN(4);
+      *(.bss)
+      *(COMMON)
+      *(.sbss)
+   }
+}
Index: trunk/softs/soft_sort_giet/hard_config.h
===================================================================
--- trunk/softs/soft_sort_giet/hard_config.h	(revision 744)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*******************************************************************/
-/* This file define various hardware parameters that are used by   */
-/* both the giet_tsar OS and by the hardware (top.cpp file)        */
-/*******************************************************************/
-
-#ifndef _HARD_CONFIG_H
-#define _HARD_CONFIG_H
-
-#define	 X_SIZE              2
-#define	 Y_SIZE              2
-#define	 X_WIDTH             4
-#define	 Y_WIDTH             4
-
-#define	 NB_PROCS_MAX        1
-
-#define  USE_RAMDISK         1
-#define  USE_EXT_IO          0
-
-#define	 NB_DMA_CHANNELS     0
-#define	 NB_HBA_CHANNELS     0
-#define	 NB_NIC_CHANNELS     0
-#define	 NB_CMA_CHANNELS     0
-
-#define	 NB_TTY_CHANNELS     1
-
-#endif //_HARD_CONFIG_H
Index: trunk/softs/soft_sort_giet/ldscript
===================================================================
--- trunk/softs/soft_sort_giet/ldscript	(revision 744)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/**********************************************************
-	File : ldscript 
-	Author : Alain Greiner
-	Date : January 2014
-**********************************************************/
-
-/* definition of the base address for all segments 
-The peripherals base addresses are referenced by the
-software drivers and must be defined, even if the 
-peripherals are not present in the architecture */
-
-seg_reset_base   = 0x00000000;       /* boot code                   */
-
-seg_kcode_base   = 0x00010000;       /* kernel code                 */
-seg_kdata_base   = 0x00020000;       /* kernel cacheable data       */
-seg_kunc_base    = 0x00030000;       /* kernel uncacheable data     */
-
-seg_code_base    = 0x00040000;       /* application code            */ 
-seg_data_base    = 0x00050000;       /* application data            */
-
-seg_heap_base    = 0x00100000;       /* heaps for applications      */
-seg_stack_base   = 0x00300000;       /* stacks ifor applications    */
-
-seg_ramdisk_base = 0x00800000;       /* virtual disk                */
-
-seg_xcu_base     = 0xF0000000;       /* controler XCU               */
-seg_tty_base     = 0xF4000000;       /* controler TTY               */
-seg_fbf_base     = 0xF3000000;       /* controler FBF               */
-seg_ioc_base     = 0xF2000000;       /* controler IOC               */
-seg_nic_base     = 0xF7000000;       /* controler NIC               */
-seg_cma_base     = 0xF8000000;       /* controler CMA               */
-seg_pic_base     = 0xF9000000;       /* controler PIC               */
-seg_mmc_base     = 0xE0000000;       /* config    MMC               */
-
-
-/* Grouping sections into segments */
-
-SECTIONS
-{
-   . = seg_kcode_base;
-   seg_kcode : {
-      *(.giet)
-      *(.switch)
-      *(.drivers)
-      *(.isr)
-   } 
-   . = seg_kdata_base;
-   seg_kdata : {
-      *(.kdata)
-   } 
-   . = seg_kunc_base;
-   seg_kunc : {
-      *(.unckdata)
-   } 
-   . = seg_kdata_base;
-   seg_kdata : {
-      *(.ksave)
-   } 
-   . = seg_code_base;
-   seg_code : {
-      *(.text)
-   } 
-   . = seg_reset_base;
-   seg_reset : {
-      *(.reset)
-   } 
-   . = seg_data_base;
-   seg_data : {
-      *(.rodata)
-      . = ALIGN(4);
-      *(.rodata.*)
-      . = ALIGN(4);
-      *(.data)
-      . = ALIGN(4);
-      *(.sdata)
-      . = ALIGN(4);
-      *(.bss)
-      *(COMMON)
-      *(.sbss)
-   } 
-}
-
