cancel
Showing results for 
Search instead for 
Did you mean: 

Meaning of Cosmic's segment .bss size overflow error

Workalot
Associate III
Posted on December 05, 2010 at 08:02

Meaning of Cosmic's segment .bss size overflow error

3 REPLIES 3
luca239955_stm1_st
Senior II
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.

Workalot
Associate III
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?

Andrew Neil
Evangelist III
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