gnupic: Yikes, I crashed GPAL
Subject:
Re: Yikes, I crashed GPAL
From:
Craig Franklin ####@####.####
Date:
24 Oct 2004 19:53:43 +0100
Message-Id: <417BB432.7090208@users.sourceforge.net>
David McNab wrote:
> Hi Craig,
>
> Thanks for your replies.
>
> I'm starting to get the hang of it, but have hit a roadblock with a
> fairly simple program that crashes GPAL.
>
> Tarball attached.
>
> Also, I'm finding that if I compile to assembler, then assemble/link,
> I'm seeing combinations of:
> - gpasm failing
> - gplink segfaulting
>
Everything compiles, assembles and links fine for me.
Update your cvs and try again. There is one gpal bug you might
experience, but everything else should work. After I commit my latest
changes the gpal bug will be gone.
> Cheers
> David
>
> PS I'm glad you're committing to CVS. I tried building from CVS, but
> the build failed with (errors following). Hopefully when the commits
> are done, things will build ok. (BTW, I'm on Debian unstable, with
> 2.6.9 kernel, most other things up to date).
>
> Making all in gpasm
> make[2]: Entering directory `/home/david/picaxe/software/gputils/gpasm'
> if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../libgputils -I../include
> -Wall -pedantic -g -O2 -MT scan.o -MD -MP -MF ".deps/scan.Tpo" -c -o
> scan.o scan.c; \
> then mv -f ".deps/scan.Tpo" ".deps/scan.Po"; else rm -f
> ".deps/scan.Tpo"; exit 1; fi
> scan.l: In function `execute_macro':
> scan.l:614: warning: ISO C forbids use of conditional expressions as
> lvalues
> scan.l:614: error: invalid lvalue in assignment
> scan.l: In function `repeat_while':
> scan.l:635: warning: ISO C forbids use of conditional expressions as
> lvalues
> scan.l:635: error: invalid lvalue in assignment
> scan.l: At top level:
> scan.c:2323: warning: `yyunput' defined but not used
> make[2]: *** [scan.o] Error 1
> make[2]: Leaving directory `/home/david/picaxe/software/gputils/gpasm'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/david/picaxe/software/gputils'
> make: *** [all] Error 2
>
Check your version of flex. gputils supports 2.5.4(a).
>
> Craig Franklin wrote:
>
>> David McNab wrote:
>>
>>> Hi,
>>>
>>> How do I import another module into a GPAL module?
>>>
>>> For instance, the following 'hello world' program:
>>>
>>> module helloleds is
>>>
>>> pragma processor = "16f873a";
>>>
>> with p16f873a;
>>
>>> procedure main is
>>> begin
>>> p16f873a.TRISB = 0x00;
>>> p16f873a.PORTB = 0xa5;
>>> end procedure;
>>>
>>> end module;
>>>
>>> I've spent a couple of frustrating hours trying to figure out how to
>>> get this thing to compile.
>>
>>
>>
>> gpal p16f873a.pub helloleds.pal
>>
>>> No mention in the docs of how to import needed modules and access
>>> their namespaces.
>>>
>> From the manual:
>>
>> 2.6.11 With
>>
>> with <name>;
>>
>> The with statement tells the compiler to add the data
>> from the public <name> to its symbol tables. This will
>> allow access to that module's subprograms and data.
>>
>>
>> I am committing big changes to gpal now. If you have any
>> recommendations I am listening.
>>
>>> Please help
>>>
>>
>>
>>