This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Getting Configuration information from FLASH
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Paul Fine <pfine at delcomsys dot com>
- Cc: "eCos discuss mailing list, eCos discuss mailing list" <ecos-discuss at sources dot redhat dot com>,tek at delcomsys dot com, Patrick Doyle <wpd at delcomsys dot com>
- Date: Wed, 10 Apr 2002 23:12:26 +0100
- Subject: Re: [ECOS] Getting Configuration information from FLASH
- Organization: Red Hat UK Ltd.
- References: <5.1.0.14.0.20020408095258.00a5e530@pop.harvard.net>
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