public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Re:e7t ROM startup
@ 2001-09-25  6:36 Ravi Kumar B S
  0 siblings, 0 replies; 3+ messages in thread
From: Ravi Kumar B S @ 2001-09-25  6:36 UTC (permalink / raw)
  To: ecos-discuss

hi,

You may want to use a binary editor to look at the resulting binary
image and make sure it follows the required format=3D20
-hi i tried using od(octal dump) to see if i can make out some thing =3D
from the
image. but i could not follow much as i am trying the od for the first =
=3D
time.=3D20
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 =3D
checked and
how it could be done?
i still doubt the image creation as the one which is falty. but done =3D
know
where it could be. i am totally stuck now.
thanks,
regards,
/Ravi kumar

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

* RE: [ECOS] Re:e7t ROM startup
  2001-09-26  8:26 Ravi Kumar B S
@ 2001-09-26 10:28 ` Robert Cragie
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Cragie @ 2001-09-26 10:28 UTC (permalink / raw)
  To: Ravi Kumar B S, ecos-discuss

OK - I see now it is a lot more involved than I initially thought.

Robert

> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [ mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Ravi Kumar B
> S
> Sent: 26 September 2001 16:27
> To: ecos-discuss@sources.redhat.com
> Subject: [ECOS] Re:e7t ROM startup
> 
> 
> hi,
>  thanks for reply.
> i tried what ever you have suggested. but without any success.=20
> 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.
> i tried using the flashload but it is not giving any success.
> 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.
> i dont think that BSL will add any thing to our application. because =
> when
> building the redboot the module header is explicitly added(
> packages/hal/arm/e7t/current/cdl/hal_arm_e7t.cdl). and i am able to =
> build the
> redboot and put it in the flash and see that it is listed when i say
> 'rommodules'. what  really wonder is if it is possible to add the module
> header for the redboot why cant it be added for any other application =
> and
> make it work similarly. that is why i still doubt that i am missing in =
> adding
> the modul header. is it possible to look at the make file and the module
> header file and tell me if i am missing anything.
> thanks and regards,
> /Ravi kumar.
> > 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=3D`$(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>
> >
> > /* ARM e7t module stuff */
> >
> > #ifndef CHECKSUM
> >     #define CHECKSUM  0x0
> > #endif
> >
> > extern char __exception_handlers, __rom_data_end;
> >
> > const char __title[] =3D "Counter";
> > const char __help[] =3D "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 =3D
> > {
> >     0x4D484944,             /* identifies the module header */
> >     2,                      /* flag =3D 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);
> >
> >
> 

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

* [ECOS] Re:e7t ROM startup
@ 2001-09-26  8:26 Ravi Kumar B S
  2001-09-26 10:28 ` Robert Cragie
  0 siblings, 1 reply; 3+ messages in thread
From: Ravi Kumar B S @ 2001-09-26  8:26 UTC (permalink / raw)
  To: ecos-discuss

hi,
 thanks for reply.
i tried what ever you have suggested. but without any success.=20
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.
i tried using the flashload but it is not giving any success.
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.
i dont think that BSL will add any thing to our application. because =
when
building the redboot the module header is explicitly added(
packages/hal/arm/e7t/current/cdl/hal_arm_e7t.cdl). and i am able to =
build the
redboot and put it in the flash and see that it is listed when i say
'rommodules'. what  really wonder is if it is possible to add the module
header for the redboot why cant it be added for any other application =
and
make it work similarly. that is why i still doubt that i am missing in =
adding
the modul header. is it possible to look at the make file and the module
header file and tell me if i am missing anything.
thanks and regards,
/Ravi kumar.
> 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=3D`$(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>
>
> /* ARM e7t module stuff */
>
> #ifndef CHECKSUM
>     #define CHECKSUM  0x0
> #endif
>
> extern char __exception_handlers, __rom_data_end;
>
> const char __title[] =3D "Counter";
> const char __help[] =3D "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 =3D
> {
>     0x4D484944,             /* identifies the module header */
>     2,                      /* flag =3D 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);
>
>

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

end of thread, other threads:[~2001-09-26 10:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-25  6:36 [ECOS] Re:e7t ROM startup Ravi Kumar B S
2001-09-26  8:26 Ravi Kumar B S
2001-09-26 10:28 ` Robert Cragie

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