Hi Arkadi, > Hello. > I'm having troubles with a custom delay functions that never returns. Same > code > compiled with PICC Lite compiler perform as expected.
Could you try to update to a recent SDCC version (snapshot) and compile your source file with --nooverlay (newly supported option for the pic14 port, since svn r5209, committed on 2008-08-10)? This should both blow up data memory usage and solve your problem. Then please report whether the problem is solved or not. A second workaround is to split your source into multiple files and have them linked afterwards. Move tx and delay into separate files solves this particular problem as well; however, any two functions of which one calls the other can potentially show the same behavior (locals/temporary values of the two functions are allocated into the same registers, so that the called function corrupts the calling function's state, in your case, the loop counter...). If I am right, this is the same problem as "[ sdcc-Bugs-2023121 ] compiler improperly reuses registers - pic14", which is being worked on already. The solution will use more data memory than currently, but should do better in many cases than --nooverlay. Regards, Raphael ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/sdcc-user
