This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Getting Configuration information from FLASH


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]