public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] e7t ROM startup
@ 2001-09-20  8:33 Ravi Kumar B S
  2001-09-20 11:58 ` Jonathan Larmour
  0 siblings, 1 reply; 18+ messages in thread
From: Ravi Kumar B S @ 2001-09-20  8:33 UTC (permalink / raw)
  To: ecos-discuss

>>>>> "Vipin" == Vipin Mehta <vipinm@mindtree.com> writes:

Vipin> got an ELF image of the same which I subsequently converted to

Vipin> UUE format and burnt into the flash at 0x01830000 address using

eCos ROM startup uses a start address of 0x01820000. You need to

program the image at that address, or change the linker script.


yes we did that thing. we erased the redboot which was there at 01820000 and
did flashwrite of the standalone application image at that address. After
writing when we reset the system it does not execute our application, it
tries to run the angel debug monitor. so we went BSL boot prompt and executed
'rommodules' command which is supposed to list the images in the flash. but
it is not displaying our application which we have put in the flash. why is
it not able to recognise our application?
 i remember reading in e7t user's guide that the application should contain
the module header for it to be considered as a module. we have not done any
thing in this regard. do we need to do it manually? if so could you please
give us an idea about how to do it? 

are we missing something thing else?

regards,

ravi kumar

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

* Re: [ECOS] e7t ROM startup
  2001-09-20  8:33 [ECOS] e7t ROM startup Ravi Kumar B S
@ 2001-09-20 11:58 ` Jonathan Larmour
  0 siblings, 0 replies; 18+ messages in thread
From: Jonathan Larmour @ 2001-09-20 11:58 UTC (permalink / raw)
  To: Ravi Kumar B S; +Cc: ecos-discuss

Ravi Kumar B S wrote:
>  i remember reading in e7t user's guide that the application should contain
> the module header for it to be considered as a module. we have not done any
> thing in this regard. do we need to do it manually? if so could you please
> give us an idea about how to do it?

That's almost certainly what the problem is. The mechanism to add a module
header is quite tricky, but you can see how redboot does it by looking at
the make rule at the end of hal/arm/e7t/current/cdl/hal_arm_e7t.cdl

You can ignore the bits about the dependency file.

Yes this is tricky.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

* Re: [ECOS] e7t ROM startup
  2001-09-27  4:15         ` Jesper Skov
@ 2001-09-27  7:43           ` Simon
  0 siblings, 0 replies; 18+ messages in thread
From: Simon @ 2001-09-27  7:43 UTC (permalink / raw)
  To: ecos-discuss

Right, Redboot works well on Samsung S3C4510 chip which is used in e7t.
But e7t made me feeling that I could not do anthing at all, excipt redboot
and eCOS kernel.
Lack of network interface and others else, it is not interesting after
porting kernel.
That is what I feel and is my reason why I use SMC7004ABR to be my
plateform.
and more, it seems SMC7004ABR is cheaper than e7t.
(^_^)
Simon


----- Original Message -----
From: "Jesper Skov" <jskov@redhat.com>
To: "David Airlie" <David.Airlie@parthus.com>
Cc: <ecos-discuss@sources.redhat.com>
Sent: Thursday, September 27, 2001 7:15 PM
Subject: Re: [ECOS] e7t ROM startup


>>>>> "David" == David Airlie <David.Airlie@parthus.com> writes:

David> gdb stubs on AEB work from the ARM bootloader doesn't it? and
David> do gdbstubs on E7T work from there as well?

David> the move to getting redboot working shouldn't be that big..

Redboot works fine. That's not the issue. The issue is getting other
eCos apps running from the bootloader. It's non-trivial because it's
so anal about what constitutes a Proper Module(tm).

Jesper


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

* Re: [ECOS] e7t ROM startup
  2001-09-27  3:28       ` David Airlie
@ 2001-09-27  4:15         ` Jesper Skov
  2001-09-27  7:43           ` Simon
  0 siblings, 1 reply; 18+ messages in thread
From: Jesper Skov @ 2001-09-27  4:15 UTC (permalink / raw)
  To: David Airlie; +Cc: ecos-discuss

>>>>> "David" == David Airlie <David.Airlie@parthus.com> writes:

David> gdb stubs on AEB work from the ARM bootloader doesn't it? and
David> do gdbstubs on E7T work from there as well?

David> the move to getting redboot working shouldn't be that big..

Redboot works fine. That's not the issue. The issue is getting other
eCos apps running from the bootloader. It's non-trivial because it's
so anal about what constitutes a Proper Module(tm).

Jesper

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

* Re: [ECOS] e7t ROM startup
  2001-09-27  0:48     ` Jesper Skov
@ 2001-09-27  3:28       ` David Airlie
  2001-09-27  4:15         ` Jesper Skov
  0 siblings, 1 reply; 18+ messages in thread
From: David Airlie @ 2001-09-27  3:28 UTC (permalink / raw)
  To: ecos-discuss

gdb stubs on AEB work from the ARM bootloader
doesn't it? and do gdbstubs on E7T work from there as well?

the move to getting redboot working shouldn't be that big..

or is the E7T bootloader so different from the AEB?
Dave.


On Thu, 27 Sep 2001, Jesper Skov wrote:

>
> [remember to CC the list!]
>
> >>>>> "Simon" == Simon  <simoncc@ms46.url.com.tw> writes:
>
> Simon> right, JTAG is neccesary.  I have two plateforms with the same
> Simon> chip.  one is e7t and the other is SMC7004ABR.  I have put
> Simon> redboot into SMC3004ABR.  such that I got two network
> Simon> interfaces and one super I/O interface and enough memories for
> Simon> my work.  it's quite good.  if not having JTAG tool, I am
> Simon> trying to find out a solution to upload and replace with
> Simon> redboot.
>
> OK, no JTAG. I see two options then:
>
>  o Add flash support to RedBoot and tell it to leave the first 64kB
>    alone. Then use a RedBoot script to load a flash image to RAM and
>    start it.  This requires that there's enough space in flash for
>    both the Boot Monitor, RedBoot, and the app.
>
>    You also risk bricking the board since you have no means of
>    reprogramming the flash if you accidently trash the Boot Monitor.
>
>  o Get the modules stuff working.
>
> I'd obviously go for the latter, being less risky, but I can't really
> help you with the problem (without you getting a contract - and it
> would probably be much too expensive).
>
> We don't support general ROM startup on the E7T (or the AEB) because
> it's such a tedious process to get it working. I suggest you either
> ask ARM for guidance or find another development platform if you need
> the ROM startup.
>
> Jesper
>

-- 
      David Airlie, Software Engineer, Parthus Technologies plc.,
       Mary Rosse Centre, National Tech Park, Limerick, Ireland.
   t: +353-61-508116 / f: +353-61-508101 / David.Airlie@parthus.com

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

* Re: [ECOS] e7t ROM startup
       [not found]   ` <019901c14727$86b9ba60$0f00a8c0@pig>
@ 2001-09-27  0:48     ` Jesper Skov
  2001-09-27  3:28       ` David Airlie
  0 siblings, 1 reply; 18+ messages in thread
From: Jesper Skov @ 2001-09-27  0:48 UTC (permalink / raw)
  To: Simon; +Cc: ecos-discuss

[remember to CC the list!]

>>>>> "Simon" == Simon  <simoncc@ms46.url.com.tw> writes:

Simon> right, JTAG is neccesary.  I have two plateforms with the same
Simon> chip.  one is e7t and the other is SMC7004ABR.  I have put
Simon> redboot into SMC3004ABR.  such that I got two network
Simon> interfaces and one super I/O interface and enough memories for
Simon> my work.  it's quite good.  if not having JTAG tool, I am
Simon> trying to find out a solution to upload and replace with
Simon> redboot.

OK, no JTAG. I see two options then:

 o Add flash support to RedBoot and tell it to leave the first 64kB
   alone. Then use a RedBoot script to load a flash image to RAM and
   start it.  This requires that there's enough space in flash for
   both the Boot Monitor, RedBoot, and the app.

   You also risk bricking the board since you have no means of
   reprogramming the flash if you accidently trash the Boot Monitor.

 o Get the modules stuff working.

I'd obviously go for the latter, being less risky, but I can't really
help you with the problem (without you getting a contract - and it
would probably be much too expensive). 

We don't support general ROM startup on the E7T (or the AEB) because
it's such a tedious process to get it working. I suggest you either
ask ARM for guidance or find another development platform if you need
the ROM startup.

Jesper

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

* RE: [ECOS] e7t ROM startup
       [not found] <2330401A6FE03445ADA682F5EBB7502D02B181C0@mtv01ex01.mindtree.com>
@ 2001-09-27  0:21 ` Jesper Skov
       [not found]   ` <019901c14727$86b9ba60$0f00a8c0@pig>
  0 siblings, 1 reply; 18+ messages in thread
From: Jesper Skov @ 2001-09-27  0:21 UTC (permalink / raw)
  To: Ravi Kumar B S; +Cc: Jesper Skov, Robert Cragie, ecos-discuss

>yes that is right that is the case. in the case of flashload he will
>not = the module header. still stuck there itself. i searched in the
>evaluator 7t mailing list also but i did not find anything
>usefull. anyother way to = put the standalone application in the
>flash and run frmo there?


Yes, if you have JTAG equipment you can just nuke the bootloader and
put your eCos app (in ROM startup mode) first in the flash. I already
told you.

Jesper

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

* Re: [ECOS] e7t ROM startup
  2001-09-26  7:52 ` Robert Cragie
@ 2001-09-26 23:59   ` Jesper Skov
  0 siblings, 0 replies; 18+ messages in thread
From: Jesper Skov @ 2001-09-26 23:59 UTC (permalink / raw)
  To: Robert Cragie; +Cc: Ravi Kumar B S, ecos-discuss

>>>>> "Robert" == Robert Cragie <rcc@jennic.com> writes:

Robert> I think you should be using 'flashload' (p 4-17 of Evaluator
Robert> E7T User Guide), not 'flashwrite'. As far as I can tell,
Robert> 'flashwrite' is a 'raw' write to the flash, i.e. copies RAM to
Robert> flash, without putting any module header on.

I don't see such a distinction between the two commands in the
manual. One writes RAM content to flash, the other downloads the
content via serial before writing it to flash.

Jesper

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

* RE: [ECOS] e7t ROM startup
  2001-09-25  3:17 Ravi Kumar B S
  2001-09-25  4:20 ` Jesper Skov
@ 2001-09-26  7:52 ` Robert Cragie
  2001-09-26 23:59   ` Jesper Skov
  1 sibling, 1 reply; 18+ messages in thread
From: Robert Cragie @ 2001-09-26  7:52 UTC (permalink / raw)
  To: Ravi Kumar B S, ecos-discuss

I have not used the Evaluator E7T, but have used the Integrator. I have had
a quick look through the Evaluator E7T User Guide and come up with some
suggestions - I hope they are right.

> here i am trying to add the module header to a sample application and put
> that in the flash and run it from there. as suggested earlier i
> am trying to
> follow the same procedure which is used to build the redboot. i am able to
> build the image (uuencoded) and put that to the flash. after 'flashwrite',
> when i say rommodules, it is not displaying the application
> (supposed to be a
> module) which i have put in the flash. the part of the make file
> which i have
> used to build the standalone application is there at the end of
> the mail. i
> am also providing the counter_module.c where i have defined the module
> header.

I think you should be using 'flashload' (p 4-17 of Evaluator E7T User
Guide), not 'flashwrite'. As far as I can tell, 'flashwrite' is a 'raw'
write to the flash, i.e. copies RAM to flash, without putting any module
header on.

>
> am i missing anything else? can somebody help in resolving this problem? i
> will not be able to move further as this is very critical for my project.

According to p 4-29 of Evaluator E7T User Guide, I don't think you need to
include a module header in your code; this will be added by the bootstrap
loader. This may well confuse the module management software.

> note: counter.c is my sample application and counter_module.c is the file
> which contains the module header.
>
> counter: $(wildcard
> $(REPOSITORY)/arm-ecos-standalone/counter/counter_module.c
> $(PREFIX)/lib/target.ld $(PREFIX)/lib/vectors.o $(PREFIX)/lib/libtarget.a
> $(PREFIX)/lib/libextras.a)
>         # First build version with no checksum.
>         @echo "First build version with no checksum."
>         $(XCC) -c -I$(INCLUDE_PATH) counter.c
>         $(XCC) -c -I$(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<)
> $(CFLAGS) -o
> counter_ncs.o $<
>         $(XCC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o counter_ncs.tmp
> counter_ncs.o counter.o
>         $(OBJCOPY) --strip-debug counter_ncs.tmp counter_ncs.img
>         $(OBJCOPY) -O binary counter_ncs.img counter_ncs.bin
>         # Then build version with checksum from previously built image.
>         $(XCC) -c -DCHECKSUM=`$(dir $<)flash_cksum.tcl counter_ncs.bin`
> -I$(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o
> counter_cs.o $<
>         $(XCC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o counter_cs.tmp
> counter_cs.o counter.o
>         $(OBJCOPY) --strip-debug counter_cs.tmp counter.img
>         $(OBJCOPY) -O binary counter.img counter.bin
>         uuencode counter.bin counter.bin.tmp | tr '`' ' ' > counter.UU
>
> --------------------------------------------------------
> counter_module.c
> --------------------------------------------------------
>
> /* This is the module 'wrapper' for a simple application */
>
> /* #include
> </u/ARM/new_ecos/packages/arm-ecos-standalone/install/include/pkgc
> onf/hal.h>
> */
> #include <pkgconf/hal.h>
> #include <cyg/infra/cyg_type.h>
> #include <cyg/hal/hal_stub.h>

********* You don't need this - remove it (begin)
>
> /* ARM e7t module stuff */
>
> #ifndef CHECKSUM
>     #define CHECKSUM  0x0
> #endif
>
> extern char __exception_handlers, __rom_data_end;
>
> const char __title[] = "Counter";
> const char __help[] = "Counter              " __DATE__;
>
> struct ModuleHeader {
>     cyg_uint32    magic;
>     cyg_uint16    flags;
>     cyg_uint8     major;
>     cyg_uint8     minor;
>     cyg_uint32    checksum;
>     cyg_uint32    ro_base;
>     cyg_uint32    ro_limit;
>     cyg_uint32    rw_base;
>     cyg_uint32    zi_base;
>     cyg_uint32    zi_limit;
>     cyg_uint32    self;
>     cyg_uint32    start;
>     cyg_uint32    init;
>     cyg_uint32    final;
>     cyg_uint32    service;
>     cyg_uint32    title;
>     cyg_uint32    help;
>     cyg_uint32    cmdtbl;
>     cyg_uint32    swi_base;
>     cyg_uint32    swi_handler;
> };
>
> const static struct ModuleHeader __hdr =
> {
>     0x4D484944,             /* identifies the module header */
>     2,                      /* flag = auto start */
>     1,                      /* major version */
>     0,                      /* minor version */
>     CHECKSUM,               /* checksum */
>     (cyg_uint32) &__exception_handlers, /* start of
>                                         module (read-only) image */
>     (cyg_uint32) &__rom_data_end,       /* end of image */
>     0,                      /* r/w base - unused */
>     0,                      /* bss base - unused */
>     0,                      /* bss limit - unused */
>     (cyg_uint32) &__hdr,    /* self (for module identification) */
>     (cyg_uint32) &__exception_handlers, /* startup */
>     0,                      /* init */
>     0,                      /* final */
>     0,                      /* service */
>     (cyg_uint32) &__title,  /* title */
>     (cyg_uint32) &__help,   /* help string */
>     0,                      /* command table - unused */
>     0,                      /* SWI table - unsused */
>     0,                      /* SWI handler - unused */
> };

********* You don't need this - remove it (end)

>
> static void
> __dummy(void *p)
> {
> }
>
> void __dummy_init(void)
> {
>     __dummy((void*)&__hdr);
> }
>
> _Counter_init(__dummy_init, RedBoot_INIT_LAST);
>
>
> regards,
> ravi kumar.
>
>

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

* [ECOS] e7t ROM startup
@ 2001-09-26  7:13 Ravi Kumar B S
  0 siblings, 0 replies; 18+ messages in thread
From: Ravi Kumar B S @ 2001-09-26  7:13 UTC (permalink / raw)
  To: ecos-discuss

hi all,

i am still not out of the problem.  i have really stuch up here from past one
week. 
here i am trying to add the module header to a sample application and put
that in the flash and run it from there. as suggested earlier i am trying to
follow the same procedure which is used to build the redboot. i am able to
build the image (uuencoded) and put that to the flash. after 'flashwrite',
when i say rommodules, it is not displaying the application (supposed to be a
module) which i have put in the flash. the part of the make file which i have
used to build the standalone application is there at the end of the mail. i
am also providing the counter_module.c where i have defined the module
header.

am i missing anything else? can somebody help in resolving this problem? i
will not be able to move further as this is very critical for my project.

note: counter.c is my sample application and counter_module.c is the file
which contains the module header.

counter: $(wildcard
$(REPOSITORY)/arm-ecos-standalone/counter/counter_module.c
$(PREFIX)/lib/target.ld $(PREFIX)/lib/vectors.o $(PREFIX)/lib/libtarget.a
$(PREFIX)/lib/libextras.a)
        # First build version with no checksum.
        @echo "First build version with no checksum."
        $(XCC) -c -I$(INCLUDE_PATH) counter.c
        $(XCC) -c -I$(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o
counter_ncs.o $<
        $(XCC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o counter_ncs.tmp
counter_ncs.o counter.o
        $(OBJCOPY) --strip-debug counter_ncs.tmp counter_ncs.img
        $(OBJCOPY) -O binary counter_ncs.img counter_ncs.bin
        # Then build version with checksum from previously built image.
        $(XCC) -c -DCHECKSUM=`$(dir $<)flash_cksum.tcl counter_ncs.bin`
-I$(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o counter_cs.o $<
        $(XCC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o counter_cs.tmp
counter_cs.o counter.o
        $(OBJCOPY) --strip-debug counter_cs.tmp counter.img
        $(OBJCOPY) -O binary counter.img counter.bin
        uuencode counter.bin counter.bin.tmp | tr '`' ' ' > counter.UU

--------------------------------------------------------
counter_module.c
--------------------------------------------------------

/* This is the module 'wrapper' for a simple application */

/* #include
</u/ARM/new_ecos/packages/arm-ecos-standalone/install/include/pkgconf/hal.h>
*/
#include <pkgconf/hal.h>
#include <cyg/infra/cyg_type.h>
#include <cyg/hal/hal_stub.h>

/* ARM e7t module stuff */

#ifndef CHECKSUM
    #define CHECKSUM  0x0
#endif

extern char __exception_handlers, __rom_data_end;

const char __title[] = "Counter";
const char __help[] = "Counter              " __DATE__;

struct ModuleHeader {
    cyg_uint32    magic;
    cyg_uint16    flags;
    cyg_uint8     major;
    cyg_uint8     minor;
    cyg_uint32    checksum;
    cyg_uint32    ro_base;
    cyg_uint32    ro_limit;
    cyg_uint32    rw_base;
    cyg_uint32    zi_base;
    cyg_uint32    zi_limit;
    cyg_uint32    self;
    cyg_uint32    start;
    cyg_uint32    init;
    cyg_uint32    final;
    cyg_uint32    service;
    cyg_uint32    title;
    cyg_uint32    help;
    cyg_uint32    cmdtbl;
    cyg_uint32    swi_base;
    cyg_uint32    swi_handler;
};

const static struct ModuleHeader __hdr =
{
    0x4D484944,             /* identifies the module header */
    2,                      /* flag = auto start */
    1,                      /* major version */
    0,                      /* minor version */
    CHECKSUM,               /* checksum */
    (cyg_uint32) &__exception_handlers, /* start of
                                        module (read-only) image */
    (cyg_uint32) &__rom_data_end,       /* end of image */
    0,                      /* r/w base - unused */
    0,                      /* bss base - unused */
    0,                      /* bss limit - unused */
    (cyg_uint32) &__hdr,    /* self (for module identification) */
    (cyg_uint32) &__exception_handlers, /* startup */
    0,                      /* init */
    0,                      /* final */
    0,                      /* service */
    (cyg_uint32) &__title,  /* title */
    (cyg_uint32) &__help,   /* help string */
    0,                      /* command table - unused */
    0,                      /* SWI table - unsused */
    0,                      /* SWI handler - unused */
};

static void
__dummy(void *p)
{
}

void __dummy_init(void)
{
    __dummy((void*)&__hdr);
}

_Counter_init(__dummy_init, RedBoot_INIT_LAST);


regards,
ravi kumar.


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

* Re: [ECOS] e7t ROM startup
  2001-09-25 23:34 ` Jesper Skov
@ 2001-09-26  1:22   ` Simon
  0 siblings, 0 replies; 18+ messages in thread
From: Simon @ 2001-09-26  1:22 UTC (permalink / raw)
  To: Jesper Skov, Ravi Kumar B S; +Cc: Jesper Skov, ecos-discuss

Another way is to build a RAM version REDBOOT with flash supported.
With that, you can download and run the RAM version to program the
ROM one to the on-board flash. There is a chapter to descript how to
update the redboot. Take a look at that.


----- Original Message -----
From: "Jesper Skov" <jskov@redhat.com>
To: "Ravi Kumar B S" <ravikbs@mindtree.com>
Cc: "Simon" <simoncc@ms46.url.com.tw>; "Jesper Skov" <jskov@redhat.com>;
<ecos-discuss@sources.redhat.com>
Sent: Wednesday, September 26, 2001 2:34 PM
Subject: RE: [ECOS] e7t ROM startup



>that is not what i want. i want to put my sample application in the =
>flash and run from there. how will putting the redboot helps me in
>running my = program from flash. i am able to put the redboot in the
>flash and download my = program into the RAM and run from there. but
>in the next step i want to put the sample applicaton in the flash and
>run from there? any idea.

Well, if you have JTAG equipment and don't risk briking the board by
installing stuff in the flash, all you have to do is compile the
application in ROM startup mode and adjust its start address to the
start of the flash part (i.e., adjust the MLT).

Jesper

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

* RE: [ECOS] e7t ROM startup
       [not found] <2330401A6FE03445ADA682F5EBB7502D02B181B9@mtv01ex01.mindtree.com>
@ 2001-09-25 23:34 ` Jesper Skov
  2001-09-26  1:22   ` Simon
  0 siblings, 1 reply; 18+ messages in thread
From: Jesper Skov @ 2001-09-25 23:34 UTC (permalink / raw)
  To: Ravi Kumar B S; +Cc: Simon, Jesper Skov, ecos-discuss

>that is not what i want. i want to put my sample application in the =
>flash and run from there. how will putting the redboot helps me in
>running my = program from flash. i am able to put the redboot in the
>flash and download my = program into the RAM and run from there. but
>in the next step i want to put the sample applicaton in the flash and
>run from there? any idea.

Well, if you have JTAG equipment and don't risk briking the board by
installing stuff in the flash, all you have to do is compile the
application in ROM startup mode and adjust its start address to the
start of the flash part (i.e., adjust the MLT).

Jesper

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

* Re: [ECOS] e7t ROM startup
  2001-09-25  6:47 ` Jesper Skov
@ 2001-09-25  7:14   ` Simon
  0 siblings, 0 replies; 18+ messages in thread
From: Simon @ 2001-09-25  7:14 UTC (permalink / raw)
  To: Jesper Skov, Ravi Kumar B S; +Cc: Jesper Skov, ecos-discuss

My solution is to backup the original rom image (angel from ARM) and replace
it with redboot.
it's quite good!

Simon



----- Original Message -----
From: "Jesper Skov" <jskov@redhat.com>
To: "Ravi Kumar B S" <ravikbs@mindtree.com>
Cc: "Jesper Skov" <jskov@redhat.com>; <ecos-discuss@sources.redhat.com>
Sent: Tuesday, September 25, 2001 9:46 PM
Subject: RE: [ECOS] e7t ROM startup


>-hi i tried using od(octal dump) to see if i can make out some thing =
>from the
>image. but i could not follow much as i am trying the od for the first =
>time.=20
>
>and that the CRC is indeed what was computed in the first link step.
>
>- can you give me little more info about what exactly needs to be =
>checked and
>how it could be done?

Sorry, no idea. You want to try to find a mailing list for the
E7T. It's an issue with their bootsystem, not eCos.

Jesper



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

* RE: [ECOS] e7t ROM startup
       [not found] <2330401A6FE03445ADA682F5EBB7502D02B181B4@mtv01ex01.mindtree.com>
@ 2001-09-25  6:47 ` Jesper Skov
  2001-09-25  7:14   ` Simon
  0 siblings, 1 reply; 18+ messages in thread
From: Jesper Skov @ 2001-09-25  6:47 UTC (permalink / raw)
  To: Ravi Kumar B S; +Cc: Jesper Skov, ecos-discuss

>-hi i tried using od(octal dump) to see if i can make out some thing =
>from the
>image. but i could not follow much as i am trying the od for the first =
>time.=20
>
>and that the CRC is indeed what was computed in the first link step.
>
>- can you give me little more info about what exactly needs to be =
>checked and
>how it could be done?

Sorry, no idea. You want to try to find a mailing list for the
E7T. It's an issue with their bootsystem, not eCos.

Jesper


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

* Re: [ECOS] e7t ROM startup
  2001-09-25  3:17 Ravi Kumar B S
@ 2001-09-25  4:20 ` Jesper Skov
  2001-09-26  7:52 ` Robert Cragie
  1 sibling, 0 replies; 18+ messages in thread
From: Jesper Skov @ 2001-09-25  4:20 UTC (permalink / raw)
  To: Ravi Kumar B S; +Cc: ecos-discuss

>am i missing anything else? can somebody help in resolving this
>problem? i will not be able to move further as this is very critical
>for my project.

Looks OK to me.

You may want to use a binary editor to look at the resulting binary
image and make sure it follows the required format and that the CRC is
indeed what was computed in the first link step.

Jesper

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

* [ECOS] e7t ROM startup
@ 2001-09-25  3:17 Ravi Kumar B S
  2001-09-25  4:20 ` Jesper Skov
  2001-09-26  7:52 ` Robert Cragie
  0 siblings, 2 replies; 18+ messages in thread
From: Ravi Kumar B S @ 2001-09-25  3:17 UTC (permalink / raw)
  To: ecos-discuss

hi all,

i am still not out of the problem.  i have really stuch up here from past one
week. 
here i am trying to add the module header to a sample application and put
that in the flash and run it from there. as suggested earlier i am trying to
follow the same procedure which is used to build the redboot. i am able to
build the image (uuencoded) and put that to the flash. after 'flashwrite',
when i say rommodules, it is not displaying the application (supposed to be a
module) which i have put in the flash. the part of the make file which i have
used to build the standalone application is there at the end of the mail. i
am also providing the counter_module.c where i have defined the module
header.

am i missing anything else? can somebody help in resolving this problem? i
will not be able to move further as this is very critical for my project.

note: counter.c is my sample application and counter_module.c is the file
which contains the module header.

counter: $(wildcard
$(REPOSITORY)/arm-ecos-standalone/counter/counter_module.c
$(PREFIX)/lib/target.ld $(PREFIX)/lib/vectors.o $(PREFIX)/lib/libtarget.a
$(PREFIX)/lib/libextras.a)
        # First build version with no checksum.
        @echo "First build version with no checksum."
        $(XCC) -c -I$(INCLUDE_PATH) counter.c
        $(XCC) -c -I$(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o
counter_ncs.o $<
        $(XCC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o counter_ncs.tmp
counter_ncs.o counter.o
        $(OBJCOPY) --strip-debug counter_ncs.tmp counter_ncs.img
        $(OBJCOPY) -O binary counter_ncs.img counter_ncs.bin
        # Then build version with checksum from previously built image.
        $(XCC) -c -DCHECKSUM=`$(dir $<)flash_cksum.tcl counter_ncs.bin`
-I$(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o counter_cs.o $<
        $(XCC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o counter_cs.tmp
counter_cs.o counter.o
        $(OBJCOPY) --strip-debug counter_cs.tmp counter.img
        $(OBJCOPY) -O binary counter.img counter.bin
        uuencode counter.bin counter.bin.tmp | tr '`' ' ' > counter.UU

--------------------------------------------------------
counter_module.c
--------------------------------------------------------

/* This is the module 'wrapper' for a simple application */

/* #include
</u/ARM/new_ecos/packages/arm-ecos-standalone/install/include/pkgconf/hal.h>
*/
#include <pkgconf/hal.h>
#include <cyg/infra/cyg_type.h>
#include <cyg/hal/hal_stub.h>

/* ARM e7t module stuff */

#ifndef CHECKSUM
    #define CHECKSUM  0x0
#endif

extern char __exception_handlers, __rom_data_end;

const char __title[] = "Counter";
const char __help[] = "Counter              " __DATE__;

struct ModuleHeader {
    cyg_uint32    magic;
    cyg_uint16    flags;
    cyg_uint8     major;
    cyg_uint8     minor;
    cyg_uint32    checksum;
    cyg_uint32    ro_base;
    cyg_uint32    ro_limit;
    cyg_uint32    rw_base;
    cyg_uint32    zi_base;
    cyg_uint32    zi_limit;
    cyg_uint32    self;
    cyg_uint32    start;
    cyg_uint32    init;
    cyg_uint32    final;
    cyg_uint32    service;
    cyg_uint32    title;
    cyg_uint32    help;
    cyg_uint32    cmdtbl;
    cyg_uint32    swi_base;
    cyg_uint32    swi_handler;
};

const static struct ModuleHeader __hdr =
{
    0x4D484944,             /* identifies the module header */
    2,                      /* flag = auto start */
    1,                      /* major version */
    0,                      /* minor version */
    CHECKSUM,               /* checksum */
    (cyg_uint32) &__exception_handlers, /* start of
                                        module (read-only) image */
    (cyg_uint32) &__rom_data_end,       /* end of image */
    0,                      /* r/w base - unused */
    0,                      /* bss base - unused */
    0,                      /* bss limit - unused */
    (cyg_uint32) &__hdr,    /* self (for module identification) */
    (cyg_uint32) &__exception_handlers, /* startup */
    0,                      /* init */
    0,                      /* final */
    0,                      /* service */
    (cyg_uint32) &__title,  /* title */
    (cyg_uint32) &__help,   /* help string */
    0,                      /* command table - unused */
    0,                      /* SWI table - unsused */
    0,                      /* SWI handler - unused */
};

static void
__dummy(void *p)
{
}

void __dummy_init(void)
{
    __dummy((void*)&__hdr);
}

_Counter_init(__dummy_init, RedBoot_INIT_LAST);


regards,
ravi kumar.


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

* Re: [ECOS] e7t ROM startup
  2001-09-20  4:42 Vipin Mehta
@ 2001-09-20  5:14 ` Jesper Skov
  0 siblings, 0 replies; 18+ messages in thread
From: Jesper Skov @ 2001-09-20  5:14 UTC (permalink / raw)
  To: Vipin Mehta; +Cc: ecos-discuss, larli66

>>>>> "Vipin" == Vipin Mehta <vipinm@mindtree.com> writes:

Vipin> got an ELF image of the same which I subsequently converted to
Vipin> UUE format and burnt into the flash at 0x01830000 address using

eCos ROM startup uses a start address of 0x01820000. You need to
program the image at that address, or change the linker script.

Jesper

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

* [ECOS] e7t ROM startup
@ 2001-09-20  4:42 Vipin Mehta
  2001-09-20  5:14 ` Jesper Skov
  0 siblings, 1 reply; 18+ messages in thread
From: Vipin Mehta @ 2001-09-20  4:42 UTC (permalink / raw)
  To: ecos-discuss; +Cc: larli66

Hi all,
       I'm working with the e7t board. I want to build a standalone 
application image such that when I reset my board the application should 
start executing. To achieve this, I built eCOS with default template and 
changed the CYG_HAL_STARTUP to "ROM". After that I built my application. 
I got an ELF image of the same which I subsequently converted to UUE 
format and burnt into the flash at 0x01830000 address using the BSL 
rommodule. When I reset the board now I again get the same old RedBoot 
prompt (after 2 seconds). So what I did next was I enetered the BSL and 
assigned to PC the addrees 0x01830000 and then executed 'go' !!! nothing 
happened. Is the correct way of building and executing standalone 
programs or I have to make some ROM Module kind of a thing and then 
install it as I install other rom modules and then get it executed.

Regards,
Vipin

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

end of thread, other threads:[~2001-09-27  7:43 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-20  8:33 [ECOS] e7t ROM startup Ravi Kumar B S
2001-09-20 11:58 ` Jonathan Larmour
     [not found] <2330401A6FE03445ADA682F5EBB7502D02B181C0@mtv01ex01.mindtree.com>
2001-09-27  0:21 ` Jesper Skov
     [not found]   ` <019901c14727$86b9ba60$0f00a8c0@pig>
2001-09-27  0:48     ` Jesper Skov
2001-09-27  3:28       ` David Airlie
2001-09-27  4:15         ` Jesper Skov
2001-09-27  7:43           ` Simon
  -- strict thread matches above, loose matches on Subject: below --
2001-09-26  7:13 Ravi Kumar B S
     [not found] <2330401A6FE03445ADA682F5EBB7502D02B181B9@mtv01ex01.mindtree.com>
2001-09-25 23:34 ` Jesper Skov
2001-09-26  1:22   ` Simon
     [not found] <2330401A6FE03445ADA682F5EBB7502D02B181B4@mtv01ex01.mindtree.com>
2001-09-25  6:47 ` Jesper Skov
2001-09-25  7:14   ` Simon
2001-09-25  3:17 Ravi Kumar B S
2001-09-25  4:20 ` Jesper Skov
2001-09-26  7:52 ` Robert Cragie
2001-09-26 23:59   ` Jesper Skov
2001-09-20  4:42 Vipin Mehta
2001-09-20  5:14 ` Jesper Skov

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