<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Firmware on the 16f648</title>
        <description> There is some [very] preliminary code in subversion for building with 
new versions of sdcc and for the 16f648a.

It is in subversion at
/reprap/branches/autoconf-firmware

In order to build this, you need to have a very recent version of 
gputils.  To determine if you have a recent enough version, run the 
command &quot;gpasm -v&quot;.  You should see &quot;gpasm-0.13.4 beta&quot; or higher 
(actually there is currently nothing higher, but no doubt there could be 
soon).

To build an appropriate version of gputils, you need to check it out 
from CVS.

You should also build sdcc from subversion.

When you install sdcc, make sure it&#039;s pointing to your newly compiled 
gpasm and gplink, not some old copies.  You can verify which instance of 
gpasm sdcc is using by compiling something with -V.  Or, if you&#039;re 
unsure how to do that, do something like this to print the gpasm path 
that sdcc is using (all one line):

echo &quot;void main(){}&quot; &amp;gt; tmp.c &amp;amp;&amp;amp; sdcc -V -c tmp.c | grep gpasm | sed 
&#039;s/^\+ &quot;\([^&quot;]*\)&quot;.*$/\1/&#039; &amp;amp;&amp;amp; rm tmp.c

The firmware is configured with autoconf, so to build it you do the 
normal gnuey thing:
./configure
make

Here&#039;s a complete command-by-command walkthrough for building everything 
current.  This can be executed by a normal user (no root privileges 
required).

1. Build gputils
mkdir $HOME/reprap-tools
cd $HOME/reprap-tools
cvs -d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils login
  (just press enter when prompted for a password)
cvs -z3 
-d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils co -P 
gputils
cd gputils
./configure --prefix=$HOME/reprap-tools
make
make install

2. Build sdcc
cd $HOME/reprap-tools
svn co [sdcc.svn.sourceforge.net]
cd sdcc
./configure --prefix=$HOME/reprap-tools --disable-mcs51-port 
--disable-gbz80-port --disable-z80-port --disable-avr-port 
--disable-ds390-port --disable-ds400-port --disable-xa51-port 
--disable-hc08-port --disable-ucsim
make
make install

3. Build reprap firmware
mkdir $HOME/reprap
cd $HOME/reprap
svn co 
[reprap.svn.sourceforge.net]
cd autoconf-firmware
PATH=$HOME/reprap-tools/bin:$PATH
./configure
make

The output files will be located in
~/reprap/autoconf-firmware/devices/stepmotor/stepmotorx.hex
~/reprap/autoconf-firmware/devices/stepmotor/stepmotory.hex
~/reprap/autoconf-firmware/devices/stepmotor/stepmotorz.hex
~/reprap/autoconf-firmware/devices/extruder_0/extruder0.hex
~/reprap/autoconf-firmware/devices/extruder_1/extruder1.hex
etc...

_______________________________________________
Developers mailing list
&amp;#68;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#111;&amp;#112;&amp;#101;&amp;#114;&amp;#115;&amp;#64;&amp;#114;&amp;#101;&amp;#112;&amp;#114;&amp;#97;&amp;#112;&amp;#46;&amp;#111;&amp;#114;&amp;#103;
[reprap.org]</description>
        <link>https://reprap.org/forum/read.php?2,3861,3861#msg-3861</link>
        <lastBuildDate>Sun, 19 Apr 2026 17:11:08 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?2,3861,7591#msg-7591</guid>
            <title>Re: Firmware on the 16f648</title>
            <link>https://reprap.org/forum/read.php?2,3861,7591#msg-7591</link>
            <description><![CDATA[ That was a little premature.  However...<br />
<br />
I have now imported Andreas's improvements and corrections to the PIC firmware into Simon's experimental autoconf version of the code for the PIC16F648A. It all compiles, and - when put in a RepRap machine - works (at least it did for me...).<br />
<br />
If you want to download it it's at<br />
<br />
[<a href="https://reprap.svn.sourceforge.net/svnroot/reprap/branches/autoconf-firmware" target="_blank"  rel="nofollow">reprap.svn.sourceforge.net</a>]<br />
<br />
You should probably also look at Simon's instructions on the forum at:<br />
<br />
[<a href="http://forums.reprap.org/read.php?2,3861,3862" target="_blank"  rel="nofollow">forums.reprap.org</a>]<br />
<br />
We need to do a bit more testing. Then if this all pans out OK this'll become the Subversion trunk version and we'll do a release.<br />
<br />
The compiled .hex files (remember they're for a PIC16F648 or PIC16F648A, not a PIC16F628) can be downloaded from [<a href="http://people.bath.ac.uk/ensab/reprap/reprap-firmware-20071219.zip" target="_blank"  rel="nofollow">people.bath.ac.uk</a>]. Unless you have more than one extruder on your RepRap, you can ignore the file extruder_1_.hex.<br />
<br />
By putting this:<br />
<br />
#define TESTLEN 53<br />
static byte testArray[TESTLEN];<br />
<br />
void init2()<br />
{<br />
  testArray[TESTLEN-1] = 1;<br />
...<br />
<br />
in stepmotor2.c and increasing TESTLEN until the linker barfs I deduce that we have a whole 53 extra bytes to play with in the stepper code now!]]></description>
            <dc:creator>Adrian Bowyer</dc:creator>
            <category>Developers</category>
            <pubDate>Wed, 19 Dec 2007 15:16:20 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?2,3861,4494#msg-4494</guid>
            <title>Re: Firmware on the 16f648</title>
            <link>https://reprap.org/forum/read.php?2,3861,4494#msg-4494</link>
            <description><![CDATA[ Success on getting the 16f648 and the latest SDCC working!<br />
<br />
I have made a minor modification to the stepper C code (a part of the interrupt service routine was commented out; I uncommented it) and that now works.  I've checked it back in.<br />
<br />
So a summary of what I've tested:  <br />
<br />
   The extruder_0 code works in the extruder.<br />
   The stepper code works in the X axis.<br />
<br />
I'm pretty sure that it'll all work now.  The next stage is to program up a full set of 16F648As for Darwin and do an exhaustive test.<br />
<br />
Having split off extruder_0 (polymer) and extruder_1 (pressure paste extruder) I have now decided to recombine them so we just have one type of extruder firmware.  The selection between the two types will be soft, and made in the reprap.properties file.<br />
<br />
All this means the road is now open to:<br />
<br />
   1. Always use the latest SDCC, and<br />
   2. Implement the ring buffer to remove the delay between plotted lines. <br />
<br />
Item 2 is particularly important, as Ed needs that to do a definitive setup of all the reprap.properties parameters for Darwin.]]></description>
            <dc:creator>Adrian Bowyer</dc:creator>
            <category>Developers</category>
            <pubDate>Thu, 23 Aug 2007 10:35:36 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?2,3861,3863#msg-3863</guid>
            <title>Re: Firmware on the 16f648</title>
            <link>https://reprap.org/forum/read.php?2,3861,3863#msg-3863</link>
            <description><![CDATA[ Oh, also, by the way...<br />
<br />
The current (old sdcc) firmware build process and code and be convinced <br />
to compile for the 16f648 by tweaking some headers, so we can pursue <br />
that avenue if we need to as well but it seems far less preferable.<br />
<br />
_______________________________________________<br />
Developers mailing list<br />
<a href="mailto:&#68;&#101;&#118;&#101;&#108;&#111;&#112;&#101;&#114;&#115;&#64;&#114;&#101;&#112;&#114;&#97;&#112;&#46;&#111;&#114;&#103;">&#68;&#101;&#118;&#101;&#108;&#111;&#112;&#101;&#114;&#115;&#64;&#114;&#101;&#112;&#114;&#97;&#112;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://reprap.org/mailman/listinfo/developers" target="_blank"  rel="nofollow">reprap.org</a>]]]></description>
            <dc:creator>sai</dc:creator>
            <category>Developers</category>
            <pubDate>Mon, 23 Jul 2007 07:58:12 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?2,3861,3862#msg-3862</guid>
            <title>Re: Firmware on the 16f648</title>
            <link>https://reprap.org/forum/read.php?2,3861,3862#msg-3862</link>
            <description><![CDATA[ I probably should put this on something that isn't affected by word wrapping, but try this instead.  Again, just press enter when prompted for the CVS login password.<br />
<br />
1. Build gputils<br />
<pre class="bbcode">
mkdir $HOME/reprap-tools
cd $HOME/reprap-tools
cvs \
  -d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils \
  login
cvs -z3 \
  -d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils \
  co -P gputils
cd gputils
./configure --prefix=$HOME/reprap-tools
make
make install</pre>
<br />
2. Build sdcc<br />
<pre class="bbcode">
cd $HOME/reprap-tools
svn co <span style="color:black">https</span>://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc
cd sdcc
./configure --prefix=$HOME/reprap-tools --disable-mcs51-port \
  --disable-gbz80-port --disable-z80-port --disable-avr-port \
  --disable-ds390-port --disable-ds400-port --disable-xa51-port \
  --disable-hc08-port --disable-ucsim
make
make install</pre>
<br />
3. Build reprap firmware<br />
<pre class="bbcode">
mkdir $HOME/reprap
cd $HOME/reprap
svn co \
  <span style="color:black">https</span>://reprap.svn.sourceforge.net/svnroot/reprap/branches/autoconf-firmware
cd autoconf-firmware
PATH=$HOME/reprap-tools/bin:$PATH
./configure
make</pre>
<br />
_______________________________________________<br />
Developers mailing list<br />
<a href="mailto:&#68;&#101;&#118;&#101;&#108;&#111;&#112;&#101;&#114;&#115;&#64;&#114;&#101;&#112;&#114;&#97;&#112;&#46;&#111;&#114;&#103;">&#68;&#101;&#118;&#101;&#108;&#111;&#112;&#101;&#114;&#115;&#64;&#114;&#101;&#112;&#114;&#97;&#112;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://reprap.org/mailman/listinfo/developers" target="_blank"  rel="nofollow">reprap.org</a>]]]></description>
            <dc:creator>sai</dc:creator>
            <category>Developers</category>
            <pubDate>Mon, 23 Jul 2007 07:54:08 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?2,3861,3861#msg-3861</guid>
            <title>Firmware on the 16f648</title>
            <link>https://reprap.org/forum/read.php?2,3861,3861#msg-3861</link>
            <description><![CDATA[ There is some [very] preliminary code in subversion for building with <br />
new versions of sdcc and for the 16f648a.<br />
<br />
It is in subversion at<br />
/reprap/branches/autoconf-firmware<br />
<br />
In order to build this, you need to have a very recent version of <br />
gputils.  To determine if you have a recent enough version, run the <br />
command "gpasm -v".  You should see "gpasm-0.13.4 beta" or higher <br />
(actually there is currently nothing higher, but no doubt there could be <br />
soon).<br />
<br />
To build an appropriate version of gputils, you need to check it out <br />
from CVS.<br />
<br />
You should also build sdcc from subversion.<br />
<br />
When you install sdcc, make sure it's pointing to your newly compiled <br />
gpasm and gplink, not some old copies.  You can verify which instance of <br />
gpasm sdcc is using by compiling something with -V.  Or, if you're <br />
unsure how to do that, do something like this to print the gpasm path <br />
that sdcc is using (all one line):<br />
<br />
echo "void main(){}" &gt; tmp.c &amp;&amp; sdcc -V -c tmp.c | grep gpasm | sed <br />
's/^\+ "\([^"]*\)".*$/\1/' &amp;&amp; rm tmp.c<br />
<br />
The firmware is configured with autoconf, so to build it you do the <br />
normal gnuey thing:<br />
./configure<br />
make<br />
<br />
Here's a complete command-by-command walkthrough for building everything <br />
current.  This can be executed by a normal user (no root privileges <br />
required).<br />
<br />
1. Build gputils<br />
mkdir $HOME/reprap-tools<br />
cd $HOME/reprap-tools<br />
cvs -d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils login<br />
  (just press enter when prompted for a password)<br />
cvs -z3 <br />
-d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils co -P <br />
gputils<br />
cd gputils<br />
./configure --prefix=$HOME/reprap-tools<br />
make<br />
make install<br />
<br />
2. Build sdcc<br />
cd $HOME/reprap-tools<br />
svn co [<a href="https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc" target="_blank"  rel="nofollow">sdcc.svn.sourceforge.net</a>]<br />
cd sdcc<br />
./configure --prefix=$HOME/reprap-tools --disable-mcs51-port <br />
--disable-gbz80-port --disable-z80-port --disable-avr-port <br />
--disable-ds390-port --disable-ds400-port --disable-xa51-port <br />
--disable-hc08-port --disable-ucsim<br />
make<br />
make install<br />
<br />
3. Build reprap firmware<br />
mkdir $HOME/reprap<br />
cd $HOME/reprap<br />
svn co <br />
[<a href="https://reprap.svn.sourceforge.net/svnroot/reprap/branches/autoconf-firmware" target="_blank"  rel="nofollow">reprap.svn.sourceforge.net</a>]<br />
cd autoconf-firmware<br />
PATH=$HOME/reprap-tools/bin:$PATH<br />
./configure<br />
make<br />
<br />
The output files will be located in<br />
~/reprap/autoconf-firmware/devices/stepmotor/stepmotorx.hex<br />
~/reprap/autoconf-firmware/devices/stepmotor/stepmotory.hex<br />
~/reprap/autoconf-firmware/devices/stepmotor/stepmotorz.hex<br />
~/reprap/autoconf-firmware/devices/extruder_0/extruder0.hex<br />
~/reprap/autoconf-firmware/devices/extruder_1/extruder1.hex<br />
etc...<br />
<br />
_______________________________________________<br />
Developers mailing list<br />
<a href="mailto:&#68;&#101;&#118;&#101;&#108;&#111;&#112;&#101;&#114;&#115;&#64;&#114;&#101;&#112;&#114;&#97;&#112;&#46;&#111;&#114;&#103;">&#68;&#101;&#118;&#101;&#108;&#111;&#112;&#101;&#114;&#115;&#64;&#114;&#101;&#112;&#114;&#97;&#112;&#46;&#111;&#114;&#103;</a><br />
[<a href="http://reprap.org/mailman/listinfo/developers" target="_blank"  rel="nofollow">reprap.org</a>]]]></description>
            <dc:creator>sai</dc:creator>
            <category>Developers</category>
            <pubDate>Mon, 23 Jul 2007 07:45:58 -0400</pubDate>
        </item>
    </channel>
</rss>
