This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: re: Reading flash config value from application
- From: Andre-John Mas <ajmas at sympatico dot ca>
- To: "St. Zarifakis" <stz at swistec dot de>,<ajmas at bigfoot dot com>
- Cc: <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 21 Jun 2006 14:11:05 -0400
- Subject: Re: Re: [ECOS] re: Reading flash config value from application
- Reply-to: ajmas at bigfoot dot com
Trying that it gives me the output:
fconfig test started
... done
Any suggestions?
Andre
St. Zarifakis wrote:
> Andre-John Mas wrote:
>
> >Hi,
> >
> >Just tried the code below and the 'CYGACC_CALL_IF_FLASH_CFG_OP' call returns false, just as in the code I had.
> >
> >Its possible as Thomas suggests that maybe I have code which does not match what Gary has. I am currrently using 2.0.51, I believe.
> >
> >
> Could you try the following code ? It should display all available
> variables. It works on my system which is eCosCentric's v2.0.50:
> HTH
> Stamatis
>
> #include <stdio.h>
>
> #include <pkgconf/hal.h>
> #include <cyg/hal/hal_if.h>
> #include <cyg/infra/diag.h>
>
> void test_func(void)
> {
> // Testfunktion 1: Ausgabe der fconfig-Variablen
> struct cyg_fconfig fc;
> char key[64];
>
> diag_printf("fconfig test started\n");
> fc.offset = 0;
> fc.key = key;
> fc.keylen = sizeof(key);
> while (CYGACC_CALL_IF_FLASH_CFG_OP2(CYGNUM_CALL_IF_FLASH_CFG_NEXT,
> &fc)) {
> diag_printf(" Offset: %d, key: '%s', type: %d\n", fc.offset,
> fc.key, fc.type);
> fc.keylen = sizeof(key);
> }
> // zurück
> diag_printf("... done\n");
> return;
> }
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss