Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/26/10 16:15
Read: times


 
#176194 - I ma stuck on the next one
Responding to: ???'s previous message
I stole an array from a Keil build where it (without the 'comment outs') built without problems, with SDCC I get "warning 147 excess elements in arreay of chars initializer after 'GCCAlanbas'.

To attempt to find out I started selective comment outs (see below for the results)


the definitions:
#define LRB_START_LGTH 4 // WD4- 
#define LRB_ID_LGTH    2 // 1=
#define LRB_ST_LGTH    4 // OK  /WET /ALRM
#define LRB_SP_LGTH    1 // -
#define LRB_TM_LGTH    3 // # cr lf



the struct:
// LAN record structured to make changes easy
typedef struct
{
U8        LRBstart[LRB_START_LGTH]  ; // preamble

U8        LRBid1[LRB_ID_LGTH]       ; // identifier
U8        LRBst1[LRB_ST_LGTH]       ; // status
U8        LRBsp1[LRB_SP_LGTH]       ; // separator

U8        LRBid2[LRB_ID_LGTH]       ; // identifier
U8        LRBst2[LRB_ST_LGTH]       ; // status
U8        LRBsp2[LRB_SP_LGTH]       ; // separator

U8        LRBid3[LRB_ID_LGTH]       ; // identifier
U8        LRBst3[LRB_ST_LGTH]       ; // status
U8        LRBsp3[LRB_SP_LGTH]       ; // separator

U8        LRBid4[LRB_ID_LGTH]       ; // identifier
U8        LRBst4[LRB_ST_LGTH]       ; // status

U8        LRBterm[LRB_TM_LGTH]      ; // terminator
} STR_LAN_REC_BAS;



for this use I have added lengths in the comments to make check easy
__code STR_LAN_REC_BAS GCCSlanbas =
{
//  { "WD4-" },         // LRBstart[LRB_START_LGTH] ; 4 // preamble      PLACE 1
                                                                      
//  { "1=" },           // LRBid1[LRB_ID_LGTH]      ; 2 // identifier    
//  { "OK  " },         // LRBst1[LRB_ST_LGTH]      ; 4 // status        
//  { "-" },            // LRBsp1[LRB_SP_LGTH]      ; 1 // separator     
                                                                      
//  { "2=" },           // LRBid2[LRB_ID_LGTH]      ; 2 // identifier    
//  { "OK  " },         // LRBst2[LRB_ST_LGTH]      ; 4 // status        
//  { "-" },            // LRBsp2[LRB_SP_LGTH]      ; 1 // separator     
//                                                                      
//  { "3=" },           // LRBid3[LRB_ID_LGTH]      ; 2 // identifier    
//  { "OK  " },         // LRBst3[LRB_ST_LGTH]      ; 4 // status        
//  { "-" },            // LRBsp3[LRB_SP_LGTH]      ; 1 // separator     
//                                                                      
//  { "4=" },           // LRBid4[LRB_ID_LGTH]      ; 2 // identifier    
//  { "OK  " },         // LRBst4[LRB_ST_LGTH]      ; 4 // status        
//                                                                      
//  { '#', 0x0d, 0x0a}  // LRBterm[LRB_TM_LGTH]     ; 3 // terminator   PLACE 2
  
//  {0}                                                                 PLACE 3
      
};


the result of the 'comment outs':

uncommenting 3: no error
uncommenting 2: no error
uncommenting 1 + 3: error


any help will be greatly appreciated

Erik

List of 51 messages in thread
TopicAuthorDate
SDCC debug            01/01/70 00:00      
   version            01/01/70 00:00      
      2.9.0 #5416            01/01/70 00:00      
         humm            01/01/70 00:00      
            files            01/01/70 00:00      
               General Comments            01/01/70 00:00      
                  stating the problem            01/01/70 00:00      
               why would that be impossible?            01/01/70 00:00      
                  omf smaller than hex            01/01/70 00:00      
                     link, please            01/01/70 00:00      
                        links            01/01/70 00:00      
   played with the commandline options and ...            01/01/70 00:00      
      What do you mean by "blows in startup"?            01/01/70 00:00      
         goes to undefined memory and never reaches main            01/01/70 00:00      
            try one of these options            01/01/70 00:00      
               Thanks, It'll be a day or two            01/01/70 00:00      
                  SiLabs or not            01/01/70 00:00      
                     yes, SILabs            01/01/70 00:00      
                        breakpoint            01/01/70 00:00      
   found a cause, but ....            01/01/70 00:00      
      disassembly            01/01/70 00:00      
      not having _sdcc_external_startup            01/01/70 00:00      
      seems you feed SDCC with a Keil specific header file            01/01/70 00:00      
         false entry, sorry            01/01/70 00:00      
         reply            01/01/70 00:00      
            legal C reused by Keil            01/01/70 00:00      
               3 questions            01/01/70 00:00      
                  3 answers            01/01/70 00:00      
                     thnks for 3 answers and more stuff            01/01/70 00:00      
                        incomplete            01/01/70 00:00      
               since 'porting' to SDCC ...            01/01/70 00:00      
                  agreed!            01/01/70 00:00      
   neither works, what do I do            01/01/70 00:00      
      no problem at my place            01/01/70 00:00      
   I ma stuck on the next one            01/01/70 00:00      
      strings in C            01/01/70 00:00      
         Thanks, Jan ....            01/01/70 00:00      
            that's the kosher way            01/01/70 00:00      
         No, the string shall fit according to the C standard            01/01/70 00:00      
            indeed            01/01/70 00:00      
      bug found            01/01/70 00:00      
         read again            01/01/70 00:00      
         somehow the SDCC forum did not take my post...            01/01/70 00:00      
            sdcc.exe does return an error status            01/01/70 00:00      
               why would you think that?            01/01/70 00:00      
                  grep etc            01/01/70 00:00      
                     Unix goodies            01/01/70 00:00      
            sdcc forum post visible            01/01/70 00:00      
               what are you doing diffrently?            01/01/70 00:00      
                  DOS bat command gotcha            01/01/70 00:00      
                     Thanks Jan            01/01/70 00:00      

Back to Subject List