This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Getting Configuration information from FLASH
- From: Paul Fine <pfine at delcomsys dot com>
- To: "eCos discuss mailing list, eCos discuss mailing list" <ecos-discuss at sources dot redhat dot com>
- Cc: tek at delcomsys dot com,Patrick Doyle <wpd at delcomsys dot com>
- Date: Mon, 08 Apr 2002 10:13:40 -0400
- Subject: [ECOS] Getting Configuration information from FLASH
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