Skip to main content
srussell
Associate II
November 2, 2010
Question

Incrementing member of eeprom array

  • November 2, 2010
  • 3 replies
  • 1770 views
Posted on November 02, 2010 at 19:29

Incrementing member of eeprom array

    This topic has been closed for replies.

    3 replies

    luca239955_stm1_st
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 15:11

    Hi,

    I just tried the following

    @eeprom char ee_array[10];

    char index = 3;

    void pr1 (void)

    {

        ++ee_array[index];

    }

    and it compiles ok.

    Please post more details about your problem.

    Regards,

    Luca (Cosmic)

    luca239955_stm1_st
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 15:11

    Hi,

    this is fixed, but we don't plan a new release soon: if you don't have a simple workaround please contact me ( luca dot ubiali @ cosmic dot fr) and we'll see what we can do.

    Regards,

    Luca

    srussell
    srussellAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 15:11

    Sorry for the lengthy delay. I found a workaround for that situation and haven't had time to dig more deeply into it. On Friday a similar issue cropped up again, and this time I've been able to isolate it more. Here's a code snippet that doesn't compile for me:

    @eeprom unsigned char SceneLevel[32] = {0};                                              

    void ZW_SetSceneLevel(unsigned char sceneID, unsigned char level)                        

    {

       unsigned char sceneIndex = sceneID / 8;                                               

       SceneLevel[sceneIndex] |= 0x80;                                                       

    }

    I get the same issue as before, where the compiler exits with error code 1 and says that there was one error, but doesn't list what the error was.

    The compiler command line is:

    cxstm8 +warn +modsl0 +debug -pxp -no -pp -l -clDebug\ -coDebug\ src\testfile.c

    (I've removed some include and define directives from the command line because they're not used in this file)

    I'm using version 4.3.5