* [ECOS] re: Reading flash config value from application
@ 2006-06-21 15:34 Andre-John Mas
2006-06-21 15:40 ` Gary Thomas
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Andre-John Mas @ 2006-06-21 15:34 UTC (permalink / raw)
To: ecos-discuss
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.
#include <stdio.h>
#include <cyg/kernel/kapi.h>
#include <cyg/hal/hal_if.h>
#include <network.h>
#define CONFIG_IP 5
int
main(int argc, char *argv[])
{
unsigned long addr;
if (CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET,
"bootp_my_ip",
&addr,
CONFIG_IP)) {
diag_dump_buf(&addr, sizeof(addr));
} else {
printf("Can't get 'bootp_my_ip'\n");
}
printf("fconfig_test done\n");
return 0;
}
--
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] 5+ messages in thread
* Re: [ECOS] re: Reading flash config value from application
2006-06-21 15:34 [ECOS] re: Reading flash config value from application Andre-John Mas
@ 2006-06-21 15:40 ` Gary Thomas
2006-06-21 16:04 ` St. Zarifakis
2006-06-22 12:58 ` [ECOS] " John Dallaway
2 siblings, 0 replies; 5+ messages in thread
From: Gary Thomas @ 2006-06-21 15:40 UTC (permalink / raw)
To: ajmas; +Cc: ecos-discuss
On Wed, 2006-06-21 at 11:34 -0400, 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.
This version number only means something to eCosCentric. It corresponds
to a pretty old version of eCos (around 2 years old).
I tested using the most up-to-date eCos from CVS. It looks like
if you want this to work, you'll need to update your repository.
--
------------------------------------------------------------
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] 5+ messages in thread
* Re: [ECOS] re: Reading flash config value from application
2006-06-21 15:34 [ECOS] re: Reading flash config value from application Andre-John Mas
2006-06-21 15:40 ` Gary Thomas
@ 2006-06-21 16:04 ` St. Zarifakis
2006-06-22 12:58 ` [ECOS] " John Dallaway
2 siblings, 0 replies; 5+ messages in thread
From: St. Zarifakis @ 2006-06-21 16:04 UTC (permalink / raw)
To: ajmas; +Cc: ecos-discuss
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ECOS] Re: Reading flash config value from application
2006-06-21 15:34 [ECOS] re: Reading flash config value from application Andre-John Mas
2006-06-21 15:40 ` Gary Thomas
2006-06-21 16:04 ` St. Zarifakis
@ 2006-06-22 12:58 ` John Dallaway
2 siblings, 0 replies; 5+ messages in thread
From: John Dallaway @ 2006-06-22 12:58 UTC (permalink / raw)
To: ecos-discuss
Andre-John Mas wrote:
> 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.
For the record, I can confirm that CYGACC_CALL_IF_FLASH_CFG_OP() is
working correctly on Adder II in eCosPro 2.0.51 for retrieval of the
RedBoot IP address.
John Dallaway
eCosCentric Limied
--
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] 5+ messages in thread
* Re: [ECOS] re: Reading flash config value from application
2006-06-21 18:11 Re: [ECOS] " Andre-John Mas
@ 2006-06-22 9:21 ` St. Zarifakis
0 siblings, 0 replies; 5+ 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] 5+ messages in thread
end of thread, other threads:[~2006-06-22 12:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-21 15:34 [ECOS] re: Reading flash config value from application Andre-John Mas
2006-06-21 15:40 ` Gary Thomas
2006-06-21 16:04 ` St. Zarifakis
2006-06-22 12:58 ` [ECOS] " John Dallaway
2006-06-21 18:11 Re: [ECOS] " Andre-John Mas
2006-06-22 9:21 ` St. Zarifakis
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).