public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] App works in RAM but not in flash memory
@ 2001-08-16  9:42 Daniel.Andersson
  2001-08-16 10:30 ` Jonathan Larmour
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel.Andersson @ 2001-08-16  9:42 UTC (permalink / raw)
  To: jlarmour; +Cc: ecos-discuss

> Daniel.Andersson@combitechsystems.com wrote:
> > 
> > Hi,
> > 
> > I have some problem with my messages (cyg_mbox_*) in eCos 
> and hope that some
> > of you maybe can give me a hint of what maight be wrong. 
> Currently I am
> > running the entire application in RAM and it works fine. 
> However, when i
> > download the program it into flash then it starts acting 
> very strange. With
> > a trace enabled i can see that some (not all...) messages 
> that are sent
> > between threads dont have any valid data in their header. 
> Every message
> > contains of a header and the data that it contains is just 
> garbage. The
> > first thing i check was that if some process sends an 
> unfilled message but
> > that was not the case.
> > 
> > What can be wrong when an application works fine in RAM but 
> not in flash? I
> > have tried to set the clock to half the speed to give the 
> flash more time to
> > fetch data but the error was still present.
> > 
> > I am using a custom build AT91EB40 with external flash.
> 
> Seems odd certainly. I can't imagine a situation where it 
> would mostly but
> not completely work, in that way. If you had a support 
> contract I could
> look more closely by trying it myself, but otherwise I don't 
> have the time,
> sorry.
> 
> Which situation are you talking about: is it built for "ROM" 
> startup type
> and is running direct from Flash? Or is it built for RAM 
> startup, and being
> loaded into RAM from flash using "fis load"?
> 
> Jifl

I think i have located a few things that causes this error. I have had the
option "include gdb stub in HAL" marked and this is not a good combination
since they interfere with the rest of the code. When i disabled the above
options then I got less strange mbox messages. However, i still get a few
and i think that if i disable all the debug options (and GDB support) in
eCos then my app will run much better. However, I can't get all the debug
info to disaper. I have removed all the debug-flags in the makefiles, both
when building eCos and when building my application. I still get some "debug
info" and "debug lines" in my map-file on address 0x00. How can i remove all
such information?

Regards, Daniel

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

* Re: [ECOS] App works in RAM but not in flash memory
  2001-08-16  9:42 [ECOS] App works in RAM but not in flash memory Daniel.Andersson
@ 2001-08-16 10:30 ` Jonathan Larmour
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Larmour @ 2001-08-16 10:30 UTC (permalink / raw)
  To: Daniel.Andersson; +Cc: ecos-discuss

Daniel.Andersson@combitechsystems.com wrote:
> 
> I think i have located a few things that causes this error. I have had the
> option "include gdb stub in HAL" marked and this is not a good combination
> since they interfere with the rest of the code. When i disabled the above
> options then I got less strange mbox messages. However, i still get a few
> and i think that if i disable all the debug options (and GDB support) in
> eCos then my app will run much better.

GDB debugging support (i.e. -g) should never affect the run-time operation
of a program.

> However, I can't get all the debug
> info to disaper. I have removed all the debug-flags in the makefiles, both
> when building eCos and when building my application. I still get some "debug
> info" and "debug lines" in my map-file on address 0x00. How can i remove all
> such information?

That's source code debugging as used by GDB. They shouldn't be marked as
loadable and thus shouldn't be loaded onto your target at all. If they are,
that would be a bug :). You could remove them with objcopy, but I really
don't think this is likely to be your problem.

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] 10+ messages in thread

* Re: [ECOS] App works in RAM but not in flash memory
  2001-08-21  3:14     ` Prasad Kamath Nala
@ 2001-08-21  7:02       ` Jonathan Larmour
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Larmour @ 2001-08-21  7:02 UTC (permalink / raw)
  To: Prasad Kamath Nala; +Cc: eCos Disuss

Prasad Kamath Nala wrote:
> 
> Hi All,
>         I am trying to download the eCos1.3.1 for Windows from the site.  But,
> It says that "authorization failed".  What has to be done in order to download
> the eCos?

This is probably your FTP client failing to report properly that there are
too many connections. Try a mirror site:
http://sources.redhat.com/ecos/mirror.html

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] 10+ messages in thread

* Re: [ECOS] App works in RAM but not in flash memory
  2001-08-20  5:39   ` Fano Ramparany
@ 2001-08-21  3:14     ` Prasad Kamath Nala
  2001-08-21  7:02       ` Jonathan Larmour
  0 siblings, 1 reply; 10+ messages in thread
From: Prasad Kamath Nala @ 2001-08-21  3:14 UTC (permalink / raw)
  To: egcs; +Cc: eCos Disuss

Hi All,
        I am trying to download the eCos1.3.1 for Windows from the site.  But,
It says that "authorization failed".  What has to be done in order to download
the eCos?

regards
Prasad

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

* Re: [ECOS] App works in RAM but not in flash memory
  2001-08-17 11:29 ` Jonathan Larmour
  2001-08-20  5:39   ` Fano Ramparany
@ 2001-08-20  7:30   ` Fano Ramparany
  1 sibling, 0 replies; 10+ messages in thread
From: Fano Ramparany @ 2001-08-20  7:30 UTC (permalink / raw)
  To: eCos Disuss; +Cc: Jonathan Larmour, Daniel Andersson

(with the attachments this time... sorry)

Jonathan Larmour wrote:

> Fano Ramparany wrote:
>
> > My application uses the TCP/IP stack, and used to work (even under ROM
> > startup, but
> > with apparently some time out problems (see. a previous thread in the
> > mailing list
> > under subject "TCP/IP and rom startup mode")), until a major
> > reconfiguration of our intranet.
> > (incl. a change in our IP address). Now even the ping_test doesn't work
> > in ROM  startup mode, although
> > it works ok in RAM startup mode (using gdb).
> >

> My guess is it's something to do with the eth driver initialization.
> Perhaps the MAC address was set in the redboot config before.
>

Yes I used fconfig to set it (I've attached the current parameters below).
Curiously, it seems that init_all_network_interfaces doesn't take into
account the setup of the "ethernet station address" done with
ecos configuration tool (see hw_addr value in the second attachment)
either under RAM or ROM startup modes.

If the MAC address should not be set for the ip stack to work properly,
do you know how I can unset it?

>
> You could see if it also fails for RAM startup if you enabled the
> "CLAIM_COMMS" virtual vector option in the HAL config.

I've just done the test  with CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS
macro enabled under RAM startup mode, and ping_test runs just fine.

Fano



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

* Re: [ECOS] App works in RAM but not in flash memory
  2001-08-17 11:29 ` Jonathan Larmour
@ 2001-08-20  5:39   ` Fano Ramparany
  2001-08-21  3:14     ` Prasad Kamath Nala
  2001-08-20  7:30   ` Fano Ramparany
  1 sibling, 1 reply; 10+ messages in thread
From: Fano Ramparany @ 2001-08-20  5:39 UTC (permalink / raw)
  To: eCos Disuss; +Cc: Jonathan Larmour, Daniel Andersson

Jonathan Larmour wrote:

> Fano Ramparany wrote:
> >
> > I'm currently addressing the same problem (i.e. my application works
> > fine when built
> > for "RAM" startup type and don't works when built for "ROM" startup
> > type).
> >
> > My application uses the TCP/IP stack, and used to work (even under ROM
> > startup, but
> > with apparently some time out problems (see. a previous thread in the
> > mailing list
> > under subject "TCP/IP and rom startup mode")), until a major
> > reconfiguration of our intranet.
> > (incl. a change in our IP address). Now even the ping_test doesn't work
> > in ROM  startup mode, although
> > it works ok in RAM startup mode (using gdb).
>
> My guess is it's something to do with the eth driver initialization.
> Perhaps the MAC address was set in the redboot config before.

Yes I used fconfig to set it (I've attached the current parameters below).
Curiously, it seems that init_all_network_interfaces doesn't take into
account the setup of the "ethernet station address" done with
ecos configuration tool (see hw_addr value in the second attachment)
either under RAM or ROM startup modes.

If the MAC address should not be set for the ip stack to work properly,
do you know how I can unset it?

> You could see if it also fails for RAM startup if you enabled the
> "CLAIM_COMMS" virtual vector option in the HAL config.

I've just done the test  with CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS
macro enabled under RAM startup mode, and ping_test runs just fine.

Fano

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

* Re: [ECOS] App works in RAM but not in flash memory
  2001-08-17  2:56 Fano Ramparany
@ 2001-08-17 11:29 ` Jonathan Larmour
  2001-08-20  5:39   ` Fano Ramparany
  2001-08-20  7:30   ` Fano Ramparany
  0 siblings, 2 replies; 10+ messages in thread
From: Jonathan Larmour @ 2001-08-17 11:29 UTC (permalink / raw)
  To: Fano.Ramparany; +Cc: Daniel Andersson, eCos Disuss

Fano Ramparany wrote:
> 
> I'm currently addressing the same problem (i.e. my application works
> fine when built
> for "RAM" startup type and don't works when built for "ROM" startup
> type).
> 
> My application uses the TCP/IP stack, and used to work (even under ROM
> startup, but
> with apparently some time out problems (see. a previous thread in the
> mailing list
> under subject "TCP/IP and rom startup mode")), until a major
> reconfiguration of our intranet.
> (incl. a change in our IP address). Now even the ping_test doesn't work
> in ROM  startup mode, although
> it works ok in RAM startup mode (using gdb).
> 
> Daniel, as far as your cyg_mbox application is concerned, you could
> perhaps test the
> small application a send you off-line, and check whether is works in
> both startup mode. I've just
> checked that it works on my target (a Cirrus Logic EDB7212 board)
> 
> More generally, Jonathan, what is the best way to find out why a ROM
> startup application
> doesn't work when its RAM startup version runs ok?

My guess is it's something to do with the eth driver initialization.
Perhaps the MAC address was set in the redboot config before.

You could see if it also fails for RAM startup if you enabled the
"CLAIM_COMMS" virtual vector option in the HAL config.

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] 10+ messages in thread

* Re: [ECOS] App works in RAM but not in flash memory
@ 2001-08-17  2:56 Fano Ramparany
  2001-08-17 11:29 ` Jonathan Larmour
  0 siblings, 1 reply; 10+ messages in thread
From: Fano Ramparany @ 2001-08-17  2:56 UTC (permalink / raw)
  To: Daniel Andersson, Jonathan Larmour; +Cc: eCos Disuss

I'm currently addressing the same problem (i.e. my application works
fine when built
for "RAM" startup type and don't works when built for "ROM" startup
type).

My application uses the TCP/IP stack, and used to work (even under ROM
startup, but
with apparently some time out problems (see. a previous thread in the
mailing list
under subject "TCP/IP and rom startup mode")), until a major
reconfiguration of our intranet.
(incl. a change in our IP address). Now even the ping_test doesn't work
in ROM  startup mode, although
it works ok in RAM startup mode (using gdb).

Daniel, as far as your cyg_mbox application is concerned, you could
perhaps test the
small application a send you off-line, and check whether is works in
both startup mode. I've just
checked that it works on my target (a Cirrus Logic EDB7212 board)

More generally, Jonathan, what is the best way to find out why a ROM
startup application
doesn't work when its RAM startup version runs ok?

Fano

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

* Re: [ECOS] App works in RAM but not in flash memory
  2001-08-16  6:47 Daniel.Andersson
@ 2001-08-16  7:25 ` Jonathan Larmour
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Larmour @ 2001-08-16  7:25 UTC (permalink / raw)
  To: Daniel.Andersson; +Cc: ecos-discuss

Daniel.Andersson@combitechsystems.com wrote:
> 
> Hi,
> 
> I have some problem with my messages (cyg_mbox_*) in eCos and hope that some
> of you maybe can give me a hint of what maight be wrong. Currently I am
> running the entire application in RAM and it works fine. However, when i
> download the program it into flash then it starts acting very strange. With
> a trace enabled i can see that some (not all...) messages that are sent
> between threads dont have any valid data in their header. Every message
> contains of a header and the data that it contains is just garbage. The
> first thing i check was that if some process sends an unfilled message but
> that was not the case.
> 
> What can be wrong when an application works fine in RAM but not in flash? I
> have tried to set the clock to half the speed to give the flash more time to
> fetch data but the error was still present.
> 
> I am using a custom build AT91EB40 with external flash.

Seems odd certainly. I can't imagine a situation where it would mostly but
not completely work, in that way. If you had a support contract I could
look more closely by trying it myself, but otherwise I don't have the time,
sorry.

Which situation are you talking about: is it built for "ROM" startup type
and is running direct from Flash? Or is it built for RAM startup, and being
loaded into RAM from flash using "fis load"?

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] 10+ messages in thread

* [ECOS] App works in RAM but not in flash memory
@ 2001-08-16  6:47 Daniel.Andersson
  2001-08-16  7:25 ` Jonathan Larmour
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel.Andersson @ 2001-08-16  6:47 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I have some problem with my messages (cyg_mbox_*) in eCos and hope that some
of you maybe can give me a hint of what maight be wrong. Currently I am
running the entire application in RAM and it works fine. However, when i
download the program it into flash then it starts acting very strange. With
a trace enabled i can see that some (not all...) messages that are sent
between threads dont have any valid data in their header. Every message
contains of a header and the data that it contains is just garbage. The
first thing i check was that if some process sends an unfilled message but
that was not the case.

What can be wrong when an application works fine in RAM but not in flash? I
have tried to set the clock to half the speed to give the flash more time to
fetch data but the error was still present.

I am using a custom build AT91EB40 with external flash.

Regards, Daniel

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

end of thread, other threads:[~2001-08-21  7:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-16  9:42 [ECOS] App works in RAM but not in flash memory Daniel.Andersson
2001-08-16 10:30 ` Jonathan Larmour
  -- strict thread matches above, loose matches on Subject: below --
2001-08-17  2:56 Fano Ramparany
2001-08-17 11:29 ` Jonathan Larmour
2001-08-20  5:39   ` Fano Ramparany
2001-08-21  3:14     ` Prasad Kamath Nala
2001-08-21  7:02       ` Jonathan Larmour
2001-08-20  7:30   ` Fano Ramparany
2001-08-16  6:47 Daniel.Andersson
2001-08-16  7:25 ` Jonathan Larmour

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