public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] MPC860 eCos application
@ 2003-12-12  3:24 nprasad3
  2003-12-12  9:20 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: nprasad3 @ 2003-12-12  3:24 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I have redboot working and i'm trying to write a simple application (just prints Hello eCos World!) but I seem to be missing something as redboot fails to load default .srec with the following message:

*** Abort! Attempt to load S-record to address: 0xfff00000, which is not in RAM

1. Built libtarget.a (Work with ROM Monitor, Startup Mode : RAM) - target.ld still has references to rom.
STARTUP(vectors.o)
ENTRY(__exception_reset)
INPUT(extras.o)
GROUP(libtarget.a libgcc.a libsupc++.a)
MEMORY
{
    ram : ORIGIN = 0x00001000, LENGTH = 0x1FFF000
    rom : ORIGIN = 0xfff00000, LENGTH = 0x800000
}

SECTIONS
{
    .vectors 0xfff00000 : { . = .; KEEP(*(.vectors)) } > rom
   .. etc (bunch of references to rom)
}

2. I modified the target.ld to change rom references to ram, [0xfff0000 -> 0x00007050] as redboot message is as [RAM: 0x00001000-0x02000000, 0x00007050-0x01fff000 available] and redboot loads the .srec file but my application does not run (*probably* its just the wrong printf i.e. target.ld is producing a copy of the printf whose state is different from the one redboot is using).

How can I make my application refer to code that's in ROM (redboot has the printf which is working) but run from RAM? 

Thanks in advance
Nirmal




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

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

* Re: [ECOS] MPC860 eCos application
  2003-12-12  3:24 [ECOS] MPC860 eCos application nprasad3
@ 2003-12-12  9:20 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2003-12-12  9:20 UTC (permalink / raw)
  To: nprasad3; +Cc: ecos-discuss

On Thu, 2003-12-11 at 18:55, nprasad3@gmu.edu wrote:
> Hi,
> 
> I have redboot working and i'm trying to write a simple application (just prints Hello eCos World!) but I seem to be missing something as redboot fails to load default .srec with the following message:
> 
> *** Abort! Attempt to load S-record to address: 0xfff00000, which is not in RAM
> 
> 1. Built libtarget.a (Work with ROM Monitor, Startup Mode : RAM) - target.ld still has references to rom.
> STARTUP(vectors.o)
> ENTRY(__exception_reset)
> INPUT(extras.o)
> GROUP(libtarget.a libgcc.a libsupc++.a)
> MEMORY
> {
>     ram : ORIGIN = 0x00001000, LENGTH = 0x1FFF000
>     rom : ORIGIN = 0xfff00000, LENGTH = 0x800000
> }
> 
> SECTIONS
> {
>     .vectors 0xfff00000 : { . = .; KEEP(*(.vectors)) } > rom
>    .. etc (bunch of references to rom)
> }
> 
> 2. I modified the target.ld to change rom references to ram, [0xfff0000 -> 0x00007050] as redboot message is as [RAM: 0x00001000-0x02000000, 0x00007050-0x01fff000 available] and redboot loads the .srec file but my application does not run (*probably* its just the wrong printf i.e. target.ld is producing a copy of the printf whose state is different from the one redboot is using).
> 
> How can I make my application refer to code that's in ROM (redboot has the printf which is working) but run from RAM? 

Try generating a whole new build tree just for this.  Trying to adjust
one from ROM to RAM mode is error-prone.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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

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

* Re: [ECOS] MPC860 eCos application
  2003-12-12 15:07 nprasad3
@ 2003-12-12 15:08 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2003-12-12 15:08 UTC (permalink / raw)
  To: nprasad3; +Cc: ecos-discuss

On Fri, 2003-12-12 at 07:56, nprasad3@gmu.edu wrote:
> Gary,
> 
> I started with a clean build for libTarget (setup startup 
> configuration as RAM) but it seems to be always picking 
> up the <variant>_rom.ldi file (<variant>_ram.ldi looks a 
> bit different and has no rom section). I have verified 
> my .cdl file several times but for some strange reason 
> during build the wrong .ldi file is included.
> 
> The configtool gui shows that it will use <variant>_ram.ldi 
> but still <variant>_rom.ldi contents show up in target.ld

What does "clean build" mean?  Try starting absolutely fresh,
in a new directory, etc.  See the earlier thread today labeled
  "Re: [ECOS] Run Redboot from flash"
for details on how to do this.

> 
> ----- Original Message -----
> From: Gary Thomas <gary@mlbassoc.com>
> Date: Thursday, December 11, 2003 11:08 pm
> Subject: Re: [ECOS] MPC860 eCos application
> 
> > On Thu, 2003-12-11 at 18:55, nprasad3@gmu.edu wrote:
> > > Hi,
> > > 
> > > I have redboot working and i'm trying to write a simple 
> > application (just prints Hello eCos World!) but I seem to be 
> > missing something as redboot fails to load default .srec with the 
> > following message:
> > > 
> > > *** Abort! Attempt to load S-record to address: 0xfff00000, 
> > which is not in RAM
> > > 
> > > 1. Built libtarget.a (Work with ROM Monitor, Startup Mode : RAM) 
> > - target.ld still has references to rom.
> > > STARTUP(vectors.o)
> > > ENTRY(__exception_reset)
> > > INPUT(extras.o)
> > > GROUP(libtarget.a libgcc.a libsupc++.a)
> > > MEMORY
> > > {
> > >     ram : ORIGIN = 0x00001000, LENGTH = 0x1FFF000
> > >     rom : ORIGIN = 0xfff00000, LENGTH = 0x800000
> > > }
> > > 
> > > SECTIONS
> > > {
> > >     .vectors 0xfff00000 : { . = .; KEEP(*(.vectors)) } > rom
> > >    .. etc (bunch of references to rom)
> > > }
> > > 
> > > 2. I modified the target.ld to change rom references to ram, 
> > [0xfff0000 -> 0x00007050] as redboot message is as [RAM: 
> > 0x00001000-0x02000000, 0x00007050-0x01fff000 available] and 
> > redboot loads the .srec file but my application does not run 
> > (*probably* its just the wrong printf i.e. target.ld is producing 
> > a copy of the printf whose state is different from the one redboot 
> > is using).
> > > 
> > > How can I make my application refer to code that's in ROM 
> > (redboot has the printf which is working) but run from RAM? 
> > 
> > Try generating a whole new build tree just for this.  Trying to adjust
> > one from ROM to RAM mode is error-prone.
> > 
> > -- 
> > Gary Thomas <gary@mlbassoc.com>
> > MLB Associates
> > 
> > 
> > -- 
> > Before posting, please read the FAQ: 
> > http://sources.redhat.com/fom/ecosand search the list archive: 
> > http://sources.redhat.com/ml/ecos-discuss
> > 
> > 
> > 
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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

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

* Re: [ECOS] MPC860 eCos application
@ 2003-12-12 15:07 nprasad3
  2003-12-12 15:08 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: nprasad3 @ 2003-12-12 15:07 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

Gary,

I started with a clean build for libTarget (setup startup configuration as RAM) but it seems to be always picking up the <variant>_rom.ldi file (<variant>_ram.ldi looks a bit different and has no rom section). I have verified my .cdl file several times but for some strange reason during build the wrong .ldi file is included.

The configtool gui shows that it will use <variant>_ram.ldi but still <variant>_rom.ldi contents show up in target.ld

Thanks in advance
Nirmal


----- Original Message -----
From: Gary Thomas <gary@mlbassoc.com>
Date: Thursday, December 11, 2003 11:08 pm
Subject: Re: [ECOS] MPC860 eCos application

> On Thu, 2003-12-11 at 18:55, nprasad3@gmu.edu wrote:
> > Hi,
> > 
> > I have redboot working and i'm trying to write a simple 
> application (just prints Hello eCos World!) but I seem to be 
> missing something as redboot fails to load default .srec with the 
> following message:
> > 
> > *** Abort! Attempt to load S-record to address: 0xfff00000, 
> which is not in RAM
> > 
> > 1. Built libtarget.a (Work with ROM Monitor, Startup Mode : RAM) 
> - target.ld still has references to rom.
> > STARTUP(vectors.o)
> > ENTRY(__exception_reset)
> > INPUT(extras.o)
> > GROUP(libtarget.a libgcc.a libsupc++.a)
> > MEMORY
> > {
> >     ram : ORIGIN = 0x00001000, LENGTH = 0x1FFF000
> >     rom : ORIGIN = 0xfff00000, LENGTH = 0x800000
> > }
> > 
> > SECTIONS
> > {
> >     .vectors 0xfff00000 : { . = .; KEEP(*(.vectors)) } > rom
> >    .. etc (bunch of references to rom)
> > }
> > 
> > 2. I modified the target.ld to change rom references to ram, 
> [0xfff0000 -> 0x00007050] as redboot message is as [RAM: 
> 0x00001000-0x02000000, 0x00007050-0x01fff000 available] and 
> redboot loads the .srec file but my application does not run 
> (*probably* its just the wrong printf i.e. target.ld is producing 
> a copy of the printf whose state is different from the one redboot 
> is using).
> > 
> > How can I make my application refer to code that's in ROM 
> (redboot has the printf which is working) but run from RAM? 
> 
> Try generating a whole new build tree just for this.  Trying to adjust
> one from ROM to RAM mode is error-prone.
> 
> -- 
> Gary Thomas <gary@mlbassoc.com>
> MLB Associates
> 
> 
> -- 
> Before posting, please read the FAQ: 
> http://sources.redhat.com/fom/ecosand search the list archive: 
> http://sources.redhat.com/ml/ecos-discuss
> 
> 
> 


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

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

end of thread, other threads:[~2003-12-12 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-12  3:24 [ECOS] MPC860 eCos application nprasad3
2003-12-12  9:20 ` Gary Thomas
2003-12-12 15:07 nprasad3
2003-12-12 15:08 ` Gary Thomas

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