* Re: Re: [ECOS] re: Reading flash config value from application
@ 2006-06-21 18:11 Andre-John Mas
2006-06-22 9:21 ` St. Zarifakis
0 siblings, 1 reply; 4+ messages in thread
From: Andre-John Mas @ 2006-06-21 18:11 UTC (permalink / raw)
To: St. Zarifakis, ajmas; +Cc: ecos-discuss
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] re: Reading flash config value from application
2006-06-21 18:11 Re: [ECOS] re: Reading flash config value from application Andre-John Mas
@ 2006-06-22 9:21 ` St. Zarifakis
0 siblings, 0 replies; 4+ messages in thread
From: St. Zarifakis @ 2006-06-22 9:21 UTC (permalink / raw)
To: ajmas; +Cc: ecos-discuss
Andre-John Mas wrote:
>Trying that it gives me the output:
>
> fconfig test started
> ... done
>
>Any suggestions?
>
>
>
>
Uhhh - not really. A few dumb questions though ...
Does issuing a Redboot command fconfig -l -n show the variables as
expected ?
Do you have the virtual vector interface enabled
(CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT) ?
Stamatis
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [ECOS] re: Reading flash config value from application
2006-06-21 22:32 Andre-John Mas
@ 2006-06-21 22:43 ` Gary Thomas
0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2006-06-21 22:43 UTC (permalink / raw)
To: ajmas; +Cc: ecos-discuss
On Wed, 2006-06-21 at 18:32 -0400, Andre-John Mas wrote:
> 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?
No, it doesn't work that way. RedBoot only reads the 'fconfig'
data once from FLASH and then keeps a copy in RAM. When your
application tries to fetch data, it uses the RAM version.
>
> 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
> >
>
--
------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [ECOS] re: Reading flash config value from application
@ 2006-06-21 22:32 Andre-John Mas
2006-06-21 22:43 ` Gary Thomas
0 siblings, 1 reply; 4+ messages in thread
From: Andre-John Mas @ 2006-06-21 22:32 UTC (permalink / raw)
To: ecos-discuss
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-22 9:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-21 18:11 Re: [ECOS] re: Reading flash config value from application Andre-John Mas
2006-06-22 9:21 ` St. Zarifakis
2006-06-21 22:32 Andre-John Mas
2006-06-21 22:43 ` Gary Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).