From: SourceForge.net <no...@so...> - 2009-04-14 12:52:47
|
Bugs item #2761883, was opened at 2009-04-14 12:52 Message generated for change (Tracker Item Submitted) made by kjand You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=2761883&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kjell eirik (kjand) Assigned to: Nobody/Anonymous (nobody) Summary: Error when using xdata function parameters Initial Comment: In the following example func1 is called correctly but not func2. It seems that using xdata function parameters only work correctly when the function called is in the same file as the code which does the call. Compiled with sdcc version 2.8.0 : (Also fails with sdcc-snapshot-i586-mingw32msvc-20090406-5427.zip) sdcc -mmcs51 --model-small -c file1.c sdcc -mmcs51 --model-small -c file2.c sdcc -mmcs51 --model-small --code-loc 0x0000 --xram-loc 0x3000 file1.rel file2.rel Best regards, Kjell Eirik Andersen kje...@gm... // file1.c volatile char xdata xx1; volatile short int xdata xx2; extern void func2( char xdata p1, int xdata p2 ); void func1( char xdata p1, int xdata p2 ) { xx1 = p1; xx2 = p2; } main() { func1( 14, 16 ); func2( 19, 11 ); return 0; } // file2.c volatile char xdata yy1; volatile short int xdata yy2; void func2( char xdata p1, int xdata p2 ) { yy1 = p1; yy2 = p2; } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=2761883&group_id=599 |