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]

Re: More RedBoot questions


Grant Edwards wrote:
> 
> A few more RedBoot questions:
> 
>  1) Does RedBoot require RAM that is preserved by the user
>     application, or can RedBoot's bss/data/stack segments get
>     clobbered by the user app?

If you are not going to use RedBoot at all (including for any virtual
vectors), then you can just clobber it. Of course you can't actually make
your application use that memory by changing the memory layout to put
sections there - when RedBoot loads the app, obviously it can't overwrite
itself then!

>  2) Is there any particular advantage to running RedBoot from
>     RAM vs ROM?  Copying to and then running from RAM makes
>     flash manipulation simpler, but running from ROM makes
>     startup a little simpler.

Well it uses more memory, gives more chance for something to go wrong. But
it's your call really!
 
>  3) It looks like the RedBoot sources include TCP support. What
>     is it used for?  Console via TCP?  Gdb via TCP?

Yes. Ethernet debugging including Ctrl-c support.
 
>     If I use RedBoot, I'm going to have to add support for
>     downloading an image via TCP using a homebrew protocol. Is
>     that going to be a herculean task?

I'd doubt it. If you look at redboot's src/load.c and
src/net/tftp_client.c, you'll see that all redboot expects is some fairly
simple primitives - effectively open, read, close. Unless there's something
really odd with your protocol :).
 
>  4) I understand that I can still use a standalone eCos app
>     with gdb stubs, but I'm a bit fuzzy on how debugging via
>     RedBoot works.
> 
>     If I want to do gdb debugging of eCos apps via RedBoot,
>     where are the gdb stubs located -- RedBoot or the eCos app?

Strictly either :-). With virtual vector support, the gdb stubs can stay in
redboot if you like. But if you include stubs in your app, those stubs
should be used instead if present. That's the intention anyway - we have
had a few glitches in some HALs trying to get this right.
 
>     How does network debugging work once the eCos app takes over?
>     Does the eCos IP stack watch for TCP packets destined for
>     the gdb stubs and pass them off to RedBoot?

Yes. For ctrl-c support, see io/eth/current/src/net/eth_drv.c and
specifically eth_drv_run_deliveries(). HAL_CTRLC_CHECK comes from
hal/common/current/include/hal_if.h i.e. the ethernet stack calls into
redboot using the virtual vector support. 
 
>  5) The docs say that you can't load images via serial port
>     only via Ethernet. If you can run gdb via serial port why
>     can't you load images via serial port?

The docs are out of date. You can now download using X/Y-modem. Also you
can use RedBoot's GDB stub to load into RAM, but then you lose control of
the Redboot prompt. (Although there is a workaround for this - type $k#6b
directly at the serial port and redboot will restart, but whatever you
loaded into RAM will be retained - this is not officially supported
though).

I don't know why we don't support direct loading over the serial port
though - I'd have thought it would be pretty easy. No time I suppose. Gary?

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine

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