This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Reading flash config value from application
- From: Gary Thomas <gary at mlbassoc dot com>
- To: André-John Mas <ajmas at sympatico dot ca>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 16 Jun 2006 19:41:02 -0600
- Subject: Re: [ECOS] Reading flash config value from application
- References: <0857FC94-7C1D-4977-AF18-4A6C37CFB47F@sympatico.ca>
On Fri, 2006-06-16 at 19:22 -0400, AndrÃ-John Mas wrote:
> Hi,
>
> I use fconfig in my redboot to set an IP address for my card. What is
> the
> best way to read this IP address from my application, since
> flash_config.h
> seems to be part of the Redboot package.
You can do this using the Virtual Vectors interface into RedBoot.
The call:
CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET,
<fconfig_name>,
&result,
<type>)
Where <fconfig_name> is a string containing the 'fconfig' short name for
the data item (use 'fc -l -n' to see what the names are). The variable
<type> defines the type of data. You can find the #define's for these
in the include file "flash_config.h".
Note: the result of this call is a boolean - true if the data was
found, false if not.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss