Skip to main content
Workalot
Associate III
December 5, 2010
Question

Meaning of Cosmic's segment .bss size overflow error

  • December 5, 2010
  • 3 replies
  • 1237 views
Posted on December 05, 2010 at 08:02

Meaning of Cosmic's segment .bss size overflow error

    This topic has been closed for replies.

    3 replies

    Andrew Neil
    Super User
    May 17, 2011
    Posted on May 17, 2011 at 15:11

    ''The page 9 reference (I had read it) escaped my understanding as to its ability to discern the Cosmic compiler.''

     

    It seems pretty clear to me - in what way would you have it changed?

    ''Perhaps a mention could be included in the manual?''

    Which manual do you mean?

    Since the Standard Peripheral Library supports both Cosmic & Raisonance compilers, its source code would seem like an obvious place to look to see how it distinguishes the two; eg, in stm8s.h:

     

    /******************************************************************************/

    /*                   Library configuration section                            */

    /******************************************************************************/

    /* Check the used compiler */

    #if defined(__CSMC__)

     #undef _RAISONANCE_

     #define _COSMIC_

     

     #define TINY @tiny

     #define NEAR @near

    #elif defined(__RCST7__)

     #undef _COSMIC_

     #define _RAISONANCE_

     #define TINY page0

     #define NEAR data

    #else

     #error ''Unsupported Compiler!''          /* Compiler defines not found */

    #endif

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Workalot
    WorkalotAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 15:11

    Thank you, and succinct. 

    The page 9 reference (I had read it) escaped my understanding as to its ability to discern the Cosmic compiler.  Perhaps a mention could be included in the manual?

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

    Hi,

    1744 is the size of the overflow, that is, the difference between the actual size of the segment and its maximum size (as specified by the -m parameter for that segment, in the linker file)

    As for your other question, I quote the user manual, page 9:

    The COSMIC compiler defines the __CSMC__ preprocessor symbol....

    Regards,

    Luca

    PS: note that when you have a linker error the map file is NOT created.