Yet another problem with odd addresses on 18F!
This file:
radix dec
processor 18F4550
#include <p18f4550.inc>
code_pack
a:
db 0
b:
db 1
end
when compiled with "gpasm -c test.asm" (gputils SVN 545) hangs, apparently indefinitely, using 100% CPU. Note that if you remove the newline and put the "db 1" on the same line as the "b:", it appears to compile OK, though I haven't examined the output enough to figure out if it's really perfect. In any case this worked with mpasm :)
I compiled with debugging output, and here's the output I see before it dies:
00001 radix dec
00002 processor 18F4550
00003 #include <p18f4550.inc>
00001 LIST
00002
00003 ;==========================================================================
00004 ; $Id: p18f4550.inc 499 2007-11-05 23:29:39Z merc64 $
00005 ; MPASM PIC18F4550 processor include
00006 ;
00007 ; (c) Copyright 1999-2005 Microchip Technology, All rights reserved
00008 ;==========================================================================
00009
01642 LIST
00004
00005 code_pack
0000 00006 a:
0000 00 00007 db 0
0002 0000 0000 00008 b:
Anonymous
Logged In: YES
user_id=896846
Originator: NO
Thanks for finding this issue. I'm up to my elbows in some other major improvements right now, so I won't be able to get to it right away, but I'll try to tackle it as soon as everything's back to normal.
Logged In: YES
user_id=641851
Originator: YES
I discovered this problem in a moderately large project I'd like to switch over from MPLAB to gputils. In addition to the above crash, if I move the labels onto the same line as described, another problem shows up: the generated code is wrong! Jumps and calls point at some slightly-wrong addresses. If you like I can probably put together a simple test case that shows that problem as well.
I posted a patch for this onto the gputils list a day or two ago. I couldn't off-hand reproduce any problem with goto addresses, so if you have an example of that it'd be appreciated.
(I'm actually Hawk777; since SourceForge's HTTPS site doesn't seem to be available right now I'm not going to log in)
Looking on the gputils site, the only mailing list I could see was the gnupic@linuxhacker list. I looked at the archives for that list, and the most recent archive seems to be in July. Is this the list you were referring to, or is there another one I haven't found? If that's the one, could you perhaps e-mail me your patch directly? (hawk777@users.sourceforge.net should do the job)
Fixed in SVN r551 (thanks to Michael Ballbach, the one who posted the earlier comment about his patch).
And yes, gnupic@linuxhacker.org is the right mailing list. The archives seem to be out of date.
I can confirm that SVN 552 appears to work right with odd code addresses in my initial tests. Thanks to both of you!