public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Compiling and linking with ecos libraries and headers
@ 2005-04-10 23:08 Payam Refaeilzadeh
  2005-04-11  8:04 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Payam Refaeilzadeh @ 2005-04-10 23:08 UTC (permalink / raw)
  To: ecos-discuss

I am kind of new to embedded developement using ecos. 
I was trying to compile and run a simple "hello world"
app on a MXLADS board but ran into some problems.  I
was able to compile this just fine and I was able to
load it on the board using gdb, but when I try running
it using the gdb continue command, it freezes on me. 
After disassembling and analyzing the loaded program I
discovered that when I compile and link my program
with the eCos libraries it includes many lines of
warm_reset code before the main method, which I don't
think belong there, and effectively it gets stuck
somewhere in that code, before it even gets to main. 
I am thinking I am not linking the "hello world" code
against the correct eCos libraries.  I have been using
the ecos configuration tool to create the eCos
libraries and I have already tried the "default" and
"all" package template, and have even tried the RAM
startup option hoping that this would get rid of the
warm_reset code, but have had no success.  I can use
GDB to jump to main and single step there, but just
using continue, it gets stuck.
Any thoughts?
Thanks

Payam Refaeilzadeh


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Compiling and linking with ecos libraries and headers
  2005-04-10 23:08 [ECOS] Compiling and linking with ecos libraries and headers Payam Refaeilzadeh
@ 2005-04-11  8:04 ` Gary Thomas
  2005-04-11  9:01   ` Nick Garnett
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2005-04-11  8:04 UTC (permalink / raw)
  To: Payam Refaeilzadeh; +Cc: eCos Discussion

On Sun, 2005-04-10 at 16:08 -0700, Payam Refaeilzadeh wrote: 
> I am kind of new to embedded developement using ecos. 
> I was trying to compile and run a simple "hello world"
> app on a MXLADS board but ran into some problems.  I
> was able to compile this just fine and I was able to
> load it on the board using gdb, but when I try running
> it using the gdb continue command, it freezes on me. 
> After disassembling and analyzing the loaded program I
> discovered that when I compile and link my program
> with the eCos libraries it includes many lines of
> warm_reset code before the main method, which I don't
> think belong there, and effectively it gets stuck
> somewhere in that code, before it even gets to main. 
> I am thinking I am not linking the "hello world" code
> against the correct eCos libraries.  I have been using
> the ecos configuration tool to create the eCos
> libraries and I have already tried the "default" and
> "all" package template, and have even tried the RAM
> startup option hoping that this would get rid of the
> warm_reset code, but have had no success.  I can use
> GDB to jump to main and single step there, but just
> using continue, it gets stuck.

What's an MLXADS board?  What target did you use?

To run via GDB, you probably need to be using RAM startup.
It is correct that there is a fair amount of initialization
that takes place before "main" gets called - it's the nature
of embedded systems.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Compiling and linking with ecos libraries and headers
  2005-04-11  8:04 ` Gary Thomas
@ 2005-04-11  9:01   ` Nick Garnett
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2005-04-11  9:01 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Payam Refaeilzadeh, eCos Discussion

Gary Thomas <gary@mlbassoc.com> writes:

> On Sun, 2005-04-10 at 16:08 -0700, Payam Refaeilzadeh wrote: 
> > I am kind of new to embedded developement using ecos. 
> > I was trying to compile and run a simple "hello world"
> > app on a MXLADS board but ran into some problems.  I
> > was able to compile this just fine and I was able to
> > load it on the board using gdb, but when I try running
> > it using the gdb continue command, it freezes on me. 
> > After disassembling and analyzing the loaded program I
> > discovered that when I compile and link my program
> > with the eCos libraries it includes many lines of
> > warm_reset code before the main method, which I don't
> > think belong there, and effectively it gets stuck
> > somewhere in that code, before it even gets to main. 
> > I am thinking I am not linking the "hello world" code
> > against the correct eCos libraries.  I have been using
> > the ecos configuration tool to create the eCos
> > libraries and I have already tried the "default" and
> > "all" package template, and have even tried the RAM
> > startup option hoping that this would get rid of the
> > warm_reset code, but have had no success.  I can use
> > GDB to jump to main and single step there, but just
> > using continue, it gets stuck.
> 
> What's an MLXADS board?  What target did you use?

The MXLADS is a developement board for the Freescale/Motorola
MC9328MXL -- it's an ARM9 variant. We (eCosCentric) did a port to this
board for one of our customers. It has not yet been distributed beyond
this one customer, so I am interested to know where the original
poster obtained the HAL, or whether he has done his own.
 
> To run via GDB, you probably need to be using RAM startup.
> It is correct that there is a fair amount of initialization
> that takes place before "main" gets called - it's the nature
> of embedded systems.

It is also not clear whether the OP has installed RedBoot, or is
trying to run using the JTAG interface. A straightforward RAM startup
application will not execute correctly unless it is loaded from
RedBoot. 


-- 
Nick Garnett                                     eCos Kernel Architect
http://www.ecoscentric.com                The eCos and RedBoot experts


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Compiling and linking with ecos libraries and headers
       [not found] <20050411161725.26909.qmail@web31513.mail.mud.yahoo.com>
@ 2005-04-11 17:09 ` Nick Garnett
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2005-04-11 17:09 UTC (permalink / raw)
  To: Payam Refaeilzadeh; +Cc: Gary Thomas, ecos-discuss


[Please keep all replies on the message board.]


Payam Refaeilzadeh <iampayam@yahoo.com> writes:

> Freescale has the Redboot source for this board on
> their web site.  I have been able to build Redboot for
> the board using Freescale's and eCos source, and it is
> running on the board.  In fact I believe the Redboot
> running on the board is the thing providing the GDB
> stub.

Oh, yes, I forgot about that. I looked briefly at those sources before
starting our own port. They were not well structured and the licensing
is unclear. Most importantly, they are for RedBoot only and oriented
to supporting Linux booting. I have no idea what would happen if you
tried to build eCos using them (although, I think you have found
out). For these reasons I decided to reimplement from scratch.

-- 
Nick Garnett                                     eCos Kernel Architect
http://www.ecoscentric.com                The eCos and RedBoot experts


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-11 17:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-10 23:08 [ECOS] Compiling and linking with ecos libraries and headers Payam Refaeilzadeh
2005-04-11  8:04 ` Gary Thomas
2005-04-11  9:01   ` Nick Garnett
     [not found] <20050411161725.26909.qmail@web31513.mail.mud.yahoo.com>
2005-04-11 17:09 ` Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).