Hi Chris
Thanx a lot. I totally forgot about the stack. Exactly this problem
is even documented in the sdcc docs. From now on I always will
consult the docs first. I see that now the PIC port is documented a
lot better than before. Anyway, printf works fine now..
I also tried your script, but it kinda didn't work. I get following
error:
easyb$ python sdcc-stackusage.py ../i2cIF/i2cIF.asm
Traceback (most recent call last):
File "sdcc-stackusage.py", line 300, in ?
parser.parse(f)
File "sdcc-stackusage.py", line 86, in parse
self._parse_func(f, m.group(1))
File "sdcc-stackusage.py", line 99, in _parse_func
if not line: raise EOFError("End of file in function " + name)
EOFError: End of file in function __str_0
What am I doing wrong?
Thanx again.
Cheers,
Ezra
On 29.08.2006, at 09:35, Chris Emerson wrote:
> On Mon, Aug 28, 2006 at 07:32:47PM +0200, Easy B wrote:
>>> volatile int i;
>>> i=7;
>>> stdout=STREAM_USER;
>>> printf("%s", i);
>>
>> Wont work. But "printf("%c", i); " results the character with the
>> ASCII code 7. Strings and characters aren't the problem though. As
>> soon as I use something other than "%c/s" my program hangs. It
>> doesn't make a difference if I use int, char or directly the number.
>
> My first guess is that you're overflowing the stack. Can you make it
> bigger and see if that helps?
>
> That was the problem I had with weird behaviour (but not using
> printf).
> I hacked up a script to work out the stack usage so that it
> wouldn't get
> me again. (http://www.nosreme.org/projects/sdcc-stackusage/, if you
> want to give it a go)
>
> Regards,
>
> Chris
>
> ----------------------------------------------------------------------
> ---
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user