public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: Stanislav Meduna <stano@meduna.org>
Cc: eCos Discussion <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] How to write a complicated bootloader?
Date: Sat, 11 Jul 2009 11:33:00 -0000	[thread overview]
Message-ID: <4A587894.3050200@mlbassoc.com> (raw)
In-Reply-To: <4A5858BE.9000005@meduna.org>

Stanislav Meduna wrote:
> Hi,
> 
> I have a hardware with a complicated ethernet device that
> is not usable in a polled mode (or at least I don't have enough
> documentation to be able to use it in such a way). There
> is an OEM driver needing all kind of stuff (including eCos
> kernel) to run, that works fine in a regular application.
> 
> The hardware has a serial port, which is enough for debugging,
> but pain in the you know where for downloading our 2+ MB large
> binary over max. 115200 bps. In the field this serial port
> won't be available at all, so the only way to upgrade the device
> is via ethernet.
> 
> What I'd like to have is some kind of bootloader, that
> is able to
> - load the application via ethernet
> - manipulate the flash (application upgrade and at least
>   initialize the jffs, even better to access it filewise)
> - start the loaded application
> - support debugging the application at least over serial
>   line including the asynchronous ctrl-c support
>   (ethernet in a way of gdbserver would be nice, but
>   I imagine this can't be achieved in the eCos architecture
>   where the application and OS can't be really separated)
> 
> 
> Is there any special magic in loading an application somewhere
> into memory and transfer control to it, while leaving the
> GDB stubs in the bootloader? For the development cycle
> I imagine something like:
> 
> - connect with the gdb over serial
> - connect with a telnet-like interface over ethernet
> - initiate a tftp load
> - run the application
> - the application loads, runs and breaks into the gdb
>   as soon as the basic initialization is done (everything
>   else in the bootloader is now dead, only the vectors
>   needed for serial comm remain)
> 
> Is there information (and examples) available on how to approach
> this?
> 
> 
> Many thanks for hints

Rather than reinvent the wheel (or maybe fire...), I think you'd
be better off just getting your ethernet device driver running
with RedBoot.  eCos network drivers use the same API whether they
are running in a full eCos application (using interrupts) or as
part of RedBoot (polled), so it should be pretty easy to get it
to work if you already have code that runs with a full eCos system.

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

  parent reply	other threads:[~2009-07-11 11:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-11  9:18 Stanislav Meduna
2009-07-11  9:36 ` Andrew Lunn
2009-07-11 11:33 ` Gary Thomas [this message]
2009-07-11 12:11   ` Stanislav Meduna
2009-07-11 15:02     ` Chris Holgate

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A587894.3050200@mlbassoc.com \
    --to=gary@mlbassoc.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=stano@meduna.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).