From: SourceForge.net <no...@so...> - 2005-02-28 19:30:35
|
Bugs item #1153223, was opened at 2005-02-27 23:03 Message generated for change (Comment added) made by craigsteiner You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1153223&group_id=599 Category: msc51(8051) target Group: unreproducable >Status: Closed Resolution: None Priority: 5 Submitted By: Craig Steiner (craigsteiner) Assigned to: Nobody/Anonymous (nobody) Summary: Compiler produces incorrect code Initial Comment: The attached file will compile correctly if the USE_FUNCTION define is commented out. Running the program will correctly send "This is a test" to the serial port (assuming serial port is already configured). If USE_FUNCTION is defined and putcharacter() subroutine is used, the output to the serial port is garbage. It would appear the problem is because R2/R3 is used in SendSerial to point to the address of the string, but the value of R2 is overwritten at 2037h at the beginning of the putcharacter() routine. Command-line used to compile code: sdcc --code-loc 0x2000 --xram-loc 0x3000 --main-return --no-peep --model-small sdlib.c ---------------------------------------------------------------------- >Comment By: Craig Steiner (craigsteiner) Date: 2005-02-28 13:30 Message: Logged In: YES user_id=1228962 Sorry, it seems I had a mixture of SDCC versions on my system and there must have been a conflict somewhere. I made sure only the latest version was installed and it seems to be working fine now. Sorry for the hassle. ---------------------------------------------------------------------- Comment By: Maarten Brock (maartenbrock) Date: 2005-02-28 13:07 Message: Logged In: YES user_id=888171 Tried this with SDCC 2.4.0 and SDCC 2.4.8, but cannot reproduce your problem. Which version did you use and could you also upload the generated .asm file? ---------------------------------------------------------------------- Comment By: Craig Steiner (craigsteiner) Date: 2005-02-27 23:05 Message: Logged In: YES user_id=1228962 Sorry, file wasn't properly attached. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1153223&group_id=599 |