Dependency between eCos and RedBoot

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Dependency between eCos and RedBoot

Lukas Riezler
Hello ecos-guys :-)

I have modified both the variant HAL and platform HAL in a minimal way, to get eCos ported
on my FM3 (IAR KickStart Kit: MB9BF506R-SK).
Modifying the CDL-Files will be my next step.

But now I have a question about the dependency between eCos and RedBoot.
If I'm rigt, Redboot comes with two elementary functions:
- bootstrapping
- debbuging

My eval board has a kind of JTAG, so RedBoot's debugging facility isn't really needed by me. (?)
In the documentation and the book it's the suggestion first to run RedBoot.
But is RedBoot really essential to get eCos run on my board? Or are there any other ways to get this goal?
I don't have any experience with bootsrapping/-loading because I'm quite new in this
hardware-closeness business. Maybe I can burn ecos into flash? But I think for developing this won't be
the best way, is it?

I have built some libraries for test cases with the config-tool, but I have never seen any elf-file which
I could load on my board - only if I used the RedBoot package! In this case an elf-file was generated.
Okay, what I have now is "redboot.elf".
So I have to load RedBoot on my board. But how does RedBoot "load" my minimal eCos application on the
board?

Is the following chain of thougt correct?
1) load "redboot.elf" on the board
2) RedBoot can handle the generated ecos-file "libtarget.a" (and eCos will be started in this way?)

Is it possible that anybody throws some light in this issue? :)
 
With kind regards,
Lukas

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

Reply | Threaded
Open this post in threaded view
|

Re: Dependency between eCos and RedBoot

Ross Younger-4
Hi Lukas,

It would be true to say that you don't need to get RedBoot running as
part of the porting process. However it is a simple interactive platform
for confirming that you've got the basics running along with a serial
port, a sort of "hello world", and it can be useful for manipulating flash.

You don't burn eCos alone into flash. The process is more like:
1. configure eCos
2. build eCos (libtarget.a)
3. write your application
4. compile your application and link it with ecos (output is usually an
ELF file)
5. Run your application. This might mean burning it into flash, having
RedBoot run it, or even loading it directly into RAM via JTAG or similar.

Section III of the eCos user guide walks you through this process. I
particularly recommend chapter 13 which gives the compilation rune you
will need to get that ELF file.

It's typical, during application development, to program RedBoot into
flash on your board so that it runs on boot. (This can be fiddly.) You
then have the ability to load and debug ELF files easily via serial or
ethernet (depends on the board). When your application is finished you
might keep RedBoot as a boot loader, or just switch to ROM startup and
have your application boot directly.

Ross

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

Reply | Threaded
Open this post in threaded view
|

Re: Dependency between eCos and RedBoot

Ilija Kocho [Илија Кочо]
In reply to this post by Lukas Riezler
Hi Lukas

You don't need to take special care for RedBoot during porting process.
Simple "hello world" application is enough, and for me more convenient,
to get hal_diag in order. Once you have hal_diag (and of course clocking
and basic configuration) RedBoot should compile and run without
problems. Then, once you add Ethernet driver, you should be able to
telnet to RedBoot.

Ilija

On 07.04.2013 23:55, Lukas Riezler wrote:

> Hello ecos-guys :-)
>
> I have modified both the variant HAL and platform HAL in a minimal way, to get eCos ported
> on my FM3 (IAR KickStart Kit: MB9BF506R-SK).
> Modifying the CDL-Files will be my next step.
>
> But now I have a question about the dependency between eCos and RedBoot.
> If I'm rigt, Redboot comes with two elementary functions:
> - bootstrapping
> - debbuging
>
> My eval board has a kind of JTAG, so RedBoot's debugging facility isn't really needed by me. (?)
> In the documentation and the book it's the suggestion first to run RedBoot.
> But is RedBoot really essential to get eCos run on my board? Or are there any other ways to get this goal?
> I don't have any experience with bootsrapping/-loading because I'm quite new in this
> hardware-closeness business. Maybe I can burn ecos into flash? But I think for developing this won't be
> the best way, is it?
>
> I have built some libraries for test cases with the config-tool, but I have never seen any elf-file which
> I could load on my board - only if I used the RedBoot package! In this case an elf-file was generated.
> Okay, what I have now is "redboot.elf".
> So I have to load RedBoot on my board. But how does RedBoot "load" my minimal eCos application on the
> board?
>
> Is the following chain of thougt correct?
> 1) load "redboot.elf" on the board
> 2) RedBoot can handle the generated ecos-file "libtarget.a" (and eCos will be started in this way?)
>
> Is it possible that anybody throws some light in this issue? :)
>  
> With kind regards,
> Lukas
>


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

Reply | Threaded
Open this post in threaded view
|

AW: [ECOS] Dependency between eCos and RedBoot

Richard Rauch
In reply to this post by Lukas Riezler
Hi,

eCos is able to run without Redboot, too!
Specially for debugging with JTAG you could load your application binary directly to RAM and debug there.

Regarding your questions about files ".elf" and "libtarget.a"

Maybe you have a general misunderstanding, how eCos is working!
eCos is only a library, which you have to link to your application. You do not load eCos as operating system like linux to the target.
So the libtarget.a is a library file, not an executable binary!

By the way, if you are generating the tests within eCos Config Tool, you will get a lot of executable binary files for loading to the target (e.g. tm-basic).

Additional hint:
If you run eCos without Redboot, you need to take care about virtual vector table. As default an eCos application is calling some functions from Redboot. The linking mechanism is called "virtual vector tables", which is initialized from Redboot at startup. There are some options in eCos configuration to tell not to use this functionality. You need to change this, because as default this mechanism is enabled



Richard Rauch
ITR GmbH Informationstechnologie Rauch
Nuremberg/Germany
web:   http://www.itrgmbh.de
email: [hidden email]
 


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