From 2256851be26fed2742470df5f8e89e8db85ecfe7 Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 1 Sep 2009 20:03:04 +0200 Subject: documents about the cupcake --- .../arduino-on-gentoo/document.en.rest.txt | 130 +++++++++++++++++++++ .../arduino-on-gentoo/document.it.rest.txt | 130 +++++++++++++++++++++ src/HW/makerbot/arduino-on-gentoo/du2html.xsl | 1 + src/HW/makerbot/document.en.rest.txt | 15 +++ src/HW/makerbot/document.it.rest.txt | 15 +++ src/HW/makerbot/du2html.xsl | 1 + src/tags/3dPrint/base-feed.tt | 1 + src/tags/3dPrint/document-listing.tt | 1 + src/tags/3dPrint/document.en.rest.tt | 7 ++ src/tags/3dPrint/document.it.rest.tt | 7 ++ src/tags/3dPrint/du2html.xsl | 1 + src/tags/3dPrint/feed.en.tt | 1 + src/tags/3dPrint/feed.it.tt | 1 + src/tags/3dPrint/fillFeed.xsl | 1 + 14 files changed, 312 insertions(+) create mode 100644 src/HW/makerbot/arduino-on-gentoo/document.en.rest.txt create mode 100644 src/HW/makerbot/arduino-on-gentoo/document.it.rest.txt create mode 120000 src/HW/makerbot/arduino-on-gentoo/du2html.xsl create mode 100644 src/HW/makerbot/document.en.rest.txt create mode 100644 src/HW/makerbot/document.it.rest.txt create mode 120000 src/HW/makerbot/du2html.xsl create mode 120000 src/tags/3dPrint/base-feed.tt create mode 120000 src/tags/3dPrint/document-listing.tt create mode 100644 src/tags/3dPrint/document.en.rest.tt create mode 100644 src/tags/3dPrint/document.it.rest.tt create mode 120000 src/tags/3dPrint/du2html.xsl create mode 100644 src/tags/3dPrint/feed.en.tt create mode 100644 src/tags/3dPrint/feed.it.tt create mode 120000 src/tags/3dPrint/fillFeed.xsl diff --git a/src/HW/makerbot/arduino-on-gentoo/document.en.rest.txt b/src/HW/makerbot/arduino-on-gentoo/document.en.rest.txt new file mode 100644 index 0000000..908bb10 --- /dev/null +++ b/src/HW/makerbot/arduino-on-gentoo/document.en.rest.txt @@ -0,0 +1,130 @@ +================================================= + Building the Arduino / Sanguino on Gentoo amd64 +================================================= +:CreationDate: 2009-09-01 17:27:01 +:Id: HW/makerbot/arduino-on-gentoo +:tags: - hardware + - software + - 3dPrint + +Ok, so I had this nice CupCake_ kit. It comes with pre-built +electronics, and pre-installed firmware. But I like being able to do +upgrades, especially since the whole thing is still maturing. + +So, the `MakerBot instructions`_ say "get the Arduino_ env, apply the +Sanguino_ patch, and you're done". Easy, right? + +I start by downloading the sources for the Arduino_ software. You see, +I run a 64-bit machine, and the pre-built Linux binaries are 32 +bits. Not good enough. + +Then, following the `Arduino instructions`_, I say:: + + ~/arduino-src/build/linux$ ./make.sh + +and it goes:: + + The Java bundle that is included with Processing supports only i686 by default. + To build the code, you will need to install the Java 1.5.0_15 JDK (not a JRE, + and not any other version), and create a symlink to the directory where it is + installed. Create the symlink in the "work" directory, and named it "java": + ln -s /path/to/jdk1.5.0_15 /home/dakkar/arduino-src/build/linux/work/java" + +Ok, I'll do it. By having mis-read the notice, I actually symlink the +``icedtea6`` JDK. It didn't seem to mind. + +Now it builds, but it won't run: there are 32-bit libraries! Who built +them?? + +Looking at Portage (yes, I run Gentoo) I see that there is an ebuild +for an (older) Arduino version, and it declares dependency on exactly +the library that is giving me problems. So:: + + emerge -av dev-java/rxtx uisp + +and I have the right library. Of course the Arduino program won't use +it (it's not in the default ``CLASSPATH``), so I symlink it over the +bundled version:: + + rm work/lib/RXTXcomm.jar work/lib/librxtxSerial.so + ln -s /usr/share/rxtx-2/lib/RXTXcomm.jar work/lib/ + ln -s /usr/lib/rxtx-2/librxtxSerial.so work/lib/ + +It runs! + +Of course, no Sanguino_ support, and the CupCake_ main board is a +Sanguino_. + +The `Sanguino instructions`_ say to add a couple of directories, +overwrite a few files, add some lines to a file, and it should be +enough. Well, not so fast. It didn't work for me. + +After a bit of ``find``, I see that the ``boards.txt`` file (the one +that needs to have data added to) has been copied from it "source" +location (``/home/dakkar/arduino-src/hardware/boards.txt``) to the +"work" location +(``/home/dakkar/arduino-src/build/linux/work/hardware/boards.txt``). Ok, +I should have read *all* the instructions: it said to rebuild the +Arduino environment every time a change is made. + +By this point I'm sick and tired of re-doing all the work-arounds, so +I just change the ``make.sh`` script:: + + =================================================================== + --- make.sh (revision 756) + +++ make.sh (working copy) + @@ -34,25 +34,7 @@ + + install -m 755 dist/arduino work/arduino + + - ARCH=`uname -m` + - if [ $ARCH = "i686" ] + - then + - echo Extracting JRE... + - tar --extract --file=jre.tgz --ungzip --directory=work + - else + -# echo This is not my beautiful house. + -# if [ $ARCH = "x86_64" ] + -# then + -# echo You gots the 64. + -# fi + - echo " + -The Java bundle that is included with Processing supports only i686 by default. + -To build the code, you will need to install the Java 1.5.0_15 JDK (not a JRE, + -and not any other version), and create a symlink to the directory where it is + -installed. Create the symlink in the \"work\" directory, and named it \"java\": + -ln -s /path/to/jdk1.5.0_15 `pwd`/work/java" + - exit + - fi + + ln -s "$(java-config -O)" work/java + fi + + cd ../.. + @@ -91,6 +73,11 @@ + rm -rf ../build/linux/work/classes + mkdir ../build/linux/work/classes + + +rm ../build/linux/work/lib/RXTXcomm.jar + +rm ../build/linux/work/lib/librxtxSerial.so + +ln -s /usr/share/rxtx-2/lib/RXTXcomm.jar ../build/linux/work/lib/ + +ln -s /usr/lib/rxtx-2/librxtxSerial.so ../build/linux/work/lib/ + + + ../build/linux/work/java/bin/java \ + -cp ../build/linux/work/java/lib/tools.jar \ + com.sun.tools.javac.Main \ + +Now:: + + rm -rf work/ + ./make.sh + ./run.sh + +and I have the environment working! Well, at least it starts and lists +the appropriate boards. We'll see if it actually works. + +.. _CupCake: http://wiki.makerbot.com/cupcake +.. _`MakerBot instructions`: http://wiki.makerbot.com/cupcake-motherboard-firmware-update +.. _Arduino: http://arduino.cc/ +.. _`Arduino instructions`: http://code.google.com/p/arduino/wiki/BuildingArduino +.. _Sanguino: http://sanguino.cc/ +.. _`Sanguino instructions`: http://sanguino.cc/softwareforlinux diff --git a/src/HW/makerbot/arduino-on-gentoo/document.it.rest.txt b/src/HW/makerbot/arduino-on-gentoo/document.it.rest.txt new file mode 100644 index 0000000..6b919b5 --- /dev/null +++ b/src/HW/makerbot/arduino-on-gentoo/document.it.rest.txt @@ -0,0 +1,130 @@ +============================= +HW/makerbot/arduino-on-gentoo +============================= +:CreationDate: 2009-09-01 17:27:01 +:Id: HW/makerbot/arduino-on-gentoo +:tags: - hardware + - software + - 3dPrint + +Bene, mi è arrivata la CupCake_, in scatola di montaggio. Ha +l'elettronica già montata, e i firmware pre-installati. Ma voglio +poter fare gli aggiornamenti, specialmente perché tutto il progetto è +ancora in sviluppo. + +Allora, le `istruzioni di MakerBot`_ dicono "prendi l'ambiente +Arduino_, applica la patch Sanguino_, e sei a posto". Facile, vero? + +Comincio scaricando i sorgenti per il software Arduino_. Vedete, la +mia macchina è a 64 bit, e i binari pre-compilati sono a 32. Non +buono. + +Quindi, seguendo le `istruzioni Arduino`_, faccio:: + + ~/arduino-src/build/linux$ ./make.sh + +e mi risponde:: + + The Java bundle that is included with Processing supports only i686 by default. + To build the code, you will need to install the Java 1.5.0_15 JDK (not a JRE, + and not any other version), and create a symlink to the directory where it is + installed. Create the symlink in the "work" directory, and named it "java": + ln -s /path/to/jdk1.5.0_15 /home/dakkar/arduino-src/build/linux/work/java" + +Va bene, lo faccio. Siccome non ho letto bene, faccio il symlink dal +JDK ``icedtea6``. Non sembra dare problemi. + +Ora compila, ma non esegue: ci sono delle librerie a 32 bit! Chi le ha +compilate?? + +Guardando in Portage (sì, uso Gentoo) vedo che c'è un ebuild per una +versione (più vecchia) di Arduino, e dichiara di dipendere proprio +dalla libreria che mi dà problemi. Per cui:: + + emerge -av dev-java/rxtx uisp + +e ho la libreria giusta. Ovviamente, il programma Arduino non la usa +(non sta nel ``CLASSPATH`` predefinito), per cui metto dei symlink al +posto della versione inclusa:: + + rm work/lib/RXTXcomm.jar work/lib/librxtxSerial.so + ln -s /usr/share/rxtx-2/lib/RXTXcomm.jar work/lib/ + ln -s /usr/lib/rxtx-2/librxtxSerial.so work/lib/ + +Parte! + +Certo, ancora non c'è il supporto per Sanguino_, e la piastra +principale della CupCake_ è un Sanguino_. + +Le `istruzioni Sanguino`_ dicono di copiare un paio di directory, +sovrascrivere un po' di file, aggiungere delle linee a un file, e +dovrebbe funzionare. Beh, non proprio. Non ha funzionato per me. + +Dopo un po' di ``find``, noto che il file ``boards.txt`` (quello a cui +bisogna aggiungere righe) è stato copiato dalla sua posizione "sorgente" +(``/home/dakkar/arduino-src/hardware/boards.txt``) alla posizione di "lavoro" +(``/home/dakkar/arduino-src/build/linux/work/hardware/boards.txt``). Bene, +avrei dovuto leggere *tutta* la documentazione: dice di ricompilare +l'ambiente Arduino ogni volta che si fanno delle modifiche. + +A questo punto però mi sono un po' rotto di ri-fare i trucchi di cui +sopra, quindi cambio lo script ``make.sh``:: + + =================================================================== + --- make.sh (revision 756) + +++ make.sh (working copy) + @@ -34,25 +34,7 @@ + + install -m 755 dist/arduino work/arduino + + - ARCH=`uname -m` + - if [ $ARCH = "i686" ] + - then + - echo Extracting JRE... + - tar --extract --file=jre.tgz --ungzip --directory=work + - else + -# echo This is not my beautiful house. + -# if [ $ARCH = "x86_64" ] + -# then + -# echo You gots the 64. + -# fi + - echo " + -The Java bundle that is included with Processing supports only i686 by default. + -To build the code, you will need to install the Java 1.5.0_15 JDK (not a JRE, + -and not any other version), and create a symlink to the directory where it is + -installed. Create the symlink in the \"work\" directory, and named it \"java\": + -ln -s /path/to/jdk1.5.0_15 `pwd`/work/java" + - exit + - fi + + ln -s "$(java-config -O)" work/java + fi + + cd ../.. + @@ -91,6 +73,11 @@ + rm -rf ../build/linux/work/classes + mkdir ../build/linux/work/classes + + +rm ../build/linux/work/lib/RXTXcomm.jar + +rm ../build/linux/work/lib/librxtxSerial.so + +ln -s /usr/share/rxtx-2/lib/RXTXcomm.jar ../build/linux/work/lib/ + +ln -s /usr/lib/rxtx-2/librxtxSerial.so ../build/linux/work/lib/ + + + ../build/linux/work/java/bin/java \ + -cp ../build/linux/work/java/lib/tools.jar \ + com.sun.tools.javac.Main \ + +Ora:: + + rm -rf work/ + ./make.sh + ./run.sh + +e ho l'ambiente funzionante! Insomma, quanto meno parte e elenca tutte +le "boards" che mi servono. Vedremo se funziona davvero. + +.. _CupCake: http://wiki.makerbot.com/cupcake +.. _`istruzioni di MakerBot`: http://wiki.makerbot.com/cupcake-motherboard-firmware-update +.. _Arduino: http://arduino.cc/ +.. _`istruzioni Arduino`: http://code.google.com/p/arduino/wiki/BuildingArduino +.. _Sanguino: http://sanguino.cc/ +.. _`istruzioni Sanguino`: http://sanguino.cc/softwareforlinux diff --git a/src/HW/makerbot/arduino-on-gentoo/du2html.xsl b/src/HW/makerbot/arduino-on-gentoo/du2html.xsl new file mode 120000 index 0000000..7364257 --- /dev/null +++ b/src/HW/makerbot/arduino-on-gentoo/du2html.xsl @@ -0,0 +1 @@ +../../../../templates/du2html.xsl \ No newline at end of file diff --git a/src/HW/makerbot/document.en.rest.txt b/src/HW/makerbot/document.en.rest.txt new file mode 100644 index 0000000..ccad24e --- /dev/null +++ b/src/HW/makerbot/document.en.rest.txt @@ -0,0 +1,15 @@ +====================================== + MakerBot CupCake — printer of things +====================================== +:CreationDate: 2009-09-01 17:26:42 +:Id: HW/makerbot +:tags: - hardware + - 3dPrint + + I received a `MakerBot CupCake`_ on 2009-08-20, and here I'll + document everything I do with it. + +First step: `build the Arduino development environment +`_. + +.. _`MakerBot CupCake`: http://wiki.makerbot.com/cupcake diff --git a/src/HW/makerbot/document.it.rest.txt b/src/HW/makerbot/document.it.rest.txt new file mode 100644 index 0000000..33f6057 --- /dev/null +++ b/src/HW/makerbot/document.it.rest.txt @@ -0,0 +1,15 @@ +========================================= + MakerBot CupCake — stampante di oggetti +========================================= +:CreationDate: 2009-09-01 17:26:42 +:Id: HW/makerbot +:tags: - hardware + - 3dPrint + +Ho ricevuto una `MakerBot CupCake`_ il 2009-08-20, e qui documenterò +tutto quel che ci faccio. + +Primo passo: `compilare l'ambiente di sviluppo Arduino +`_. + +.. _`MakerBot CupCake`: http://wiki.makerbot.com/cupcake diff --git a/src/HW/makerbot/du2html.xsl b/src/HW/makerbot/du2html.xsl new file mode 120000 index 0000000..e2487e0 --- /dev/null +++ b/src/HW/makerbot/du2html.xsl @@ -0,0 +1 @@ +../../../templates/du2html.xsl \ No newline at end of file diff --git a/src/tags/3dPrint/base-feed.tt b/src/tags/3dPrint/base-feed.tt new file mode 120000 index 0000000..adac363 --- /dev/null +++ b/src/tags/3dPrint/base-feed.tt @@ -0,0 +1 @@ +../../../templates/base-feed.tt \ No newline at end of file diff --git a/src/tags/3dPrint/document-listing.tt b/src/tags/3dPrint/document-listing.tt new file mode 120000 index 0000000..88c3968 --- /dev/null +++ b/src/tags/3dPrint/document-listing.tt @@ -0,0 +1 @@ +../../../templates/document-listing.tt \ No newline at end of file diff --git a/src/tags/3dPrint/document.en.rest.tt b/src/tags/3dPrint/document.en.rest.tt new file mode 100644 index 0000000..b997f0c --- /dev/null +++ b/src/tags/3dPrint/document.en.rest.tt @@ -0,0 +1,7 @@ +======= +3dPrint +======= +:CreationDate: 2009-09-01 17:26:42 +:feed: + +[% PROCESS 'document-listing.tt' %] diff --git a/src/tags/3dPrint/document.it.rest.tt b/src/tags/3dPrint/document.it.rest.tt new file mode 100644 index 0000000..b997f0c --- /dev/null +++ b/src/tags/3dPrint/document.it.rest.tt @@ -0,0 +1,7 @@ +======= +3dPrint +======= +:CreationDate: 2009-09-01 17:26:42 +:feed: + +[% PROCESS 'document-listing.tt' %] diff --git a/src/tags/3dPrint/du2html.xsl b/src/tags/3dPrint/du2html.xsl new file mode 120000 index 0000000..e2487e0 --- /dev/null +++ b/src/tags/3dPrint/du2html.xsl @@ -0,0 +1 @@ +../../../templates/du2html.xsl \ No newline at end of file diff --git a/src/tags/3dPrint/feed.en.tt b/src/tags/3dPrint/feed.en.tt new file mode 100644 index 0000000..f7b7730 --- /dev/null +++ b/src/tags/3dPrint/feed.en.tt @@ -0,0 +1 @@ +[% INCLUDE 'base-feed.tt' %] diff --git a/src/tags/3dPrint/feed.it.tt b/src/tags/3dPrint/feed.it.tt new file mode 100644 index 0000000..f7b7730 --- /dev/null +++ b/src/tags/3dPrint/feed.it.tt @@ -0,0 +1 @@ +[% INCLUDE 'base-feed.tt' %] diff --git a/src/tags/3dPrint/fillFeed.xsl b/src/tags/3dPrint/fillFeed.xsl new file mode 120000 index 0000000..ad8d15a --- /dev/null +++ b/src/tags/3dPrint/fillFeed.xsl @@ -0,0 +1 @@ +../../../templates/fillFeed.xsl \ No newline at end of file -- cgit v1.2.3