From: SourceForge.net <no...@so...> - 2008-05-11 13:02:24
|
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 |