2014/11/15

Reprappro Huxley install Prusa i3 J-Head

Huxley install Prusa i3 j-head (2014/11/11)




一台已經完成的 Huxley ,因為沒有了Huxley的印頭材料而停工的機器,無意間找到 Thingverse 分享的 J-Head adapter for Huxley ( http://www.thingiverse.com/thing:89766 )事不宜遲,印了一個,並裝上閒置已久的 J-Head,順利完成安裝,並讓這台無頭的印表機可以開始生產。




將原來的給料器孔加大,鎖上快拆接頭一樣可使用。

2014/11/02

Reprappro Mendel 3D printer

終於完成了 RepRapPro Mendel,由開始安裝到完成整整快一年了。


有了 200mm x 200mm 的列印功能,一些原本無法列印的物件都能實現了,於是印了...


由 Thingiverse 取得的分享 3D組件組合成的機器手臂。

2014/05/29

Melzi Ardentissimo 3D 印表機 介面板 程式燒錄

購入一片 Melzi ,由https://github.com/reprappro/Marlin 下載程式,經由 Arduino IDE 進行燒錄時發生錯誤(... avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50...),經過搜尋錯誤訊息得到的答案可能是沒有 bootloader 的問題,經由 http://reprap.org/wiki/Melzi 網頁的Bootloader Upload 的說明,找出 Arduino Uno 模擬成 ISP 來完成它。
步驟:
1. 先將 Arduino Uno 載入 ArduinoISP程式,可由 IDE 的 File->Examples->ArduinoISP載入需要的程式至IDE,再上載至Uno卡上。

2. 將 Melzi 板子的 SPI 接角接線至Uno上,接法參考之前的文章。
Melzi               AVRISP
pin 1 MISO   ->  pin 12
pin 3 SCk      -> pin 13
pin 5 Reset   -> pin 10
pin 4 MOSI   -> pin 11

3.於 IDE 置入 Melzi 需要的程式包括程式與硬體支援檔案,解壓縮由 https://github.com/reprappro/Marli 下載的檔案,其中 Marlin檔案置於Sketchbook 目錄,Sanguino 檔案置於 IDE之hareware 目錄下。

4.啟動 IDE ,設定如下
Tools->Board->Melzi 1284p 16mhz
Tools->Serial Port->COMX (選擇 Arduino UNO 系統取得之 COM Port)
Tools->Programmer->Arduino As ISP

5.完成設定,由 Tools->Burn Bootloader 開始上載 bootloadert程序,需要幾分鐘的時間,完成它。


完成 Melzi 的 bootloader 上載,就可以經由 IDE 正常上載 Marlin 程式至板上了。
程式設定僅需將 configure.h  中的板子支援印表機類型設定完成,就可以正常編譯,以我要安裝的印表機為例將 #define REPRAPPRO_HUXLEY 之前的 "\\"刪除即可。
...
// Uncomment ONE of the next three lines - the one for your RepRap machine
#define REPRAPPRO_HUXLEY
//#define REPRAPPRO_MENDEL //Legacy Mendel
//#define REPRAPPRO_MENDEL2 //Tricolour and Mono
...

2014/02/15

Intel Galileo BSP 0.9.0 eth0 not found 無法使用網路問題

完成了 BSP 0.9.0.7 測試環境時並沒有使用網路,但當接上網路發現,此系統無法連線,eth0 device 無法偵測,原以為是 Linux 編譯時缺少相關軟體的設定,試了試還是無法使用 eth0。

相較原BSP 0.7.5.7 亦無差異,只好再求救 Google大神,終於找到相關的資料如下:

Accrouding to the  https://communities.intel.com/message/221316 say you need to update the flash image.
----------------------------------------------------------------------------------------------------
To get the ethernet working, I had to update flash/firmware with v0.9.0 *.cap.

I will add some more info for those who want to SD boot v0.9.0 with previous firmware.

1. Build using Yocto and copy the files to SDCARD.
1. On the SDCARD, edit boot/grub/grub.conf with the following changes.
Replaced $EARLY_CON_ADDR_REPLACE with 0x8010f000
2. Renamed image-full-galileo-clanton.ext3 with image-full-clanton.ext3 on the SDCARD
2. Boot into the new image. Ethernet will not work.
3. Generated new Flash-missingPDAT.cap using v0.9.0
4. Flashed v0.9.0 Flash-missingPDAT.cap using steps in "Programming flash using Linux* run-time system"
5. On the SDCARD, edit boot/grub/grub.conf
Replaced 0x8010f000 with $EARLY_CON_ADDR_REPLACE (not sure if this is needed)
6. Boot into the new image. Ethernet working.
-------------------------------------------------------------------------------------------------------

根據上面資料的陳述,需要依照 BSP Build Guide 進行 3. Building the EDKII Firmware 的步驟,並更新 flash,可依 9.1 Programming flash using UEFI shell 進行。

經過一番折騰,終於完成 Flash-missingPDAT.cat 檔案,並完成 flash 更新,重新啟動後,果然eth0 功能恢復。

原試作 BSP 0.9.0.7 是在 CentOS 6.4 i686環境,但是因為 spi-flash-tools 一些工具僅提供 x86_64之執行檔,需換成x86_64版本,不過事情並不是那麼順利,CentOS 中執行 spi-flash-tools//generator/generator.py  會發生問題,最後是換成 Debian 7.0 amd64 版本才順利進行所有需要的作業完成 cap 檔。

使用 Debian 7.0 時大部份需要的安裝元件都可以以 apt-get install 進行安裝,但是 iasl 需要另外下載 iasl-unix 安裝套件 :  iasl_20100528-3_amd64.deb ,以 dpkg -i iasl_20100528-3_amd64.deb安裝。 ( Intel ASL compiler/decompiler)

網路功能順利完成後,確發現 launcher.sh 功能不需要經由 inittab 另外的設定就會自動啟動,須刪除 inittab 中的重複設定。

2014/01/30

Intel Galileo BSP 0.9.0.7

經過數小時完成 0.9.0.7 版本的影像檔,檔案複製到SD 之後開機,確會停在如下畫面:


因為有之前 0.7.5 版的成功經驗,認為應該完成的image沒有問題才對,於是測試了一下終於找到問題,問題是 grub.conf 檔案的設定,比較如下:

正常可用的內容
title Clanton SVP kernel-MassStorage initrd-MassStorage big-rootfs IMR-On IO-APIC/HPET NoEMU debug
    root (hd0,0)
    kernel /bzImage root=/dev/ram0 console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x8010f000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5
    initrd /core-image-minimal-initramfs-clanton.cpio.gz

有問題的內容
title Clanton SVP kernel-MassStorage initrd-MassStorage image-full IMR-On IO-APIC/HPET NoEMU debug
    root (hd0,0)
    kernel /bzImage root=/dev/ram0 console=ttyS1,115200n8 earlycon=uart8250,mmio32,$EARLY_CON_ADDR_REPLACE,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5
    initrd /core-image-minimal-initramfs-clanton.cpio.gz

置換後終於正常開機



但是由 Adruino IDE 上傳 Sketch 時確無法使用,不是已經用 image-full-galileo 製作。



進入系統發現沒有原 /opt/cln/galileo 提供的檔案。
由 LINUX IMAGE FOR SD for Intel Galileo 提供的環境開機,將 /opt 下的檔案備出,儲存於SD卡上
#tar cvf opt.tar /opt
#cp opt.tar /media/realroot

再用0.9.0.7版的image啟動
#tar xvf /media/realroot/opt.tar

手動啟用 root@clanton:~# sh /opt/cln/galileo/launcher.sh &


發現 Arduino IDE 可以 Transfer complete 了,並正常執行程序。

將 Sketch clloader 載入與執行於每次開機即自動執行,進行修改 /etc/inittab 檔案,加上 galileo_sketch_reset 與 launcher 的設定。

複製 /opt/cln/galileo/launcher.sh 至 /etc/init.d
# cp /opt/cln/galileo/launcher.sh /etc/init.d


存檔後,執行指令,立即生效
# telinit q
或重新啟動系統。

這樣就完成一完全 Linux 功能,包括 gcc make 等開發工具,與原 Sketch 功能正常的環境。





2014/01/29

Intel Galileo BSP 0.7.5.7

Intel Galileo BSP (Board Support Package) 試作


由 Thingiverse 幫他找一個家。

因為出廠預設於SPI所含的 Linux 功能有限,於是參照 Intel Galileo BSP 的文件進行SD 載入的 Linux 系統建置,相關步驟記錄如:

操作環境 CentOS 6.4

需要的軟體安裝
$sudo yum install build-essential

$sudo yum install git (.setup.sh git)
$sudo yum install gcc   (bitbake gcc)
$sudo yum install gcc-c++               (bitbake c++, g++)
$sudo install texi2html texinfo           (bitbake makeinfo)

$sudo yum install wget
$sudo wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
$sudo rpm -i rpmforge-release-0.5.2-2.el6.rf.i686.rpm
$sudo yum install p7zip

下載 Intel 提供的BSP Source
$wget http://downloadmirror.intel.com/23171/eng/Board_Support_Package_Sources_for_Intel_Quark_v0.7.5.7z
$7za x Board_Support_Package_Sources_for_Intel_Quark_v0.7.5.7z
$tar xzvf Board_Support_Package_Sources_for_Intel_Quark_v0.7.5/meta-clanton_v0.7.5.tar.gz
cd meta-clanton_v0.7.5

$./setup.sh


環境設定
$source poky/oe-init-build-env yocto_build
### Shell environment set up for builds. ###
You can now run 'bitbake <target>'
Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-toolchain-sdk
    adt-installer
    meta-ide-support
You can also run generated qemu images with a command like 'runqemu qemux86'
[yjwang@proxycore yocto_build]$

修改需要的功能及參數
可另存設定檔後進行
$cp ../meta-clanton-distro/recipes-core/images/image-full.bb ../meta-clanton-distro/recipes-core/images/image-custom.bb


IMAGE_FEATURES += "package-management tools-sdk dev-pkgs tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks"
or
IMAGE_ROOTFS_SIZE = "921600"
IMAGE_FEATURES += "package-management dev-pkgs"
IMAGE_INSTALL += "autoconf automake binutils binutils-symlinks cpp cpp-symlinks gcc gcc-symlinks g++ g++-symlinks gettext make libstdc++ libstdc++-dev file coreutils"

等的設定

執行
$bitbake image-custom
Pseudo is not present but is required, building this first before the main build
WARNING: Host distribution "CentOS-6.5" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100% |#########################################| Time: 00:03:18
Parsing of 1250 .bb files complete (0 cached, 1250 parsed). 1613 targets, 118 skipped, 0 masked, 0 errors.
Build Configuration:
BB_VERSION        = "1.18.0"
BUILD_SYS         = "i686-linux"
NATIVELSBSTRING   = "CentOS-6.5"
TARGET_SYS        = "i586-poky-linux-uclibc"
MACHINE           = "clanton"
DISTRO            = "clanton-tiny"
DISTRO_VERSION    = "1.4.2"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta            
meta-yocto      
meta-yocto-bsp    = "clanton:d734ab491a30078d43dee5440c03acce2d251425"
meta-intel        = "clanton:048def7bae8e3e1a11c91f5071f99bdcf8e6dd16"
meta-oe           = "clanton:13ae5105ee30410136beeae66ec41ee4a8a2e2b0"
meta-clanton-distro
meta-clanton-bsp
meta-clanton-galileo = "<unknown>:<unknown>"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
$<50>Currently 1 running tasks (38 of 56):
$<50>WARNING: Failed to fetch URL ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz, attempting MIRRORS if available
$<50>WARNING: Failed to fetch URL http://cheeseshop.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz, attempting MIRRORS if available
$<50>WARNING: Failed to fetch URL http://www.apache.org/dist/apr/apr-1.4.6.tar.bz2, attempting MIRRORS if available
$<50>WARNING: Failed to fetch URL http://www.apache.org/dist/apr/apr-util-1.5.1.tar.gz, attempting MIRRORS if available
$<50>WARNING: Failed to fetch URL http://www.apache.org/dist/subversion/subversion-1.7.8.tar.bz2, attempting MIRRORS if available
$<50>WARNING: Failed to fetch URL http://downloads.sourceforge.net/libusb/libusb-compat-0.1.4.tar.bz2, attempting MIRRORS if available
$<50>WARNING: Failed to fetch URL http://downloads.sourceforge.net/libusb/libusb-1.0.9.tar.bz2, attempting MIRRORS if available
$<50>WARNING: Failed to fetch URL http://pkg-shadow.alioth.debian.org/releases/shadow-4.1.4.3.tar.bz2, attempting MIRRORS if available
$<50>WARNING: Failed to fetch URL http://downloads.sourceforge.net/project/libpng/libpng16/1.6.0/libpng-1.6.0.tar.xz, attempting MIRRORS if available
$<50>WARNING: Failed to fetch URL ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-2.11.src.tar.gz, attempting MIRRORS if available
$<50>NOTE: validating kernel config, see log.do_kernel_configcheck for details
$<50>Currently 7 running tasks (1702 of 2962):
$<50>WARNING: QA Issue: ELF binary '/home/yjwang/meta-clanton_v0.7.5/yocto_build/tmp/work/i586-poky-linux-uclibc/x264/r2230+git-r1/packages-split/x264/usr/lib/libx264.so.129' has relocations in .text
$<50>WARNING: QA Issue: ELF binary '/home/yjwang/meta-clanton_v0.7.5/yocto_build/tmp/work/i586-poky-linux-uclibc/libav/0.8.4+gitAUTOINC+2c8ce46250ff78191fe6565876ddc4bc03fdf519-r8.0/packages-split/libswscale/usr/lib/libswscale.so.2.1.0' has relocations in .text
$<50>WARNING: QA Issue: ELF binary '/home/yjwang/meta-clanton_v0.7.5/yocto_build/tmp/work/i586-poky-linux-uclibc/libav/0.8.4+gitAUTOINC+2c8ce46250ff78191fe6565876ddc4bc03fdf519-r8.0/packages-split/libpostproc/usr/lib/libpostproc.so.52.0.0' has relocations in .text
$<50>WARNING: QA Issue: ELF binary '/home/yjwang/meta-clanton_v0.7.5/yocto_build/tmp/work/i586-poky-linux-uclibc/libav/0.8.4+gitAUTOINC+2c8ce46250ff78191fe6565876ddc4bc03fdf519-r8.0/packages-split/libavutil/usr/lib/libavutil.so.51.22.1' has relocations in .text
$<50>WARNING: QA Issue: ELF binary '/home/yjwang/meta-clanton_v0.7.5/yocto_build/tmp/work/i586-poky-linux-uclibc/libav/0.8.4+gitAUTOINC+2c8ce46250ff78191fe6565876ddc4bc03fdf519-r8.0/packages-split/libavformat/usr/lib/libavformat.so.53.21.0' has relocations in .text
$<50>WARNING: QA Issue: ELF binary '/home/yjwang/meta-clanton_v0.7.5/yocto_build/tmp/work/i586-poky-linux-uclibc/libav/0.8.4+gitAUTOINC+2c8ce46250ff78191fe6565876ddc4bc03fdf519-r8.0/packages-split/libavfilter/usr/lib/libavfilter.so.2.15.0' has relocations in .text
$<50>WARNING: QA Issue: ELF binary '/home/yjwang/meta-clanton_v0.7.5/yocto_build/tmp/work/i586-poky-linux-uclibc/libav/0.8.4+gitAUTOINC+2c8ce46250ff78191fe6565876ddc4bc03fdf519-r8.0/packages-split/libavdevice/usr/lib/libavdevice.so.53.2.0' has relocations in .text
$<50>WARNING: QA Issue: ELF binary '/home/yjwang/meta-clanton_v0.7.5/yocto_build/tmp/work/i586-poky-linux-uclibc/libav/0.8.4+gitAUTOINC+2c8ce46250ff78191fe6565876ddc4bc03fdf519-r8.0/packages-split/libavcodec/usr/lib/libavcodec.so.53.35.0' has relocations in .text
$<50>NOTE: Tasks Summary: Attempted 2962 tasks of which 1771 didn't need to be rerun and all succeeded.

Summary: There were 9 WARNING messages shown.

完成

參考資料來源
http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage
http://ph0b.com/adding-dev-tools-gcc-make-to-galileo-sd-image/

於 tmp/deploy/images 目錄中將檔案更名複製到 SD卡中
------------------------------------------------------------------------------------------------------------
rename  bzImage-*.bin  as bzImage
rename  core-image-minimal-initramfs-* as core-image-minimal-initramfs-clanton.cpio.gz
rename  image-* as image-full-clanton.ext3
boot folder as boot

完成SD image 開機,但確無法執行 sketch  clloader,並出現錯誤訊息。


再找了一些網站發現 Intel 於2014/01/21 出了新版本 0.9.0.7

https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23197
Quark_BSP_BuildGuide_329687_004.pdf
------------------------------------------------------------------------------------------------------------
下載2014/01/21 Board_Support_Package_Sources_for_Intel_Quark_v0.9.0.7z 依法製作
於0.9.07版中可使用 bitbake image-full-galileo ,是否就可以支援原有的 adruino sketch 功能,待完成後分曉。

Image-full-galileo.bb 內容如下包括 image-full.bb之設定
require image-full.bb
IMAGE_INSTALL += "galileo-target"
IMAGE_INSTALL += "mtd-utils-jffs2"
ROOTFS_POSTPROCESS_COMMAND += "install_sketch ; "
install_sketch() {
        install -d ${IMAGE_ROOTFS}/sketch
}