Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: Dangling Pointer !

$
0
0
-stack  0xF000   /*Primary   Stack Size 50KBytes*/ -sysstack 0x0E00   /*Secondary Stack Size 10KBytes*/ -heap  0x6000   /*Run time Heap memory 24KBytes*/ -c                      /* Use C linking conventions: auto-init vars at runtime */ -u _Reset             /* Force load of reset interrupt handler                */ MEMORY {  /*Unified Program and Data Space*/  PAGE 0:    MMRS    (RWIX) : origin = 0x000000, length = 0x0000C0  /*MMR-192 Bytes */    DARAM0  (RWIX) : origin = 0x0000C0, length = 0X00FF40  /*64KBytes-MMRS*/ /*heap and tables*/     SARAM0  (RWIX) : origin = 0x010000, length = 0x00A000  /*  40KB */   /*my heap*/    SARAM1  (RWIX) : origin = 0x01A000, length = 0x026000  /* 152KB */   /*code */    SARAM2  (RWIX) : origin = 0x040000, length = 0x00FE00  /*  63KB */   /*stack*/    VECS    (RWIX) : origin = 0x04FE00, length = 0x000200  /*  512B */   /*IVT*/    /*End of SARAM*/    PDROM   (RIX)  : origin = 0xFE0000, length = 0x010000  /*  64KB */  PAGE 2:  /* -------- 64K-word I/O Address Space -------- */    IOPORT (RWI) : origin = 0x000000, length = 0x020000 } SECTIONS {    .text:  > SARAM1         /*CODE*/      /* Both stacks must be on same physical memory page             */    .stack    >  SARAM2                 /* Primary system stack        */    .sysstack >  SARAM2                  /* Secondary system stack      */     .data     > SARAM0          /* Initialized vars            */    .bss      > DARAM0        /* Global & static vars        */    .const    > DARAM0        /* Constant data               */    .sysmem   > DARAM0          /* Dynamic memory (malloc)     */    .switch   >  DARAM0              /* Switch statement tables     */    .cinit    >  DARAM0                   /* Auto-initialization tables  */    .pinit    >  SARAM0                   /* Initialization fn tables    */    .cio      >  SARAM0                  /* C I/O buffers               */    .args     >  SARAM0                  /* Arguments to main()         */    .vectors: >  VECS           /*Interrrupt Vectors           */    .bootmem: >  DARAM0     .myheap:  >   SARAM0     .ioport   >  IOPORT PAGE 2         /* Global & static ioport vars */ } 

This is the latest linker file,while my stack lies in range of 0x040000 to 0x04fc00 as size of 63KB(isn't this huge)

now when i see the SP using debugger the value is  

0x0277FD(at main) 

SP: 0x027777(into preprocess_analysis() )

SSP: 0x027EEE

why so ? isn't it should be in my SARAM2 region  

i dont think my app requires such a huge stack, what would be the some  else problem, 


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>