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: <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 21 Jun 2006 18:32:44 -0400
- Subject: Re: Re: [ECOS] re: Reading flash config value from application
- Reply-to: ajmas at bigfoot dot com
I have uncommented the CHATTER in flash.c and see the read being called in the Redboot, but not in my application when I use the 'CYGACC_CALL_IF_FLASH_CFG_OP2' call. Am I meant to be calling something to load the data from the flash, so it is available to the macro?
Andre
>
> From: "St. Zarifakis" <stz@swistec.de>
> Date: 2006/06/21 Wed PM 12:04:07 EDT
> To: ajmas@bigfoot.com
> CC: ecos-discuss@sources.redhat.com
> Subject: Re: [ECOS] re: Reading flash config value from application
>
> Hi,
>
> 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
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss