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: Debugging in resource limited environment


On Mon, 2003-08-11 at 09:45, Robert Cragie wrote:
> I have a system built on an OpenRISC CPU in an FPGA where the amount of
> memory I have is very limited (i.e. 64K for code and data). I want to be
> able to debug the application but cannot afford to have Redboot running
> separately and downloading on top of it, so I want to be able to combine the
> GDB stubs in with the application. Downloading isn't an issue as the RAM is
> dual-ported and can be written to by the host PC in which the target board
> sits.
> 
> Some questions which therefore spring to mind are:
> 
> 1) How should I configure the target application? At the moment I'm doing a
> RAM build and adding in GDB stubs, but saying that I am neither a ROM
> monitor, nor do I want to run with a ROM monitor. Is this OK?
> 
> 2) The application as configured above runs fine and drops into
> cyg_user_start() OK, and I see a '+' coming out from the serial port. But
> how to then debug it - are the debug serial ports interrupt driven, i.e.
> should it just work?
> 
> 3) How do I 'attach' to the already running application and stop it somehow
> so I can single step/ set breakpoints etc.?
> 
> 4) What do I have to do to GDB to stop it downloading?
> 
> I kind of feel I'm on the right track and have debugged RAM builds
> downloading and debugging via a JTAG ICE before but not using built-in GDB
> stubs in an environment where the code is already effectively downloaded, so
> I was wondering if I'm on the right track.
> 

It looks close to me - you're going about this the right way.
What should happen is that once your system/application/program gets
fully initialized, it should execute a "breakpoint" instruction and
you should drop immediately into GDB mode.  If this is not happening,
that would be the first place to look.
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
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]