From: SourceForge.net <no...@so...> - 2012-07-10 09:25:28
|
Bugs item #3539804, was opened at 2012-07-03 10:03 Message generated for change (Comment added) made by diegoherranz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3539804&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: Fixed Priority: 5 Private: No Submitted By: Herbert Pötzl (hpoetzl) Assigned to: Borut Ražem (borutr) Summary: #pragma config and certain string constants Initial Comment: when combining (implicit?) string constants and #pragma config, the strings end up right after the CONFIG directives which leads to the following error and warning: $ sdcc --use-non-free -mpic16 -p18f26j50 config_bug.c config_bug.asm:485:Error[152] Executable code and data must be defined in an appropriate section. config_bug.asm:485:Warning[220] Address exceeds maximum range for this processor. ... $ sdcc -v SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.2.0 #7999 (Jul 3 2012) (Linux) $ gpasm -v gpasm-0.14.2 #711 (Jul 3 2012) from config_bug.asm: ; ; Starting pCode block CONFIG WDTEN=OFF ; ; Starting pCode block __str_0: DB 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x00 note: it might as well be a gputils issue but I presume that 'CONFIG' simply advances to the defined addresses and thus the following string ends up _after_ the config space which of course is bogus. ---------------------------------------------------------------------- Comment By: Diego Herranz (diegoherranz) Date: 2012-07-10 02:25 Message: IMHO, I think this bug isn't fixed. If you modify config_bug.c adding another pragma config like: #pragma config WDTPS = 1 You see this error again: $ sdcc --use-non-free -mpic16 -p18f26j50 config_bug.c config_bug.asm:487:Error[152] Executable code and data must be defined in an appropriate section. [...] Useful data: $ sdcc -v SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.2.0 #8008 (Jul 6 2012) (Linux) $ gpasm -v gpasm-0.14.2 #711 (Jul 9 2012) ---------------------------------------------------------------------- Comment By: Borut Ražem (borutr) Date: 2012-07-06 01:45 Message: Patch sdcc-3.2.0-config_fix.diff applied in svn revision #8008, since it is pic16 specific, it doesn't affect other targets and it is low risk. The more appropriate 'config' Map approach can be implemented after the SDCC 3.2.0 release, so I'm leaving this bug opened. Borut ---------------------------------------------------------------------- Comment By: Herbert Pötzl (hpoetzl) Date: 2012-07-03 14:29 Message: IMHO the best approach would be to move all the CONFIG directives to the beginning before any actual code is generated (tried that with a new 'config' Map but that didn't work and I'm lost in the sdcc source code :) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3539804&group_id=599 |