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: Andre-John Mas <ajmas at sympatico dot ca>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 21 Jun 2006 11:34:25 -0400
- Subject: [ECOS] re: Reading flash config value from application
- Reply-to: ajmas at bigfoot dot com
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