Bug in my sdcc code :-(

Peter Onion <[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.gnupic
Message-ID <[email protected]>
I've just realised there is a bug in the code I've been using (and have
suggested a few others use) to set the stack up...

 #pragma stack 0x200,64

should read

 #pragma stack 0x200 64

NOTE: there is no comma !   I should have realised sooner that the
warning message "helloled.c:34: warning: setting stack to default size
64 (0x0040)" was going to be a problem .....

I found this out when I needed to use

#pragma stack 0x200,128

By the way, if you want to use the printf libraries with the USART for
output you NEED a stack bigger that 64 bytes !

I hope this saves someone wasting an afternoon like I have jsut done !

Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.