public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Getting Configuration information from FLASH
@ 2002-04-08  7:09 Paul Fine
  2002-04-10 15:12 ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Fine @ 2002-04-08  7:09 UTC (permalink / raw)
  To: eCos discuss mailing list, eCos discuss mailing list; +Cc: tek, Patrick Doyle

I recently ran into a problem getting configuration information stored in 
FLASH into my application. After tracking the problem down, it appears 
that, while the Virtual Vector lookup is correctly getting to the 
flash_get_config() function, the region in memory where RedBoot had stashed 
the copy of the configuration structure had been overwritten in the startup 
process of my eCos application.

I solved the problem by adding some code to flash_get_config() which, after 
the call to flash_lookup_config() returns false, checks to see if the 
configuration structure is still valid. If not valid, the pointer to the 
configuration structure is set to point to the read only copy in FLASH, and 
checks again to see if it is valid.  If it is valid, then I will call 
flash_get_config and get my configuration item.

Has anyone else had this problem using this virtual vector call?  Unless I 
hear otherwise, I will submit the patch after I have tested it some more.


Paul Fine
Senior Member of Technical Staff
Delphi Communication Systems, Inc.


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

* Re: [ECOS] Getting Configuration information from FLASH
  2002-04-08  7:09 [ECOS] Getting Configuration information from FLASH Paul Fine
@ 2002-04-10 15:12 ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2002-04-10 15:12 UTC (permalink / raw)
  To: Paul Fine
  Cc: eCos discuss mailing list, eCos discuss mailing list, tek, Patrick Doyle

Paul Fine wrote:
> 
> I recently ran into a problem getting configuration information stored in
> FLASH into my application. After tracking the problem down, it appears
> that, while the Virtual Vector lookup is correctly getting to the
> flash_get_config() function, the region in memory where RedBoot had stashed
> the copy of the configuration structure had been overwritten in the startup
> process of my eCos application.
> 
> I solved the problem by adding some code to flash_get_config() which, after
> the call to flash_lookup_config() returns false, checks to see if the
> configuration structure is still valid. If not valid, the pointer to the
> configuration structure is set to point to the read only copy in FLASH, and
> checks again to see if it is valid.  If it is valid, then I will call
> flash_get_config and get my configuration item.
> 
> Has anyone else had this problem using this virtual vector call?  Unless I
> hear otherwise, I will submit the patch after I have tested it some more.

Actually I believe we came across it ourselves, or something very similar
in some other VV call. It does sound like your patch would be reasonable.

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

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

end of thread, other threads:[~2002-04-10 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08  7:09 [ECOS] Getting Configuration information from FLASH Paul Fine
2002-04-10 15:12 ` 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).