All,

I've been using SDCC with good success for about a year; I'm currently using 
version 2.7.0.  I'm in the process of developing an instrument that includes 
two Atmel AT89C51ED2 microprocessors, external UARTs, RS232 to TTL level 
converters, ADC, DAC, digital I/O, thermocouple amplifiers, a serial 
keypad/LCD, SPI interfaces, etc.  I've written all of the C code to drive these 
devices, and the entire system works well.

But, I've now run up against a problem that has me stymied.  On one of the 
microprocessors the current program uses about 255 bytes of XDATA 
(XRAM?).--almost all global variables.  And this program runs well.  Now, I 
need to add more features to the program so that the total bytes of XDATA 
exceeds 256 bytes.  When I do this, my program fails to run.  It seems that 
most--if not all--of the variables have zero (0) values.

I've read enough on-line about this problem to be dangerous and very confused.  
The advice that I've found ranges from that I should use the compiler option 
--no-xinit-opt to copy and adapt crtxinit.asm from the library and link it with 
my project to implement a custom __sdcc-external_startup program (to all of the 
above?).  I also see that maybe I should set 3 bits in the AUXR register to 
select the proper XRAM size, perhaps set the bit EXTRAM to 0, and maybe change 
a bit in the AUXR1 register.  I've used --no-xinit-opt and tried various 
combinations of bits in the AUXR and AUXR1 registers with no success, but I'm 
not sure how to implement the sdcc_external_startup program or how to modify 
and link crtxinit.asm.  Worse, as I'm sure you can tell by now, I'm not certain 
which ones of these multitude of "suggestions" should be implemented.

I don't mind putting in a lot of effort, but it seems the more I dig, the more 
confused I've become.  Any help on this problem would be appreciated, and I 
would be happy to look at other websites or other sources of information that 
you think would be helpful.

Thanks for your consideration of my problem!

Gary


________________________________
This communication is for the use of the intended recipient only. It may 
contain information that is privileged and confidential. If you are not the 
intended recipient of this communication, the disclosure, copying, distribution 
or use hereof is prohibited. If you have received this communication in error, 
please advise me by return e-mail or by telephone and then delete it 
immediately.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to