This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem about using gdb which is started form redboot


叶晓晖 wrote:
> Thanks for your reply.
> 
> The program is write in the main() function, and is a very simple standalone c program, 
> the link library is the eCos_install generate by eCos configuration tool, the configuration is:
> target: snds, template: minimal, and add with some libc packages.

I don't think the SNDS port has been tested for a while.

> First, I think it's not the problem of download. 
> Because in the process of downloading the following information will upper in the console window:
> Loading section .rom_vectors, size 0x40 lma 0x40000
> Loading section .text, size 0x5898 lma 0x40040
> Loading section .rodata, size 0x4bd lma 0x458d8
> Loading section .data, size 0x534 lma 0x45d98
> Start address 0x40040 , load size 25289
> Transfer rate: 28901 bits/sec, 301 bytes/write.
> 
> The above shows download is correct, and Start address is right.  
> In arm-elf-gdb I can see the downlonding codes is at the right place, from 0x40000, 
> which is consistent with the link library. 
> And from the redboot boot information, it show:
> RAM: 0x00000000-0x00100000, 0x0002fd60-0x00100000 available
> and when I load the bin type codes in redboot, 
> I use the command: load -r -m xmodem -c 0 -b 0x40000,
> then after download is finished, it shows in hyperteminal:
> CRaw file loaded 0x00040000-0x000462cc, assumed entry at 0x00040000
> xyzModem - CRC mode, 199(SOH)/0(STX)/0(CAN) packets, 3 retries
>  
> I also try to set breakpoint in cyg_start function in startup.cxx, but it cannot run to there. 
> As in arm-elf-gdb, run command should first download the elf file and then run to the breakpoint 
> setting in the programme, but in my operation after download the file, all function in arm-elf-gdb 
> cannot respond, and there are no more information in console window except the downloading info.
> 
> When I substitude redboot with stub,

You mean a simple GDB stub program in ROM, as created with ecosconfig new
snds stubs ? Or do you mean stubs included with your application.... I'd
assume the first.

> the elf file can be downloaded and then it can run
> to the breakpoint setting in the main function, the infomation showed in console window is below:
> Loading section .rom_vectors, size 0x40 lma 0x40000
> Loading section .text, size 0x5898 lma 0x40040
> Loading section .rodata, size 0x4bd lma 0x458d8
> Loading section .data, size 0x534 lma 0x45d98
> Start address 0x40040 , load size 25289
> Transfer rate: 25289 bits/sec, 301 bytes/write.
> cyg_libc_invoke_main
> Breakpoint 3, main () at hello.c:8
> 
> So, I don't think it is the problem of the serial port and the program. Have all you 
> ever encountered similar problem? I know something is wrong but I cannot know which, 
> Can you give me more hint?

Haven't seen it before - it's almost certain to be some issue with your
particular port then. Try setting a breakpoint just a few instructions
after 0x40040.  Also consider trying with command-line GDB. It's not the
first time Insight has frozen for no reason (I don't know what version
you're using, but it doesn't matter). With what you report with the
different behaviour of stubs that seems unlikely, but that run may have
been a coincidence.

Jifl
-- 
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]