Index: soft/giet_vm/xml/xml_driver.c
===================================================================
--- soft/giet_vm/xml/xml_driver.c	(revision 158)
+++ soft/giet_vm/xml/xml_driver.c	(revision 160)
@@ -20,4 +20,16 @@
 void buildXml( mapping_header_t* header, FILE* fpout)
 {
+
+    const char* 
+    vobj_type[] = 
+    { 
+        "ELF",
+        "PTAB",   //page table 
+        "PERI",   //hardware component
+        "MWMR",   //MWMR channel
+        "LOCK",   //Lock
+        "BUFFER", //Any "no intialiasation needed" objects (stacks...)
+        "BARRIER" //Barrier
+    };
     const char* mode_str[] = { "____",
                                "___U", 
@@ -41,4 +53,5 @@
     unsigned int		pseg_id;
     unsigned int		vseg_id;
+    unsigned int		vobj_id;
     unsigned int		task_id;
 
@@ -47,4 +60,5 @@
     mapping_vspace_t*	vspace;
     mapping_vseg_t*	vseg;
+    mapping_vobj_t*	vobj;
     mapping_task_t*	task;
 
@@ -71,4 +85,12 @@
                                   MAPPING_VSPACE_SIZE*header->vspaces );
 
+    // computes the base adresss for vobjs array, 
+    vobj    = (mapping_vobj_t*)   ((char*)header +
+                                  MAPPING_HEADER_SIZE +
+                                  MAPPING_CLUSTER_SIZE*header->clusters +
+                                  MAPPING_PSEG_SIZE*header->psegs +
+                                  MAPPING_VSPACE_SIZE*header->vspaces +
+                                  MAPPING_VSEG_SIZE*header->vsegs );
+
     // computes the base address for tasks array 
     task    = (mapping_task_t*)   ((char*)header +
@@ -77,4 +99,5 @@
                                   MAPPING_PSEG_SIZE*header->psegs +
                                   MAPPING_VSPACE_SIZE*header->vspaces +
+                                  MAPPING_VOBJ_SIZE*header->vobjs +
                                   MAPPING_VSEG_SIZE*header->vsegs );
 
@@ -89,6 +112,5 @@
     fprintf( fpout, "              ttys      = \"%d\"\n", header->ttys);
     fprintf( fpout, "              vspaces   = \"%d\"\n", header->vspaces);
-    fprintf( fpout, "              globals   = \"%d\"\n", header->globals);
-    fprintf( fpout, "              syspath   = \"%s\" >\n", header->syspath);
+    fprintf( fpout, "              globals   = \"%d\" />\n\n", header->globals);
 
     ///////////////////// clusters ///////////////////////////////////////////////
@@ -124,8 +146,21 @@
         fprintf( fpout, "        <vseg    name     = \"%s\"\n",      vseg[vseg_id].name);
         fprintf( fpout, "                 vbase    = \"0x%x\"\n",    vseg[vseg_id].vbase);
-        fprintf( fpout, "                 length   = \"0x%x\"\n",    vseg[vseg_id].length);
         fprintf( fpout, "                 mode     = \"%s\"\n", mode_str[vseg[vseg_id].mode]);
         fprintf( fpout, "                 psegname = \"%s\"\n",      pseg[pseg_id].name);
-        fprintf( fpout, "                 ident    = \"%d\" />\n\n", vseg[vseg_id].ident);
+        fprintf( fpout, "                 ident    = \"%d\" >\n", vseg[vseg_id].ident);
+            for ( vobj_id = vseg[vseg_id].vobj_offset ;
+                  vobj_id < (vseg[vseg_id].vobj_offset + vseg[vseg_id].vobjs) ; vobj_id++ )
+            {
+                fprintf( fpout, "                 <vobj name     = \"%s\"\n",     vobj[vobj_id].name);
+                fprintf( fpout, "                       type     = \"%s\" \n", vobj_type[vobj[vobj_id].type]);
+                if(vobj[vobj_id].length)
+                    fprintf( fpout, "                       length   = \"0x%x\" \n",   vobj[vobj_id].length);
+                if(vobj[vobj_id].align)
+                    fprintf( fpout, "                       align    = \"%d\" \n",   vobj[vobj_id].align);
+                if(vobj[vobj_id].binpath[0]!='\0')
+                    fprintf( fpout, "                       binpath  = \"%s\" \n",   vobj[vobj_id].binpath);
+                fprintf( fpout, "                       />\n");
+            }
+            fprintf( fpout, "        </vseg>\n\n");
     }
     fprintf( fpout, "    </globalset>\n" );
@@ -136,9 +171,7 @@
     for ( vspace_id = 0 ; vspace_id < header->vspaces ; vspace_id++ )
     {
+        unsigned int func_id = vspace[vspace_id].vobj_offset + vspace[vspace_id].funcs_offset; 
         fprintf( fpout, "        <vspace  name    = \"%s\"\n",     vspace[vspace_id].name); 
-        fprintf( fpout, "                 binpath = \"%s\"\n",     vspace[vspace_id].binpath);
-        fprintf( fpout, "                 vsegs   = \"%d\"\n",     vspace[vspace_id].vsegs);
-        fprintf( fpout, "                 tasks   = \"%d\"\n",     vspace[vspace_id].tasks);
-        fprintf( fpout, "                 mwmrs   = \"%d\"\n",     vspace[vspace_id].mwmrs);
+        fprintf( fpout, "                 funcs   = \"%s\"\n",     vobj[func_id].name); 
         fprintf( fpout, "                 ttys    = \"%d\" >\n\n", vspace[vspace_id].ttys);
 
@@ -150,19 +183,32 @@
             fprintf( fpout, "                 <vseg name      = \"%s\"\n",      vseg[vseg_id].name);
             fprintf( fpout, "                       vbase     = \"0x%x\"\n",    vseg[vseg_id].vbase);
-            fprintf( fpout, "                       length    = \"0x%x\"\n",    vseg[vseg_id].length);
             fprintf( fpout, "                       mode      = \"%s\"\n", mode_str[vseg[vseg_id].mode]);
             fprintf( fpout, "                       psegname  = \"%s\"\n",      pseg[pseg_id].name);
-            fprintf( fpout, "                       mwmr      = \"%d\"\n",      vseg[vseg_id].mwmr);
-            fprintf( fpout, "                       ident     = \"%d\" />\n\n", vseg[vseg_id].ident);
+            fprintf( fpout, "                       ident     = \"%d\" >\n", vseg[vseg_id].ident);
+
+            for ( vobj_id = vseg[vseg_id].vobj_offset ;
+                  vobj_id < (vseg[vseg_id].vobj_offset + vseg[vseg_id].vobjs) ; vobj_id++ )
+            {
+                fprintf( fpout, "\t                 <vobj name     = \"%s\"\n",     vobj[vobj_id].name);
+                fprintf( fpout, "\t                       type     = \"%s\" \n", vobj_type[vobj[vobj_id].type]);
+                if(vobj[vobj_id].length)
+                    fprintf( fpout, "\t                       length   = \"0x%x\" \n",   vobj[vobj_id].length);
+                if(vobj[vobj_id].align)
+                    fprintf( fpout, "\t                       align    = \"%d\" \n",   vobj[vobj_id].align);
+                if(vobj[vobj_id].binpath[0]!='\0')
+                    fprintf( fpout, "\t                       binpath  = \"%s\" \n",   vobj[vobj_id].binpath);
+                fprintf( fpout, "\t                       />\n");
+            }
+            fprintf( fpout, "\t\t        </vseg>\n\n");
         }
         for ( task_id = vspace[vspace_id].task_offset ;
               task_id < (vspace[vspace_id].task_offset + vspace[vspace_id].tasks) ; task_id++ )
         {
-            unsigned int vseg_id = task[task_id].vseglocid + vspace[vspace_id].vseg_offset; 
+            unsigned int vobj_id = task[task_id].vobjlocid + vspace[vspace_id].vobj_offset; 
 
             fprintf( fpout, "                 <task name      = \"%s\"\n",      task[task_id].name);
             fprintf( fpout, "                       clusterid = \"%d\"\n",      task[task_id].clusterid);
             fprintf( fpout, "                       proclocid = \"%d\"\n",      task[task_id].proclocid);
-            fprintf( fpout, "                       stackname = \"%s\"\n",      vseg[vseg_id].name);
+            fprintf( fpout, "                       stackname = \"%s\"\n",      vobj[vobj_id].name);
             fprintf( fpout, "                       startid   = \"%d\"\n",      task[task_id].startid);
             fprintf( fpout, "                       ttylocid  = \"%d\" />\n\n", task[task_id].ttylocid);
