[ECOS] re: Reading flash config value from application

St. Zarifakis stz@swistec.de
Wed Jun 21 16:04:00 GMT 2006


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.
Could you try the following code ? It should display all available 
variables. It works on my system which is eCosCentric's v2.0.50:

#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);
&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");

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list