From: Strobl A. <a.s...@aw...> - 2008-05-13 12:46:45
|
Attached patch helped me, to compile the usb bootloader project from http://vasco.gforge.enseeiht.fr It is simply a revert to previous svn revisions of glue.c but I do not know, if this patch is the right way to fix the problem ... --- sdcc/src/pic16/glue.c (revision 5143) +++ sdcc/src/pic16/glue.c (working copy) @@ -547,13 +547,13 @@ switch (itype) { + case GPOINTER: case CPOINTER: case FUNCTION: sprintf (buf, "UPPER(%s)", iname); pic16_emitDS (buf, ptype, p); break; - case GPOINTER: case POINTER: sprintf (buf, "0x80"); pic16_emitDS (buf, ptype, p); Strobl Anton a.strobl (at) aws-it (dot) at Zitat von "SourceForge.net" <no...@so...>: > Bugs item #1961866, was opened at 2008-05-11 15:02 > Message generated for change (Tracker Item Submitted) made by Item Submitter > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1961866&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: pic16 target > Group: None > Status: Open > Resolution: None > Priority: 5 > Private: No > Submitted By: Andreas Czechanowski (acz) > Assigned to: Nobody/Anonymous (nobody) > Summary: pic16: data pointers instead of code pointers > > Initial Comment: > sdcc incorrectly writes pointers to data (bits 23:22 = "10") in > arrays pointing to other arrays which definitely reside in code space. > > A stripped-down example is attached, compile with: > sdcc -mpic16 -p18f2550 -c ptr_code_ptr.c > > the produced ptr_code_ptr.lst shows: > > 000A 00034 _boot_ep_fail: > 000A 0000 0080 00035 DB LOW(_boot_ep_init_cfg1), > HIGH(_boot_ep_init_cfg1), 0x80, LOW(_boot_ep_init_cfg1), > HIGH(_boot_ep_init_cfg1), 0x80 > 000E 8000 > > The only solution found is to include a __code directive in the > array definition. This gives: > > 0010 00037 _boot_ep_pass: > 0010 0000 0000 00038 DB LOW(_boot_ep_init_cfg1), > HIGH(_boot_ep_init_cfg1), UPPER(_boot_ep_init_cfg1), > LOW(_boot_ep_init_cfg1), HIGH(_boot_ep_init_cfg1), > UPPER(_boot_ep_init_cfg1) > 0014 0000 > > The problem showed when trying to build the PIC USB Framework (see > http://vasco.gforge.enseeiht.fr/). > It failed with sdcc-2.8.0 (SDCC : > mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 > 2.8.0 #5117 (May 1 2008) (UNIX)), > succeeded with sdcc-2.7.0 and older versions. > > Regards, > Andreas. > > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1961866&group_id=599 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-devel > > |