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 07:00
Read: times


 
#176182 - no problem at my place
Responding to: ???'s previous message
#include <stdint.h>

typedef struct {
  uint16_t b;
  uint8_t a;
}  sometype;

 

#include "e.h"
extern __xdata sometype x;

void main(void) {
  x.a = 5;
}
 

#include "e.h"
__xdata sometype x;
 

c:tmpSDCC>sdcc -c e1.c

c:tmpSDCC>sdcc -c e.c

c:tmpSDCC>sdcc e.rel e1.rel

c:tmpSDCC>


                            120 ;	e.c:4: void main(void) {
                            121 ;	-----------------------------------------
                            122 ;	 function main
                            123 ;	-----------------------------------------
   0064                     124 _main:
                    0002    125 	ar2 = 0x02
                    0003    126 	ar3 = 0x03
                    0004    127 	ar4 = 0x04
                    0005    128 	ar5 = 0x05
                    0006    129 	ar6 = 0x06
                    0007    130 	ar7 = 0x07
                    0000    131 	ar0 = 0x00
                    0001    132 	ar1 = 0x01
                            133 ;	e.c:5: x.a = 5;
   0064 90 00 02            134 	mov	dptr,#(_x + 0x0002)
   0067 74 05               135 	mov	a,#0x05
   0069 F0                  136 	movx	@dptr,a
   006A 22                  137 	ret

 


Please go more into details with "does not work", and perhaps post a minimum example which exhibits the symptoms.

JW


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