Re: sdcc/PIC howto, first draft is up

Peter Onion <[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.gnupic
Message-ID <[email protected]>
On Mon, 2005-07-18 at 16:48 +0100, Peter Onion wrote:

> I think that having section 4.3 "I had to do it my way" section is not a
> good idea.  The instructions should be generic with any variations given
> later.    I don't need the modified crt0 and as a consequence your
> istructions have left me high-and-dry.

Right I've been working on this and here's what I've found....

With one simple modification your "helloled.c" code can be compiled and
linked without the need for a custom makefile or modified crt0 or linker
script.

The addition is "#pragma stack 0x200,64"

With that added "sdcc -V -mpic16 -p18f452 helloled.c" is all that is
needed to produce a helloled.hex.  I havn't got my programmer working
with 18F devices yet, but the compiled code "does the right thing" when
run with gpsim.

I think it is better to document the simplest case first and include any
variations in the following sections of the document. 

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.