EmbDev.net

Forum: ARM programming with GCC/GNU tools Problem of debugging without flash


von XuFangbo (Guest)


Rate this post
useful
not useful
Hi

Thanks in advance for reading my post.

I am doing a project with a platform without any flash memory. This 
platform has the AM3517 processor. Before using this platform, I 
simulate it in craneboard. What I did is that I locate all sections to 
ram, Here is my linker scriptfile.

/*********************************************************************** 
********
**
** Sample linker definition file for NP30.
**
************************************************************************ 
********
*/

EXTERN(_start)

ENTRY(_start)


MEMORY
{
   vectors   : org = 0x4020ffc4,   len = 0x003C
   intram    : org = 0x40200040,   len = 0x3800
   sdram     : org = 0x80000000,   len = 0x100000

}

SECTIONS
{
   .boot             : { __BOOT_START = .; *(.boot) __BOOT_END = .; . = 
ALIGN( 4 ); }> vectors

   .startup          : { __BOOT_START = .; *(.boot) __BOOT_END = .; . = 
ALIGN( 4 ); } > intram

   .text             : { __TEXT_START = .; *(.text) __TEXT_END = .; . = 
ALIGN( 4 ); } > sdram

   .rdata            : { __RDATA_START = .; *(.rodata) *(.rodata.str1.2) 
*(.rodata.str1.4) *(.rdata_4) *(.rdata_2) *(.rdata_1) __RDATA_END = .; . 
= ALIGN( 4 ); } > sdram

   .data             : { __DATA_START = .; *(.data_4) *(.data_2) 
*(.data_1) *(.data) __DATA_END = .; . = ALIGN( 4 ); } > sdram

   .bss    (NOLOAD)  : { __BSS_START = .; *(.bss_4) *(.bss_2) *(.bss_1) 
*(.bss) *(COMMON) __BSS_END = .; . = ALIGN( 16384 ); } > sdram

   .mmutable (NOLOAD): { __MMUTABLE_END = .; . += 0x4000; 
__MMUTABLE_START = .; . = ALIGN( 16384 ); } > sdram

   .sysstack         : { __SYSSTACK_END = .; . += 0x200; 
__SYSSTACK_START = .; . = ALIGN( 4 ); } > intram

   .irqstack         : { __IRQSTACK_END = .; . += 0xE0; __IRQSTACK_START 
= .; . = ALIGN( 4 ); } > intram

   .fiqstack         : { __FIQSTACK_END = .; . += 0x80; __FIQSTACK_START 
= .; . = ALIGN( 4 ); } > intram

   .abtstack         : { __ABTSTACK_END = .; . += 0x80; __ABTSTACK_START 
= .; . = ALIGN( 4 ); } > intram

   .svcstack         : { __SVCSTACK_END = .; . += 0x80; __SVCSTACK_START 
= .; . = ALIGN( 4 ); } > intram

   .undstack         : { __UNDSTACK_END = .; . += 0x80; __UNDSTACK_START 
= .; . = ALIGN( 4 ); } > intram

}


However, in the map file, I found that section 
.debug_*,.comment,.attributes are still located to the address which 
starts with 0x00000000, and this is the address where the flash is 
mapped. I add three lines in order to relocate these sections:

   .comment              : { *(.comment) ; . = ALIGN( 4 ); } > sdram

   .attributes     : { *(.ARM.attributes) ; . = ALIGN( 4 ); } > sdram

   .debug                : { *(.debug*) ; . = ALIGN( 4 ); } > sdram

and I Checked the .out file using "file" command, it says "Reading 
symbols from XXX.out, <no debugging symbols found>....done".


Can someone help me? Thanks

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.