[PIC] SDCC Example Projects

263 views
Skip to first unread message

Peter Todd

unread,
Apr 10, 2007, 2:24:52 PM4/10/07
to pic...@mit.edu
a new project I copy over an existing one, delete mostly everything, and
use the framework again. I figured it would be better to make up a set
of standardized frameworks for specific technlogies using best practices
and keep them on hand in my revision control system.

For the benifit of others, here is my first one, an example framework
for Linux besed SDCC development for the 18f242. Includes a nice
Makefile setup for multiple source code files. Figuring out how to do
this is surprisingly hard, even for someone with a lot of UNIX C PC
programming experience like me.


http://petertodd.ca/tech/examples/

Any feedback, especially betters ways to setup these frameworks, is much
appreciated.

http://www.petertodd.ca
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Matt Bauman

unread,
Apr 18, 2007, 7:27:39 PM4/18/07
to Microcontroller discussion list - Public.
On Apr 10, 2007, at 1:24 PM, Peter Todd wrote:
>
> Any feedback, especially betters ways to setup these frameworks, is
> much
> appreciated.


That's absolutely marvelous. I love it. I just jumped to SDCC from
PICBASIC Pro, and I can't believe I waited so long. But I had still
been working with monolithic programs simply because I'm not very
proficient with Makefiles and I really didn't want to spend the time
to put it all together. This gave me the chance to hack away and
split up my program. Thank you!

I also made a few changes to your Makefile. I was going to bring up
your version for a complete diff, but your domain seems to be down.
Basically, I added a $PIC_CHIP variable, and then used that in the
names of the libraries and such. And I used a $PROG_NAME variable so
you don't need to find and replace "example.hex". My version is
attached. Even though it's a very small file, it may behoove you to
be explicit about the license -- my modifications can go public
domain if that's okay with you.

You may get more response over at the sdcc-user mailing list (sdcc-
us...@lists.sourceforge.net).

Matt

–––––––––––––––––––––––––

Matt Bauman
Physiology, Ward 5-150
Northwestern University
Ph: 312-503-7353

Makefile.tgz

pe...@petertodd.ca

unread,
Apr 20, 2007, 7:20:14 PM4/20/07
to Microcontroller discussion list - Public.

Thanks for the input.

I will be more explicit about the license, a simple public domain
declaration most likely to let people do as they please.

Thanks for the patch, I'll likely apply it as I was planning to make
those sorts of changes anyway myself. Time is just a big factor right
now... It's the almost the end of my semester and I've got a clock to
finish... But I'll be doing up some more examples in the next two or
three weeks, for instance for assembler-based projects with gpasm and
eventually even some examples of gEDA useage. In the long-run I don't
want to focus so much on SDCC or other specific technologies as provide
a whole pile of examples, based of my and other peoples work, of how to
do things with low-cost open-source tools.

Besides, I pity the poor fool trying to make his first complex
electronics diagram with gschem and PCB... yuck! Sure took me awhile to
figure it all out!

--
http://petertodd.ca

pe...@petertodd.ca

unread,
May 4, 2007, 8:37:00 AM5/4/07
to Microcontroller discussion list - Public.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Apr 18, 2007 at 06:27:39PM -0500, Matt Bauman wrote:

Well I got a change to take another look at those example project
templates, they're properly licensed as public domain now and I've got a
more comprehensive system for managing them, as well as a utterly
rediculous system for using them with monotone for the revision control
geek in all of us. I also added an example for setting up gEDA projects,
and will get around to one with gpasm soonish. I'm going to think a
bit more about your ideas with the PROG_NAME stuff, I'll probably
do it as a pic.sdcc.generic module.

http://petertodd.ca/tech/example-projects

I've also decided to release the source code to my artwork under a mix
of creative commons licensing and the LGPL. The hardware is licensed
under cc, the firmware LGPL. I'd have released both under the LGPL, but
I wanted to make my hardware designs under a relatively restrictive no
commercial use, share alike license to prevent people simply selling
straight up copies of my art. I couldn't find a commonly known
sampling-only license that I thought would work for hardware designs.
One thing I'm planning to change is to put the PCB footprints I've
created under a less restrictive license, that's a TODO at this point.

http://petertodd.ca/art/source-code


>

> --

> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist


- --
http://petertodd.ca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGOyjs3bMhDbI9xWQRAvZlAJ9JnsF7Mgj0NWUcEonUk8b4UsTIbgCgjKui
SBDESbxJ0bdVIy/X8K1yrzk=
=ES6t
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages