gnupic: Yikes, I crashed GPAL


Previous by date: 24 Oct 2004 18:08:01 +0100 Re: Here's a simple working GPAL example, Craig Franklin
Next by date: 24 Oct 2004 18:08:01 +0100 Re: Yikes, I crashed GPAL, Craig Franklin
Previous in thread:
Next in thread: 24 Oct 2004 18:08:01 +0100 Re: Yikes, I crashed GPAL, Craig Franklin

Subject: Yikes, I crashed GPAL
From: David McNab ####@####.####
Date: 24 Oct 2004 18:08:01 +0100
Message-Id: <417BE168.20803@rebirthing.co.nz>

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

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


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
>>
> 
> 
> 

[Content type application/x-gzip not shown. Download]

Previous by date: 24 Oct 2004 18:08:01 +0100 Re: Here's a simple working GPAL example, Craig Franklin
Next by date: 24 Oct 2004 18:08:01 +0100 Re: Yikes, I crashed GPAL, Craig Franklin
Previous in thread:
Next in thread: 24 Oct 2004 18:08:01 +0100 Re: Yikes, I crashed GPAL, Craig Franklin


Powered by ezmlm-browse 0.20.