Skip to main content
Visitor II
September 12, 2007
Question

Compiler bug 4.5.5

  • September 12, 2007
  • 2 replies
  • 682 views
Posted on September 12, 2007 at 07:30

Compiler bug 4.5.5

    This topic has been closed for replies.

    2 replies

    rravalAuthor
    Visitor II
    September 10, 2007
    Posted on September 10, 2007 at 12:58

    Hi There,

    Can anyone came across this problem ?

    Here is my problem:

    I want to locate my function pointer array to code memory area. Here is how my code looks like:

    void (* const Fptr[GRIP_MENUS])(void) = {

    CheckGHome,

    CheckGBandp,

    CheckGPNap,

    CheckGripMax,

    CheckGRHome,

    CheckFingerC,

    CheckFingerC,

    CheckSpread,

    CheckWrap,

    BandClicks,

    NapkinClicks,

    TopClicks,

    NULL

    };

    As per my knowledge, when you have declared a variable .const it should go to 0xc000 to 0xffff segment. ( I am using COSMIC compiler 4.5.5 and my processor is ST72621)

    Instead it generates this error ....

    #error clnk Debug\diagnosis.lkf:1 bad address (0x1f5) for zero page symbol _Text

    >>This was generated by V4.5.5

    >> PLEASE NOTE THAT THE SAME CODE HAS DESIRED EFFECT WITH REV 4.2e of compiler. THE NEW REV has some problems identifying function pointers with .const qualifiers.

    Any ideas ?

    Visitor II
    September 12, 2007
    Posted on September 12, 2007 at 07:30

    as I explained directly to you, the problem comes from the code, where the same variable is declared @near once and @tiny (implicitely) in another file. The old compiler was less strict for this kind of check.

    Regards,

    Luca (Cosmic)