[Sdcc-user] Strange error (?) message compiling for PIC18F4550 / memory allocation issues

2009-01-19 Thread Kustaa Nyholm
While trying to sort out my code that seems to have some sort of memory allocation issue, I noticed the following following error (?) message on the console. (I usually compile from within Eclipse, so I've not noticed this before): Compiling with: /usr/local/bin/sdcc -c "-Wl,-m,-s 18f4550.lkr" -

Re: [Sdcc-user] New TinyOS 8051 platform results in non zero exit code

2009-01-19 Thread Martin Leopold
Hi All. On Sun, 2009-01-18 at 13:23 +0100, Martin Leopold wrote: > Regarding the non-zero exit code, is that a result of the warnings? Disregarding the ~ warnings, it turns out that the non-zero exit code was a result of the use of non-initialised variable that produced an assembler warning (that

[Sdcc-user] CIL + TinyOS

2009-01-19 Thread Martin Leopold
Hi All. As an intermediate step to check errors and perform cleanup and optimisation I'm using a CIL derivative[1]. This produces a considerably more readable and smaller program than the generated original. The attached program is a simple serial port echo program produced first by TinyOS+nesc and

Re: [Sdcc-user] CIL + TinyOS

2009-01-19 Thread Raphael Neider
Hi, I cannot help you with the wrong behaviour, but the warnings are all correct but can probably safely be ignored. > The output from SDCC is: > app.c:45: warning 166: useless declaration (possible use of keyword as > variable name) > app.c:46: warning 166: useless declaration (possible use of k

[Sdcc-user] inline and TinyOS generated code

2009-01-19 Thread Martin Leopold
Hi All. Continuing with the example I sent a few days ago I thought I might try out the new (sort of at least) inline functionality. Unfortunately I'm having some problems. TinyOS and code generator nescc produces code that use inline extensively, but as far as i can tell it throws SDCC way off. T

Re: [Sdcc-user] inline and TinyOS generated code

2009-01-19 Thread Martin Leopold
Error report On Mon, 2009-01-19 at 14:28 +0100, Martin Leopold wrote: > Hi All. > Continuing with the example I sent a few days ago I thought I might try > out the new (sort of at least) inline functionality. Unfortunately I'm > having some problems. TinyOS and code generator nescc produces code t

Re: [Sdcc-user] Function addressing

2009-01-19 Thread Maarten Brock
Ok, make it a const function pointer then. And to get rid of the warning add a cast too: void (* const fp)(void) = (void (*)(void))0xFFF0; fp(); Now it's as small as the inline asm. Maarten > The resulting code using the C version generates this assembly instructions: > > mov _fp,#0xF0 >

Re: [Sdcc-user] inline and TinyOS generated code

2009-01-19 Thread Frieder Ferlemann
I do not see these errors here, your report is probably fixed with SDCC 2.8.1 #5155 http://sourceforge.net/tracker/index.php?func=detail&aid=1864577&group_id=599&atid=100599 Greetings, Frieder -- This SF.net email is sp

Re: [Sdcc-user] Function addressing

2009-01-19 Thread Frieder Ferlemann
Maarten Brock schrieb: > Ok, make it a const function pointer then. And to get > rid of the warning add a cast too: > > void (* const fp)(void) = (void (*)(void))0xFFF0; > fp(); Or directly: ((void (*)(void))0xFFF0)(); Greetings, Frieder --

Re: [Sdcc-user] inline and TinyOS generated code

2009-01-19 Thread Martin Leopold
On Mon, 2009-01-19 at 19:29 +0100, Frieder Ferlemann wrote: > I do not see these errors here, your report is probably fixed with SDCC 2.8.1 > #5155 > > http://sourceforge.net/tracker/index.php?func=detail&aid=1864577&group_id=599&atid=100599 Darn, I forgot all about filing that bug report. I co