https://wiki.flashrom.org/api.php?action=feedcontributions&user=Urjaman&feedformat=atomflashrom - User contributions [en]2024-03-29T14:20:41ZUser contributionsMediaWiki 1.40.0https://wiki.flashrom.org/index.php?title=Teensy_3.1_SPI_%2B_LPC/FWH_Flasher&diff=2492Teensy 3.1 SPI + LPC/FWH Flasher2021-11-22T21:53:06Z<p>Urjaman: Note that Teensy 3.2 works too; remove saying that oshpark sells 3.1... i guess they dont anymore.</p>
<hr />
<div>Note: this was made for the Teensy 3.1, but 3.2 should be compatible too.<br />
<br />
= Hardware =<br />
[[File:Teensy31_lpcspi_flasher.jpg|thumb|right|Teensy 3.1 SPI + LPC/FWH Flasher as built]]<br />
The hardware is made of a [https://www.pjrc.com/teensy/teensy31.html Teensy 3.1] and a shield-like PCB over it. Schematic and board files for the PCB<br />
can be found in the [https://github.com/urjaman/frser-teensyflash/tree/master/hardware github].<br />
The PCB is also [https://oshpark.com/shared_projects/izukIxq8 shared at OshPark].<br />
<br />
Other components required:<br />
* pin headers (total 28, but get more)<br />
* a DIL8 socket (if you want to use SPI DIL8)<br />
* a PLCC32 SMD socket (if you want to use LPC/FWH)<br />
* optional: small SMD capacitor - pad exists under the shield PCB<br />
<br />
=== Assembly ===<br />
* start by installing the SMD cap (if available) and the DIL8 socket on the shield PCB<br />
* split appropriate strips of pin headers for the teensy and solder them on the teensy, you can use the shield pcb to align them<br />
** my arrangement was as pictured in order to have more ground clearance under the teensy for the prog button<br />
* push the shield pcb only a little bit on the pin headers, just so the headers dont come over the top of the PCB<br />
* solder two corner pins to keep the shield PCB in place, these can be done from above<br />
* solder the rest of headers from the underside while watching that you dont flood the topside with too much solder, especially for the ones close to the PLCC socket<br />
* in order to solder the SMD PLCC32 socket, you'll need to break out the middle plastic bit, but keep it safe<br />
** to protect from solder bridges forming between the pin headers and PLCC socket, i placed a very thin tape over the pin header holes on the pcb during the soldering<br />
** notice that the PLCC footprint isnt centered on the PCB, meaning dont try to align the PLCC socket exactly on the PCB<br />
* after soldering the PLCC socket, i installed the plastic bit back with a little bit of glue<br />
<br />
<br />
= Software =<br />
Firmware for the Teensy is available at https://github.com/urjaman/frser-teensyflash<br />
<br />
Also see the README in that directory, both it or this document might be outdated ;)<br />
<br />
As of writing the setup would be:<br />
* download arduino, extract it somewhere where you have write access<br />
* download [https://www.pjrc.com/teensy/td_download.html the Teensyduino thingy]<br />
* run it on that arduino tree<br />
* install the udev rules provided in the above url<br />
* compile and install the [https://www.pjrc.com/teensy/loader_cli.html teensy_loader_cli] in your path<br />
git clone --recursive https://github.com/urjaman/frser-teensyflash.git<br />
cd frser-teensyflash<br />
nano Makefile # Edit the TEENSYDIR path to include your arduino directory<br />
make<br />
make program-cli # If this waits you need to press the PROG button on the teensy<br />
<br />
After this you should be able to use it with flashrom serprog, for speedups and enhancements to serprog before they're upstreamed I'd suggest to use this flashrom tree: <br />
https://github.com/urjaman/flashrom/tree/sp-upstream3<br />
<br />
Device should be something like /dev/ttyACM0 and the baudrate doesnt matter:<br />
flashrom -p serprog:dev=/dev/ttyACM0:2000000<br />
<br />
=== ISP Usage ===<br />
The same software could be used on a bare teensy 3.1 for ISP SPI programming - this is untested and also the 3.3V supply in the teensy is not strong, so beware, but the SPI pins used would be:<br />
* CS: "Pin 2", PD0<br />
* SCK: "Pin 14", PD1<br />
* MOSI: "Pin 7", PD2<br />
* MISO: "Pin 8", PD3<br />
<br />
See https://forum.pjrc.com/threads/25643-Combined-Pin-Assignments-card for a good Teensy pinmap picture.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=GSoC&diff=2491GSoC2021-11-22T21:45:58Z<p>Urjaman: New contents for 2022; aklm on IRC requested this. we should get them a wiki account...</p>
<hr />
<div>Flashrom plans to apply for participation in GSOC 2022. We will update this page with more details in February 2022 once the registration is confirmed.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Downloads&diff=2372Downloads2019-03-26T15:04:35Z<p>Urjaman: update the browse online link (was 404)</p>
<hr />
<div>__TOC__<br />
You can [https://review.coreboot.org/cgit/flashrom.git/tree/ browse the flashrom source code] online, or download and install flashrom and/or its source code as explained below.<br />
<br />
= Installation from source =<br />
'''Requirements:'''<br />
<br />
* '''pciutils''' development package ('''pciutils-dev'''/'''libpci-dev'''/'''pciutils-devel''', depending on OS/distribution)<br />
* '''zlib''' development package ('''zlib1g-dev'''/'''zlib-devel''', depending on OS/distribution)<br />
* '''libftdi''' development package ('''libftdi-dev'''), optional support for various [[FT2232SPI Programmer|external FT2232SPI flashers]]<br />
* '''libusb''' development package ('''libusb-dev'''), optional support for various USB-based programmers<br />
* various build utilities like make, gcc etc. ('''build-essential''' or similar depending on OS/distribution)<br />
* '''git''' (if you checkout the source and build manually)<br />
<br />
== Snapshots ==<br />
<br />
If you just want to use the latest stable release, [https://download.flashrom.org/releases/flashrom-1.0.tar.bz2 download flashrom 1.0 (source) here] [https://download.flashrom.org/releases/flashrom-1.0.tar.bz2.asc (GPG signature)]. Older releases can be found [https://download.flashrom.org/releases/?C=M;O=D here].<br />
<br />
== Git ==<br />
The Flashrom repository is hosted on coreboot.org and mirrored on Github. All current development happens on the ''master'' branch.<br />
<br />
=== coreboot.org ===<br />
* Browse: https://review.coreboot.org/cgit/flashrom.git<br />
* Clone: <nowiki>https://review.coreboot.org/flashrom.git</nowiki><br />
* Review: https://review.coreboot.org/#/q/project:flashrom+status:open<br />
* Workflow: https://www.coreboot.org/Git<br />
<br />
=== Github ===<br />
* Browse: https://github.com/flashrom/flashrom<br />
* Clone: <nowiki>https://github.com/flashrom/flashrom.git</nowiki><br />
* Review: https://github.com/flashrom/flashrom/pulls<br />
* Workflow: https://help.github.com/articles/creating-a-pull-request/<br />
<br />
= Binary Packages =<br />
[http://flashrom.org/IRC IRC] nicknames are mentioned in parentheses.<br />
<br />
* '''ALT Linux''':<br />
** Installation: ?<br />
** Maintainer: ?<br />
** [http://packages.altlinux.org/en/Platform5/srpms/flashrom package overview], [http://packages.altlinux.org/en/Sisyphus/srpms/flashrom/bugs bugreports]<br />
<br />
* '''Arch Linux''':<br />
** Installation: pacman -S flashrom<br />
** Maintainer: [https://www.archlinux.org/people/trusted-users/#Archange Bruno Pagani (Archange)]<br />
** [http://www.archlinux.org/packages/community/x86_64/flashrom/ package overview], [https://bugs.archlinux.org/?project=5&string=flashrom bugreports], [http://projects.archlinux.org/svntogit/community.git/log/flashrom/trunk git repo]<br />
<br />
* '''Debian''':<br />
** Installation: sudo apt-get install flashrom<br />
** Maintainer: [[User:Uwe|Uwe Hermann]] (uwe_ / uw3)<br />
** [http://packages.qa.debian.org/f/flashrom.html package overview], [https://buildd.debian.org/status/package.php?p=flashrom build logs], [http://buildd.debian-ports.org/status/package.php?p=flashrom more build logs], [http://qa.debian.org/popcon.php?package=flashrom package popularity], [http://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=flashrom bugreports]<br />
<br />
* '''DOS''':<br />
** Installation: For instructions on how to cross-compile using Linux see [[DOS]].<br />
** Alternatively, you may find usable DOS binaries in our [http://buildbot.flashrom.org/buildresults/?M=D buildbot archive]. However, they are usually untested and not recommended to be trusted blindly.<br />
<br />
* '''DragonFly BSD''':<br />
** Installation: pkg_add flashrom<br />
** Maintainer: Jonathan Kollasch (jakllsch)<br />
** ?<br />
<br />
* '''Fedora''':<br />
** Installation: sudo yum install flashrom<br />
** Maintainer: Peter Lemenkov<br />
** [https://admin.fedoraproject.org/pkgdb/package/flashrom/ package overview], [https://apps.fedoraproject.org/packages/flashrom/bugs bugreports], [http://pkgs.fedoraproject.org/cgit/flashrom.git/ git repo], [http://koji.fedoraproject.org/koji/packageinfo?packageID=4983 build logs], [https://admin.fedoraproject.org/updates/flashrom package updates]<br />
<br />
* '''FreeBSD''':<br />
** Installation from ports: cd /usr/ports/sysutils/flashrom && make install clean<br />
** Installation using a package: pkg_add -r flashrom<br />
** Maintainer: Alexander Logvinov<br />
** The version from subversion's trunk (latest revision while editing is r1416) is usable as well. To checkout and compile the source code you need to install devel/gmake, devel/libpci, devel/subversion and sysutils/dmidecode, either from ports or using "pkg_add -r". The subversion URI is at the top of this page. Compile with "gmake".<br />
<br />
* '''Gentoo''':<br />
** Install: emerge flashrom<br />
** Maintainer: Mart Raudsepp (leio), Christian Ruppert (idl0r), Peter Stuge (CareBear\)<br />
** [http://packages.gentoo.org/package/sys-apps/flashrom package overview], [https://bugs.gentoo.org/buglist.cgi?quicksearch=flashrom bugreports], [https://forums.gentoo.org/search.php?search_terms=all&show_results=topics&mode=results&search_keywords=flashrom forums], [http://euscan.iksaif.net/package/sys-apps/flashrom/ upstream scanner]<br />
<br />
* '''Mandriva''':<br />
** Installation: urpmi flashrom<br />
** Maintainer: Alexander Khryukin<br />
** [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/flashrom/ svn repo], [https://qa.mandriva.com/buglist.cgi?quicksearch=flashrom bugreports]<br />
<br />
* '''NetBSD''':<br />
** Installation: pkg_add flashrom<br />
** Maintainer: Jonathan Kollasch (jakllsch)<br />
** [ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/sysutils/flashrom/README.html package overview], [http://www.netbsdpkgsrc.info/packages/sysutils/flashrom.html netbsdpkgsrc info], [http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/flashrom/ CVS repo]<br />
<br />
* '''OpenBSD''':<br />
** Installation: ?<br />
** Maintainer: ?<br />
** TODO: Are there any ports or binary packages for OpenBSD? Building from source is supported as per README.<br />
<br />
* '''OpenELEC''':<br />
** Installation: ?<br />
** Maintainer: [mailto:stephan@openelec.tv Stephan Raue]<br />
** [http://git.nethq.org/cgi-bin/cgit.cgi/openelec/tree/packages/tools/flashrom git repo]<br />
<br />
* '''openSUSE''':<br />
** Installation: yast -i coreboot-utils<br />
** Maintainer: [[User:Stepan|Stefan Reinauer]] (Stepan)<br />
** [https://build.opensuse.org/package/show?package=flashrom&project=home%3Areinauer package overview], [http://software.opensuse.org/search?q=flashrom&baseproject=ALL&lang=en&exclude_debug=true flashrom packages], [http://software.opensuse.org/search?q=coreboot-utils&baseproject=ALL&lang=en&exclude_debug=true coreboot-utils packages], [https://build.opensuse.org/package/requests?package=flashrom&project=home%3Areinauer requests], [https://bugzilla.novell.com/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__all__&product=&content=flashrom bugreports]<br />
<br />
* '''OpenWRT'''<br />
** Installation: ?<br />
** Maintainer: ?<br />
** [https://dev.openwrt.org/browser/packages/utils/flashrom/Makefile package overview], [https://dev.openwrt.org/log/packages/utils/flashrom svn repo]<br />
<br />
* '''PC-BSD'''<br />
** Installation: currently there is no PBI (http://www.pbidir.com/bt/category/sysutils) but the installation instructions to install on FreeBSD can be used. See ftp://ftp.pcbsd.org/pub/handbook/handbook_en_ver8.2.html#__RefHeading__223_1034146141<br />
** Maintainer: ?<br />
** ?<br />
<br />
* '''Source Mage GNU/Linux:'''<br />
** Installation: cast flashrom<br />
** Maintainer: [mailto:quinq@sourcemage.org Quentin Rameau] (quinq)<br />
** [http://dbg.download.sourcemage.org/codex/stable/utils/flashrom/ package files]<br />
<br />
* '''T2 SDE'''<br />
** Installation from source: Emerge-Pkg flashrom<br />
** Installation of binaries: mine -i flashrom-0.9.1.tar.bz2<br />
** Maintainer: ?<br />
** ?<br />
<br />
* '''Ubuntu''':<br />
** Installation: sudo aptitude install flashrom<br />
** Maintainer: ?, migration happens automatically or semi-automatically from the Debian package<br />
** [http://launchpad.net/ubuntu/+source/flashrom package overview]<br />
** You can also install daily builds of flashrom's development source from a special [http://code.launchpad.net/~flashrom-developers/+archive/flashrom-daily PPA]. Please note that these are '''experimental''' binaries that may or may not be safe to use. We try to do our best to let dangerous bugs not slip into this, but it may sometimes happen. Usually it is safer to use those than very old (<=0.9.2) stable releases.<br />
<br />
* '''Windows''':<br />
** Installation: See [[Windows]]. Only a limited number of programmers are supported so far.<br />
** There were some attempts to create a full Windows port of the flashrom utility but none really succeeded and made it into the source code.<br />
<br />
= Releases =<br />
<br />
* [[Flashrom/0.9.9|flashrom 0.9.9 release notes]]<br />
* [[Flashrom/0.9.8|flashrom 0.9.8 release notes]]<br />
* [[Flashrom/0.9.7|flashrom 0.9.7 release notes]]<br />
* [[Flashrom/0.9.6|flashrom 0.9.6 release notes]]<br />
* [[Flashrom/0.9.5|flashrom 0.9.5 release notes]]<br />
* [[Flashrom/0.9.4|flashrom 0.9.4 release notes]]<br />
* [[Flashrom/0.9.3|flashrom 0.9.3 release notes]]<br />
* [[Flashrom/0.9.2|flashrom 0.9.2 release notes]]<br />
* [[Flashrom/0.9.1|flashrom 0.9.1 release notes]]<br />
* [[Flashrom/0.9.0|flashrom 0.9.0 release notes]]</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Teensy_3.1_SPI_%2B_LPC/FWH_Flasher&diff=2220Teensy 3.1 SPI + LPC/FWH Flasher2016-08-12T13:05:50Z<p>Urjaman: point to the current serprog improved tree :)</p>
<hr />
<div><br />
= Hardware =<br />
[[File:Teensy31_lpcspi_flasher.jpg|thumb|right|Teensy 3.1 SPI + LPC/FWH Flasher as built]]<br />
The hardware is made of a [https://www.pjrc.com/teensy/teensy31.html Teensy 3.1] and a shield-like PCB over it. Schematic and board files for the PCB<br />
can be found in the [https://github.com/urjaman/frser-teensyflash/tree/master/hardware github].<br />
The PCB is also [https://oshpark.com/shared_projects/izukIxq8 shared at OshPark] - and as of writing OshPark also sells the Teensy 3.1.<br />
<br />
Other components required:<br />
* pin headers (total 28, but get more)<br />
* a DIL8 socket (if you want to use SPI DIL8)<br />
* a PLCC32 SMD socket (if you want to use LPC/FWH)<br />
* optional: small SMD capacitor - pad exists under the shield PCB<br />
<br />
=== Assembly ===<br />
* start by installing the SMD cap (if available) and the DIL8 socket on the shield PCB<br />
* split appropriate strips of pin headers for the teensy and solder them on the teensy, you can use the shield pcb to align them<br />
** my arrangement was as pictured in order to have more ground clearance under the teensy for the prog button<br />
* push the shield pcb only a little bit on the pin headers, just so the headers dont come over the top of the PCB<br />
* solder two corner pins to keep the shield PCB in place, these can be done from above<br />
* solder the rest of headers from the underside while watching that you dont flood the topside with too much solder, especially for the ones close to the PLCC socket<br />
* in order to solder the SMD PLCC32 socket, you'll need to break out the middle plastic bit, but keep it safe<br />
** to protect from solder bridges forming between the pin headers and PLCC socket, i placed a very thin tape over the pin header holes on the pcb during the soldering<br />
** notice that the PLCC footprint isnt centered on the PCB, meaning dont try to align the PLCC socket exactly on the PCB<br />
* after soldering the PLCC socket, i installed the plastic bit back with a little bit of glue<br />
<br />
<br />
= Software =<br />
Firmware for the Teensy is available at https://github.com/urjaman/frser-teensyflash<br />
<br />
Also see the README in that directory, both it or this document might be outdated ;)<br />
<br />
As of writing the setup would be:<br />
* download arduino, extract it somewhere where you have write access<br />
* download [https://www.pjrc.com/teensy/td_download.html the Teensyduino thingy]<br />
* run it on that arduino tree<br />
* install the udev rules provided in the above url<br />
* compile and install the [https://www.pjrc.com/teensy/loader_cli.html teensy_loader_cli] in your path<br />
git clone --recursive https://github.com/urjaman/frser-teensyflash.git<br />
cd frser-teensyflash<br />
nano Makefile # Edit the TEENSYDIR path to include your arduino directory<br />
make<br />
make program-cli # If this waits you need to press the PROG button on the teensy<br />
<br />
After this you should be able to use it with flashrom serprog, for speedups and enhancements to serprog before they're upstreamed I'd suggest to use this flashrom tree: <br />
https://github.com/urjaman/flashrom/tree/sp-upstream3<br />
<br />
Device should be something like /dev/ttyACM0 and the baudrate doesnt matter:<br />
flashrom -p serprog:dev=/dev/ttyACM0:2000000<br />
<br />
=== ISP Usage ===<br />
The same software could be used on a bare teensy 3.1 for ISP SPI programming - this is untested and also the 3.3V supply in the teensy is not strong, so beware, but the SPI pins used would be:<br />
* CS: "Pin 2", PD0<br />
* SCK: "Pin 14", PD1<br />
* MOSI: "Pin 7", PD2<br />
* MISO: "Pin 8", PD3<br />
<br />
See https://forum.pjrc.com/threads/25643-Combined-Pin-Assignments-card for a good Teensy pinmap picture.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2217Serprog/Arduino flasher2016-07-27T16:15:16Z<p>Urjaman: /* Alternative: Shield with SPI and LPC/FWH for 5V Arduinos */ fix branch url</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have:<br />
* a supported Arduino, these are<br />
** any based on the ATmega328 (/168/88 will work with small changes too), like the Arduino Uno R3. <br />
** Arduino Mega or Mega2560, but notice that the software has a different branch for them.<br />
* a way to convert the 5V logic levels to 3.3V (except if 3.3V arduino, these are rarer)<br />
* a 3.3V SPI flash chip that is supported by flashrom<br />
<br />
Notes:<br />
* The FTDI based usb-serial converters are the fastest.<br />
* 1.8V conversion isnt covered here, yet.<br />
<br />
There are some simple schematics included here ([https://github.com/flashrom/wiki-arduino-spi-example-schematics source]).<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
For the Arduino Megas:<br />
<br />
[[File:P1v2_arduino1280.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
For the SMD SOIC-16 chips the pinout is:<br />
<br />
[[File:P3v2_so16_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V ATMega328s with FTDI, variations to that will need adaptations in building the shield and/or in the firmware. The Uno R3 will work with the fast-usbserial U2 firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware. Frser-duino does have the code for using the CS like in this shield, but you need to modify spihw.h.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (16/02/01) flashrom trunk will be really slow, please use [https://github.com/urjaman/flashrom/tree/sp-upstream3 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Building for the Mega1280 or 2560 ====<br />
As above, except use the branch for the 1280:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino -b arduino-mega-1280<br />
<br />
For the Mega2560, change the Makefile to target the correct MCU (replace 1280 with 2560).<br />
Please also verify that the avrdude command is as expected for your device.<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Easy_projects&diff=2184Easy projects2016-02-29T17:13:50Z<p>Urjaman: F-RAM update</p>
<hr />
<div>You probably came here trying to find a small (minutes to hours) and easy task where you can get your hands dirty and get results immediately.<br />
<br />
If you're a flashrom newbie, this page is for you.<br />
<br />
= Open tasks =<br />
<br />
== Find chips without voltage data ==<br />
We have added allowed supply voltage ranges (usually denoted VCC in datasheets) to the chip definitions in flashchips.c, but not all of them.<br />
Complete the list by looking for the right datasheet and editing flashchips.c accordingly.<br />
<br />
== Find boards that have a board enable but are not mentioned in print.c ==<br />
There may be a few boards that had a [[Board Enable]] added (in board_enable.c) but which were not added to the array named boards_known in print.c (usually by mistake).<br />
<br />
Find those and send a list or even a patch for print.c to the mailing list.<br />
<br />
Even better would be an automatic detection of such mistakes.<br />
We already do some sanity checks on startup (cf. <tt>selfcheck()</tt> in <tt>flashrom.c</tt>).<br />
<br />
== Add timing info to flash chip definitions (mostly done) ==<br />
<br />
Go through the list of flash chips in flashchips.c inside the flashrom source. For each chip (except SPI chips), read through the data sheets and add a comment to the flash chip definition which contains the timing information in microseconds(!) for the probe sequence.<br />
<br />
This will make probing a lot more reliable.<br />
<br />
Every annotated chip helps.<br />
<br />
== Add new flash chip definitions ==<br />
<br />
We have a few dozen chip IDs listed in flash.h, but not in flashchips.c. You can find them by running '''util/list_yet_unsupported_chips.sh'''. Then dig up the data sheets and add chip definitions for them to flashchips.c. You can use similar flash chips as a guideline. Check our list of pending patches (http://patchwork.coreboot.org/project/flashrom/list/) to not duplicate someone's work. Reviewing any pending patches by verifying the values in the patches is of course also very welcomed too! The process of adding a chip and the needed data structures are explained [[Development_Guidelines#Adding.2Freviewing_a_new_flash_chip|here]].<br />
<br />
This will reduce the number of undetected chips and every added chip broadens flashrom support.<br />
<br />
== Add (ferroelectric, F-RAM) SPI chips made by Cypress / Ramtron ==<br />
<br />
http://www.cypress.com/products/f-ram-serial<br />
<br />
Example datasheet: http://www.cypress.com/file/41676/download<br />
<br />
These work mostly like SPI flashes, except for (these are just the biggest points):<br />
* No erase command (or erasing necessary)<br />
* 2-byte addresses (atleast for smaller/older devices)<br />
<br />
== Test flashrom ==<br />
<br />
Please see the [[Board Testing HOWTO]].<br />
<br />
== Add support for multiple slaves to the ft2232_spi programmer ==<br />
<br />
The FT232H for example has 4 generic GPIO pins that could be used as additional CS pins. Think about useful command line arguments (what about other programmers that support similar functionality, e.g. by supporting multiple CS pins natively?) before you start.<br />
An example how this could look like [http://patchwork.coreboot.org/patch/3660/ exists] already.<br />
<br />
== Replace programmer_delay() with internal_sleep() where appropriate ==<br />
<br />
If a delay call does not depend on precise timing and if the '''programmer''' in question '''does not offer its own delay function''', programmer_delay() can be replaced with internal_sleep().<br />
If a delay call does not depend on precise timing and if the delay '''should run on the host''', programmer_delay() can be replaced with internal_sleep().<br />
<br />
= Done =<br />
<br />
== Add automatic uploading of log files == <br />
We have a pastebin at http://paste.flashrom.org. Create a patch that (if enabled) automatically uploads the output of a flashrom run to it using [http://curl.haxx.se/libcurl/ libcurl] or a similar library (free license, cross-platform).<br />
<br />
''PoC sent by Michael Coppola, but so far rejected by Carl-Daniel.''<br />
<br />
== Tag SPI chips in flashchips.c with the status register write command according to their datasheets ==<br />
<br />
Usually the status register of SPI chips is write protected and has to be made accessible by one of two possible commands (or by either one). We indicate this by setting 2 bits in the feature flags of the chip definition in flashchips.c.<br />
The default is EWSR (see spi_write_status_register in spi25.c) and so no chips needing this have been tagged correctly (yet!).<br />
The task is to look at all chip definitions with '''bustype = BUS_SPI''' and check the '''feature_bits''' field if it contains the correct '''FEATURE_WRSR_*''' flag and add/change it after looking it up in the datasheet. In case either works use FEATURE_WRSR_EITHER.<br />
Please send a list of chips to change together with the correct flag or (preferably) a patch to the mailing list.<br />
<br />
''Patch created by Steven Zakulec, committed in r1527.''</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2169Serprog/Arduino flasher2016-02-02T07:52:29Z<p>Urjaman: fix source url for the schematics (moved to flashrom org)</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have:<br />
* a supported Arduino, these are<br />
** any based on the ATmega328 (/168/88 will work with small changes too), like the Arduino Uno R3. <br />
** Arduino Mega or Mega2560, but notice that the software has a different branch for them.<br />
* a way to convert the 5V logic levels to 3.3V (except if 3.3V arduino, these are rarer)<br />
* a 3.3V SPI flash chip that is supported by flashrom<br />
<br />
Notes:<br />
* The FTDI based usb-serial converters are the fastest.<br />
* 1.8V conversion isnt covered here, yet.<br />
<br />
There are some simple schematics included here ([https://github.com/flashrom/wiki-arduino-spi-example-schematics source]).<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
For the Arduino Megas:<br />
<br />
[[File:P1v2_arduino1280.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
For the SMD SOIC-16 chips the pinout is:<br />
<br />
[[File:P3v2_so16_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V ATMega328s with FTDI, variations to that will need adaptations in building the shield and/or in the firmware. The Uno R3 will work with the fast-usbserial U2 firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware. Frser-duino does have the code for using the CS like in this shield, but you need to modify spihw.h.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (16/02/01) flashrom trunk will be really slow, please use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Building for the Mega1280 or 2560 ====<br />
As above, except use the branch for the 1280:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino -b arduino-mega-1280<br />
<br />
For the Mega2560, change the Makefile to target the correct MCU (replace 1280 with 2560).<br />
Please also verify that the avrdude command is as expected for your device.<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2168Serprog/Arduino flasher2016-02-02T03:56:08Z<p>Urjaman: Link source for the schematics</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have:<br />
* a supported Arduino, these are<br />
** any based on the ATmega328 (/168/88 will work with small changes too), like the Arduino Uno R3. <br />
** Arduino Mega or Mega2560, but notice that the software has a different branch for them.<br />
* a way to convert the 5V logic levels to 3.3V (except if 3.3V arduino, these are rarer)<br />
* a 3.3V SPI flash chip that is supported by flashrom<br />
<br />
Notes:<br />
* The FTDI based usb-serial converters are the fastest.<br />
* 1.8V conversion isnt covered here, yet.<br />
<br />
There are some simple schematics included here ([https://github.com/urjaman/arduino-spi-example-schematics source]).<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
For the Arduino Megas:<br />
<br />
[[File:P1v2_arduino1280.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
For the SMD SOIC-16 chips the pinout is:<br />
<br />
[[File:P3v2_so16_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V ATMega328s with FTDI, variations to that will need adaptations in building the shield and/or in the firmware. The Uno R3 will work with the fast-usbserial U2 firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware. Frser-duino does have the code for using the CS like in this shield, but you need to modify spihw.h.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (16/02/01) flashrom trunk will be really slow, please use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Building for the Mega1280 or 2560 ====<br />
As above, except use the branch for the 1280:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino -b arduino-mega-1280<br />
<br />
For the Mega2560, change the Makefile to target the correct MCU (replace 1280 with 2560).<br />
Please also verify that the avrdude command is as expected for your device.<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2167Serprog/Arduino flasher2016-02-02T03:35:00Z<p>Urjaman: edit to trigger resize of pictures...</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have:<br />
* a supported Arduino, these are<br />
** any based on the ATmega328 (/168/88 will work with small changes too), like the Arduino Uno R3. <br />
** Arduino Mega or Mega2560, but notice that the software has a different branch for them.<br />
* a way to convert the 5V logic levels to 3.3V (except if 3.3V arduino, these are rarer)<br />
* a 3.3V SPI flash chip that is supported by flashrom<br />
<br />
Notes:<br />
* The FTDI based usb-serial converters are the fastest.<br />
* 1.8V conversion isnt covered here, yet.<br />
<br />
There are some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
For the Arduino Megas:<br />
<br />
[[File:P1v2_arduino1280.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
For the SMD SOIC-16 chips the pinout is:<br />
<br />
[[File:P3v2_so16_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V ATMega328s with FTDI, variations to that will need adaptations in building the shield and/or in the firmware. The Uno R3 will work with the fast-usbserial U2 firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware. Frser-duino does have the code for using the CS like in this shield, but you need to modify spihw.h.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (16/02/01) flashrom trunk will be really slow, please use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Building for the Mega1280 or 2560 ====<br />
As above, except use the branch for the 1280:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino -b arduino-mega-1280<br />
<br />
For the Mega2560, change the Makefile to target the correct MCU (replace 1280 with 2560).<br />
Please also verify that the avrdude command is as expected for your device.<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P3v2_so16_spi.png&diff=2166File:P3v2 so16 spi.png2016-02-02T03:33:25Z<p>Urjaman: Urjaman uploaded a new version of File:P3v2 so16 spi.png</p>
<hr />
<div>serprog arduino flasher page, schema of how to connect a SOIC-16 SPI flash</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P3v1_dil8_so8_spi.png&diff=2165File:P3v1 dil8 so8 spi.png2016-02-02T03:33:06Z<p>Urjaman: Urjaman uploaded a new version of File:P3v1 dil8 so8 spi.png</p>
<hr />
<div>Serprog Arduino flasher... how do you connect an DIL8/SO8 SPI flash schematic.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P2v3_buffer4050.png&diff=2164File:P2v3 buffer4050.png2016-02-02T03:32:36Z<p>Urjaman: Urjaman uploaded a new version of File:P2v3 buffer4050.png</p>
<hr />
<div>Simple schematic of using a 4050 buffer to translate 5V to 3.3V, for the serprog arduino flasher page...</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P2v2_oc_cs.png&diff=2163File:P2v2 oc cs.png2016-02-02T03:32:07Z<p>Urjaman: Urjaman uploaded a new version of File:P2v2 oc cs.png</p>
<hr />
<div>Description of the open-collector CS used by the frser-m328lpcspi shield for the serprog arduino flasher page.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P2v1_resdivider.png&diff=2162File:P2v1 resdivider.png2016-02-02T03:31:52Z<p>Urjaman: Urjaman uploaded a new version of File:P2v1 resdivider.png</p>
<hr />
<div>For the serprog arduino page, description of resistor divider voltage translation...</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P1v2_arduino1280.png&diff=2161File:P1v2 arduino1280.png2016-02-02T03:31:36Z<p>Urjaman: Urjaman uploaded a new version of File:P1v2 arduino1280.png</p>
<hr />
<div>for the Serprog Arduino page, picture of where the SPI is on the arduino megas</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P1v1_arduino328.png&diff=2160File:P1v1 arduino328.png2016-02-02T03:31:20Z<p>Urjaman: Urjaman uploaded a new version of File:P1v1 arduino328.png</p>
<hr />
<div>For the serprog arduino flasher page, simple description of <br />
the pins of the arduino that are required.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2159Serprog/Arduino flasher2016-02-01T18:57:50Z<p>Urjaman: Make the requirements clearer</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have:<br />
* a supported Arduino, these are<br />
** any based on the ATmega328 (/168/88 will work with small changes too), like the Arduino Uno R3. <br />
** Arduino Mega or Mega2560, but notice that the software has a different branch for them.<br />
* a way to convert the 5V logic levels to 3.3V (except if 3.3V arduino, these are rarer)<br />
* a 3.3V SPI flash chip that is supported by flashrom<br />
<br />
Notes:<br />
* The FTDI based usb-serial converters are the fastest.<br />
* 1.8V conversion isnt covered here, yet.<br />
<br />
There are some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
For the Arduino Megas:<br />
<br />
[[File:P1v2_arduino1280.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
For the SMD SOIC-16 chips the pinout is:<br />
<br />
[[File:P3v2_so16_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V ATMega328s with FTDI, variations to that will need adaptations in building the shield and/or in the firmware. The Uno R3 will work with the fast-usbserial U2 firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware. Frser-duino does have the code for using the CS like in this shield, but you need to modify spihw.h.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (16/02/01) flashrom trunk will be really slow, please use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Building for the Mega1280 or 2560 ====<br />
As above, except use the branch for the 1280:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino -b arduino-mega-1280<br />
<br />
For the Mega2560, change the Makefile to target the correct MCU (replace 1280 with 2560).<br />
Please also verify that the avrdude command is as expected for your device.<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2158Serprog/Arduino flasher2016-02-01T18:34:18Z<p>Urjaman: typofixes and clarifications</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have a supported Arduino, these are primarily<br />
any based on the ATmega328 (/168/88 will work with small changes too),<br />
like the Arduino Uno R3. <br />
<br />
The Arduino Mega and Mega2560 are also supported, but notice that<br />
the software has a different branch for them.<br />
<br />
The FTDI-based usb-serial converters are the fastest.<br />
<br />
And unless the Arduino is a 3.3V version (rare, and the firmware would<br />
need small modifications (like MCU frequency) to run on one),<br />
you'll also need a way to convert the 5V logic levels to 3.3V,<br />
but check that your flash chip is 3.3V and not 1.8V - that would<br />
need level conversion in both directions and is not covered<br />
here, yet.<br />
<br />
And an SPI flash chip that is supported by flashrom.<br />
<br />
There are some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
For the Arduino Megas:<br />
<br />
[[File:P1v2_arduino1280.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
For the SMD SOIC-16 chips the pinout is:<br />
<br />
[[File:P3v2_so16_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V ATMega328s with FTDI, variations to that will need adaptations in building the shield and/or in the firmware. The Uno R3 will work with the fast-usbserial U2 firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware. Frser-duino does have the code for using the CS like in this shield, but you need to modify spihw.h.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (16/02/01) flashrom trunk will be really slow, please use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Building for the Mega1280 or 2560 ====<br />
As above, except use the branch for the 1280:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino -b arduino-mega-1280<br />
<br />
For the Mega2560, change the Makefile to target the correct MCU (replace 1280 with 2560).<br />
Please also verify that the avrdude command is as expected for your device.<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2157Serprog/Arduino flasher2016-02-01T18:14:38Z<p>Urjaman: /* Part 3: The SPI Flash chip */ Add SOIC-16 schematic picture</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have a supported Arduino, are primarily<br />
any based on the ATmega328 (/168/88 will work with small changes too),<br />
like the Arduino Uno R3. Best performance is available with<br />
one with an FTDI usb-serial chip (older ones, sparkfun redboard, etc).<br />
<br />
The Arduino Mega and Mega2560 are also supported, but notice that<br />
the software has a different branch for them.<br />
<br />
And unless the Arduino is a 3.3V version (rare, and the firmware would<br />
need small modifications (like MCU frequency) to run on one),<br />
you'll also need a way to convert the 5V logic levels to 3.3V,<br />
but check that your flash chip is 3.3V and not 1.8V - that would<br />
need level conversion in both directions and is not covered<br />
here, yet.<br />
<br />
And an SPI flash chip that is supported by flashrom.<br />
<br />
There are some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
For the Arduino Megas:<br />
<br />
[[File:P1v2_arduino1280.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
For the SMD SOIC-16 chips the pinout is:<br />
<br />
[[File:P3v2_so16_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Building for the Mega1280 or 2560 ====<br />
As above, except use the branch for the 1280:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino -b arduino-mega-1280<br />
<br />
For the Mega2560, change the Makefile to target the correct MCU (replace 1280 with 2560).<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P3v2_so16_spi.png&diff=2156File:P3v2 so16 spi.png2016-02-01T18:13:18Z<p>Urjaman: serprog arduino flasher page, schema of how to connect a SOIC-16 SPI flash</p>
<hr />
<div>serprog arduino flasher page, schema of how to connect a SOIC-16 SPI flash</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2155Serprog/Arduino flasher2016-02-01T18:11:33Z<p>Urjaman: Add picture of the arduino mega SPI</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have a supported Arduino, are primarily<br />
any based on the ATmega328 (/168/88 will work with small changes too),<br />
like the Arduino Uno R3. Best performance is available with<br />
one with an FTDI usb-serial chip (older ones, sparkfun redboard, etc).<br />
<br />
The Arduino Mega and Mega2560 are also supported, but notice that<br />
the software has a different branch for them.<br />
<br />
And unless the Arduino is a 3.3V version (rare, and the firmware would<br />
need small modifications (like MCU frequency) to run on one),<br />
you'll also need a way to convert the 5V logic levels to 3.3V,<br />
but check that your flash chip is 3.3V and not 1.8V - that would<br />
need level conversion in both directions and is not covered<br />
here, yet.<br />
<br />
And an SPI flash chip that is supported by flashrom.<br />
<br />
There are some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
For the Arduino Megas:<br />
<br />
[[File:P1v2_arduino1280.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The smaller DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Building for the Mega1280 or 2560 ====<br />
As above, except use the branch for the 1280:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino -b arduino-mega-1280<br />
<br />
For the Mega2560, change the Makefile to target the correct MCU (replace 1280 with 2560).<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P1v2_arduino1280.png&diff=2154File:P1v2 arduino1280.png2016-02-01T18:09:14Z<p>Urjaman: for the Serprog Arduino page, picture of where the SPI is on the arduino megas</p>
<hr />
<div>for the Serprog Arduino page, picture of where the SPI is on the arduino megas</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2153Serprog/Arduino flasher2016-02-01T18:08:27Z<p>Urjaman: Include build info for the Arduino Mega branch</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have a supported Arduino, are primarily<br />
any based on the ATmega328 (/168/88 will work with small changes too),<br />
like the Arduino Uno R3. Best performance is available with<br />
one with an FTDI usb-serial chip (older ones, sparkfun redboard, etc).<br />
<br />
The Arduino Mega and Mega2560 are also supported, but notice that<br />
the software has a different branch for them.<br />
<br />
And unless the Arduino is a 3.3V version (rare, and the firmware would<br />
need small modifications (like MCU frequency) to run on one),<br />
you'll also need a way to convert the 5V logic levels to 3.3V,<br />
but check that your flash chip is 3.3V and not 1.8V - that would<br />
need level conversion in both directions and is not covered<br />
here, yet.<br />
<br />
And an SPI flash chip that is supported by flashrom.<br />
<br />
There are some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The smaller DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
=== Building for the Mega1280 or 2560 ===<br />
As above, except use the branch for the 1280:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino -b arduino-mega-1280<br />
<br />
For the Mega2560, change the Makefile to target the correct MCU (replace 1280 with 2560).<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P2v1_resdivider.png&diff=2152File:P2v1 resdivider.png2016-02-01T17:59:30Z<p>Urjaman: Urjaman uploaded a new version of File:P2v1 resdivider.png</p>
<hr />
<div>For the serprog arduino page, description of resistor divider voltage translation...</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P2v2_oc_cs.png&diff=2151File:P2v2 oc cs.png2016-02-01T17:59:15Z<p>Urjaman: Urjaman uploaded a new version of File:P2v2 oc cs.png</p>
<hr />
<div>Description of the open-collector CS used by the frser-m328lpcspi shield for the serprog arduino flasher page.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P2v3_buffer4050.png&diff=2150File:P2v3 buffer4050.png2016-02-01T17:58:54Z<p>Urjaman: Urjaman uploaded a new version of File:P2v3 buffer4050.png</p>
<hr />
<div>Simple schematic of using a 4050 buffer to translate 5V to 3.3V, for the serprog arduino flasher page...</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P3v1_dil8_so8_spi.png&diff=2149File:P3v1 dil8 so8 spi.png2016-02-01T17:58:36Z<p>Urjaman: Urjaman uploaded a new version of File:P3v1 dil8 so8 spi.png</p>
<hr />
<div>Serprog Arduino flasher... how do you connect an DIL8/SO8 SPI flash schematic.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P1v1_arduino328.png&diff=2148File:P1v1 arduino328.png2016-02-01T17:57:26Z<p>Urjaman: Urjaman uploaded a new version of File:P1v1 arduino328.png</p>
<hr />
<div>For the serprog arduino flasher page, simple description of <br />
the pins of the arduino that are required.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2147Serprog/Arduino flasher2016-02-01T15:03:42Z<p>Urjaman: Added note that resistor dividers arent good for ISPing</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have a supported Arduino, which as of writing are<br />
any based on the ATmega328 (/168/88 will work with small changes too),<br />
like the Arduino Uno R3. Best performance is available with<br />
one with an FTDI usb-serial chip (older ones, sparkfun redboard, etc).<br />
<br />
And unless the Arduino is a 3.3V version (rare, and the firmware would<br />
need small modifications (like MCU frequency) to run on one),<br />
you'll also need a way to convert the 5V logic levels to 3.3V,<br />
but check that your flash chip is 3.3V and not 1.8V - that would<br />
need level conversion in both directions and is not explained<br />
here, yet.<br />
<br />
And an SPI flash chip that is supported by flashrom.<br />
<br />
There are some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
One thing to remember about the resistor dividers is that they're not strong enough<br />
to do [[ISP]].<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The smaller DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2146Serprog/Arduino flasher2016-02-01T14:41:48Z<p>Urjaman: Wipe most of the compatibility chitchat ... this was basically described in the hardware part already. It needs an M328 :P</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have a supported Arduino, which as of writing are<br />
any based on the ATmega328 (/168/88 will work with small changes too),<br />
like the Arduino Uno R3. Best performance is available with<br />
one with an FTDI usb-serial chip (older ones, sparkfun redboard, etc).<br />
<br />
And unless the Arduino is a 3.3V version (rare, and the firmware would<br />
need small modifications (like MCU frequency) to run on one),<br />
you'll also need a way to convert the 5V logic levels to 3.3V,<br />
but check that your flash chip is 3.3V and not 1.8V - that would<br />
need level conversion in both directions and is not explained<br />
here, yet.<br />
<br />
And an SPI flash chip that is supported by flashrom.<br />
<br />
There will be some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The smaller DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Software and setup ==<br />
<br />
The Arduino Uno R3 and other arduinos with an ATmega8U2/16U2 as an usb-serial converter<br />
have lots of bugs in their usb-serial firmware that prevent it from operating at more<br />
than a limited 115200 baud. The frser-duino firmware works around this by default<br />
if you use the appropriate make target, but there exists a firmware that allows<br />
these to be used like the FTDI at 2Mbaud: [https://github.com/urjaman/fast-usbserial].<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2145Serprog/Arduino flasher2016-02-01T14:25:15Z<p>Urjaman: Fix branch name in my github</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have a supported Arduino, which as of writing are<br />
any based on the ATmega328 (/168/88 will work with small changes too),<br />
like the Arduino Uno R3. Best performance is available with<br />
one with an FTDI usb-serial chip (older ones, sparkfun redboard, etc).<br />
<br />
And unless the Arduino is a 3.3V version (rare, and the firmware would<br />
need small modifications (like MCU frequency) to run on one),<br />
you'll also need a way to convert the 5V logic levels to 3.3V,<br />
but check that your flash chip is 3.3V and not 1.8V - that would<br />
need level conversion in both directions and is not explained<br />
here, yet.<br />
<br />
And an SPI flash chip that is supported by flashrom.<br />
<br />
There will be some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The smaller DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/sp-upstream2 this branch] instead.<br />
<br />
== Compatibility, software and setup ==<br />
=== Compatibility ===<br />
There are some differences between the various arduinos that are relevant for this flasher:<br />
==== Architecture ====<br />
* Only the AVR architecture is supported for now, because the code depends on avr-libc. In one hand that makes it portable across other non-arduino AVR boards, but it also makes it incompatible with the arduinos that don't have an AVR.<br />
<br />
==== USB<->serial converter ====<br />
* Some Arduinos have an FTDI USB<->Serial converter, we can achieve a very high speed of 2000000 bauds with ir.<br />
* Some Arduino have a 8u2/16u2 instead: This is an extra microcontroller which does the USB<->serial conversion trough a firmware build on LUFA. While that brings lower cost and more flexibility, the downside is that in our case the default firmware was not written for speed over 115200. To get more speed we would need to write another firmware for it.<br />
* Some Arduinos don't have an USB<->serial converter, like the arduino leonardo. Instead they have a native USB port.<br />
* Most/All Arduinos have an accessible serial port on their pins. if you have an extra USB<->Serial converter, you can plug it to theses pins. BE SURE TO CHECK THE VOLTAGE COMPATIBILITY BEFORE ATTEMPTING THAT.<br />
==== Voltage ====<br />
* Some arduinos are at 3.3v.<br />
* Some are at 5v. Unfortunately most SPI chips are at 3.3v at the time of writing.<br />
<br />
==== Boards ====<br />
{| class="wikitable" border="1"<br />
! Arduinos<br />
! Hardware<br />
! User notes<br />
|-<br />
|<br />
* Arduino uno<br />
|<br />
* Has a 8u2 or 16u2 for the USB<->Serial converter<br />
* Uses 5V logic levels.<br />
|<br />
|-<br />
|<br />
* Arduino nano<br />
|<br />
* Uses 3.3v logic<br />
* Has an FTDI<br />
| <br />
* using the three wires serial '''and''' lowering the speed all problems disappear; the code has to be changed to reflects the new speed (115200); to program the board use "avrdude -c arduino -vv -P /dev/ttyUSB* -p atmega328p -b 57600 -U flash:w:serprog.hex"<br />
|-<br />
|<br />
* Arduino Duemilanove<br />
|<br />
* Has an FTDI<br />
* Uses 5V logic.<br />
|<br />
|-<br />
|<br />
* Arduino leonardo<br />
|<br />
* Lacks an USB<->Serial converter<br />
* Arduino Leonardo<br />
|<br />
* Untested<br />
|-<br />
|}<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)<br />
<br />
==== Advantages and disadvantages ====<br />
* <s>The speed isn't that great(about 3 minutes for reading+writing+verifying a 1M chip)</s> Fixed by by Sebastian Parborg.<br />
* <s>Voltage issues( SPI levels are at 5v, it's problematic for flashing 3.3v chips...)</s><br />
* it is made of very commonly available parts(if you can find an arduino uno, you will be able to build it).<br />
<br />
=== TODO ===<br />
* <s>Find a way to lower the voltage to 3.3v</s><br />
* <s>Fix the arduino UNO speed and reliability issues</s> Simply lowering the bauds as advised on the LUFA mailing list long time did fixed it.<br />
* Write a faster 8u2 firmware<br />
* Look at other AVR targets<br />
* Look if it's portable to other architectures (like ARM).</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2144Serprog/Arduino flasher2016-02-01T14:22:31Z<p>Urjaman: Change out the dangerous build instructions and photos of dangerous devices to simpleish schematics</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Hardware basics ==<br />
You'll need to have a supported Arduino, which as of writing are<br />
any based on the ATmega328 (/168/88 will work with small changes too),<br />
like the Arduino Uno R3. Best performance is available with<br />
one with an FTDI usb-serial chip (older ones, sparkfun redboard, etc).<br />
<br />
And unless the Arduino is a 3.3V version (rare, and the firmware would<br />
need small modifications (like MCU frequency) to run on one),<br />
you'll also need a way to convert the 5V logic levels to 3.3V,<br />
but check that your flash chip is 3.3V and not 1.8V - that would<br />
need level conversion in both directions and is not explained<br />
here, yet.<br />
<br />
And an SPI flash chip that is supported by flashrom.<br />
<br />
There will be some simple schematics included here.<br />
The idea is that you pick one version from each part 1 through 3,<br />
and connect the pin/net names.<br />
<br />
=== Part 1: The Arduino ===<br />
ATmega328 based ones:<br />
<br />
[[File:P1v1_arduino328.png]]<br />
<br />
=== Part 2: Level translation ===<br />
There are a few options here, ranging from the simple resistors (v1) to a buffer chip (v3).<br />
<br />
Here's the simple resistors:<br />
<br />
[[File:P2v1_resdivider.png]]<br />
<br />
The part count for the resistor divider is 6 resistors of 2 types or 9 of one type.<br />
<br />
Here's one with 5 resistors, the downside is that you'll need to modify the<br />
firmware a little:<br />
<br />
[[File:P2v2_oc_cs.png]]<br />
<br />
The 3rd version is using the DIP16 HEF4050 buffer chip:<br />
<br />
[[File:P2v3_buffer4050.png]]<br />
<br />
=== Part 3: The SPI Flash chip ===<br />
The smaller DIL-8 and SOIC-8 versions connect like this: <br />
<br />
[[File:P3v1_dil8_so8_spi.png]]<br />
<br />
== Gallery of some flashers ==<br />
<gallery caption="" widths="250px" heights="250px" perrow="4"><br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
== Alternative: Shield with SPI and LPC/FWH for 5V Arduinos ==<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/serprog-improvements this branch] instead.<br />
<br />
== Compatibility, software and setup ==<br />
=== Compatibility ===<br />
There are some differences between the various arduinos that are relevant for this flasher:<br />
==== Architecture ====<br />
* Only the AVR architecture is supported for now, because the code depends on avr-libc. In one hand that makes it portable across other non-arduino AVR boards, but it also makes it incompatible with the arduinos that don't have an AVR.<br />
<br />
==== USB<->serial converter ====<br />
* Some Arduinos have an FTDI USB<->Serial converter, we can achieve a very high speed of 2000000 bauds with ir.<br />
* Some Arduino have a 8u2/16u2 instead: This is an extra microcontroller which does the USB<->serial conversion trough a firmware build on LUFA. While that brings lower cost and more flexibility, the downside is that in our case the default firmware was not written for speed over 115200. To get more speed we would need to write another firmware for it.<br />
* Some Arduinos don't have an USB<->serial converter, like the arduino leonardo. Instead they have a native USB port.<br />
* Most/All Arduinos have an accessible serial port on their pins. if you have an extra USB<->Serial converter, you can plug it to theses pins. BE SURE TO CHECK THE VOLTAGE COMPATIBILITY BEFORE ATTEMPTING THAT.<br />
==== Voltage ====<br />
* Some arduinos are at 3.3v.<br />
* Some are at 5v. Unfortunately most SPI chips are at 3.3v at the time of writing.<br />
<br />
==== Boards ====<br />
{| class="wikitable" border="1"<br />
! Arduinos<br />
! Hardware<br />
! User notes<br />
|-<br />
|<br />
* Arduino uno<br />
|<br />
* Has a 8u2 or 16u2 for the USB<->Serial converter<br />
* Uses 5V logic levels.<br />
|<br />
|-<br />
|<br />
* Arduino nano<br />
|<br />
* Uses 3.3v logic<br />
* Has an FTDI<br />
| <br />
* using the three wires serial '''and''' lowering the speed all problems disappear; the code has to be changed to reflects the new speed (115200); to program the board use "avrdude -c arduino -vv -P /dev/ttyUSB* -p atmega328p -b 57600 -U flash:w:serprog.hex"<br />
|-<br />
|<br />
* Arduino Duemilanove<br />
|<br />
* Has an FTDI<br />
* Uses 5V logic.<br />
|<br />
|-<br />
|<br />
* Arduino leonardo<br />
|<br />
* Lacks an USB<->Serial converter<br />
* Arduino Leonardo<br />
|<br />
* Untested<br />
|-<br />
|}<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)<br />
<br />
==== Advantages and disadvantages ====<br />
* <s>The speed isn't that great(about 3 minutes for reading+writing+verifying a 1M chip)</s> Fixed by by Sebastian Parborg.<br />
* <s>Voltage issues( SPI levels are at 5v, it's problematic for flashing 3.3v chips...)</s><br />
* it is made of very commonly available parts(if you can find an arduino uno, you will be able to build it).<br />
<br />
=== TODO ===<br />
* <s>Find a way to lower the voltage to 3.3v</s><br />
* <s>Fix the arduino UNO speed and reliability issues</s> Simply lowering the bauds as advised on the LUFA mailing list long time did fixed it.<br />
* Write a faster 8u2 firmware<br />
* Look at other AVR targets<br />
* Look if it's portable to other architectures (like ARM).</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P3v1_dil8_so8_spi.png&diff=2143File:P3v1 dil8 so8 spi.png2016-02-01T14:13:12Z<p>Urjaman: Serprog Arduino flasher... how do you connect an DIL8/SO8 SPI flash schematic.</p>
<hr />
<div>Serprog Arduino flasher... how do you connect an DIL8/SO8 SPI flash schematic.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P2v3_buffer4050.png&diff=2142File:P2v3 buffer4050.png2016-02-01T14:11:29Z<p>Urjaman: Simple schematic of using a 4050 buffer to translate 5V to 3.3V, for the serprog arduino flasher page...</p>
<hr />
<div>Simple schematic of using a 4050 buffer to translate 5V to 3.3V, for the serprog arduino flasher page...</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P2v2_oc_cs.png&diff=2141File:P2v2 oc cs.png2016-02-01T14:09:46Z<p>Urjaman: Description of the open-collector CS used by the frser-m328lpcspi shield for the serprog arduino flasher page.</p>
<hr />
<div>Description of the open-collector CS used by the frser-m328lpcspi shield for the serprog arduino flasher page.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P2v1_resdivider.png&diff=2140File:P2v1 resdivider.png2016-02-01T14:06:22Z<p>Urjaman: For the serprog arduino page, description of resistor divider voltage translation...</p>
<hr />
<div>For the serprog arduino page, description of resistor divider voltage translation...</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:P1v1_arduino328.png&diff=2139File:P1v1 arduino328.png2016-02-01T14:00:58Z<p>Urjaman: For the serprog arduino flasher page, simple description of
the pins of the arduino that are required.</p>
<hr />
<div>For the serprog arduino flasher page, simple description of <br />
the pins of the arduino that are required.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2138Serprog/Arduino flasher2016-02-01T13:49:05Z<p>Urjaman: basically all of them at 3.3V, so many common => most</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING, make sure that the Arduino SPI voltages and the flash chip voltages matches: Without any extra resistors or level shifter, the Arduino Uno and Duemillanove SPI pins are at 5V, while most chips operate at 3.3v.'''</div><br />
== Building the flasher ==<br />
This flasher require the following hardware parts:<br />
* An arduino uno or an arduino Duemilanove(way faster) and its usb cable<br />
* some wires(optionally some connectors to solder on(for easier plugin and more reliability)<br />
* <s>a 10k resistor</s><br />
* 3 x 10k resistors (for the 3.3v version)<br />
* 3 x 15k resistors (for the 3.3v version)<br />
* A flash chip with the following characteristics:<br />
** supported by flashrom<br />
** SPI<br />
** 3.3v or 5v(the arduino has a 3.3v and a 5v output, only 3.3v was tested...)<br />
=== 5V version ===<br />
==== Pictures ====<br />
<gallery caption="Pictures " widths="250px" heights="250px" perrow="4"><br />
File:Serprog_0001.jpeg<br />
File:Serprog_0002.jpeg<br />
File:Serprog_0003.jpeg<br />
File:Serprog_0004.jpeg<br />
File:Serprog_0005.jpeg<br />
File:Serprog_0006.jpeg<br />
File:Serduino_laptop.jpeg| Because of the long cables flashrom had to retry once before reflashing the BIOS but at the end it worked. So don't use cables that are that long... <br />
File:W1qtO.jpg| Setup by Sebastian Parborg (DarkDefender)<br />
File:Arduino_topview_noresistor.jpeg| It now seem to also work without resistor...<br />
File:Serduino fritzing.jpg| [[File:Serduino.fzz.zip]]<br />
</gallery><br />
<br />
==== Building ====<br />
<br />
Left pins of the BIOS chip:<br />
--------------------------------------------------------<br />
[pin1 of the bios chip] /CS<->10k resistor<->VCC <br />
<br />
[pin1 of the bios chip] /CS<->Arduino pin10(SS, PORTB2)<br />
[pin2 of the bios chip] DO<->Arduino pin12(MISO, PORTB4)<br />
[pin3 of the bios chip] /WP<->VCC<br />
[pin4 of the bios chip] GND<->GND on the power pins<br />
<br />
Right pins of the BIOS chip:<br />
--------------------------------------------------------<br />
[pin8 of the bios chip] VCC<->+3.3V on the power pins of the Arduino<br />
[pin7 of the bios chip] /HOLD<->VCC<br />
[pin6 of the bios chip] CLK<->Arduino pin13(SCK, PORTB5)<br />
[pin5 of the bios chip] DIO<->Arduino pin11(MOSI, PORTB3)<br />
<br />
The Bios chip used is a W25X80. <br />
The Arduino is an arduino uno.<br />
<br />
=== 3.3v version ===<br />
==== Pictures ====<br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING''', I was told that by Simon Inns by mail: "The 3V3 fritzing example on the Wiki (the diagram of the breadboard) is quite wrong... The 3V3 output from the Uno is shorted to GND and the CLK and DI pins of the EEPROM are connected together after the 10K resistors. Might be a good idea to fix it before you get "You broke my Uno" emails ;)"</div><br />
<br />
<gallery caption="Pictures " widths="250px" heights="250px" perrow="4"><br />
File:Serduino-v2_bb.jpg<br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
==== Improved version by Simon Inns ====<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:Uno BIOS Flasher 2.png | [[File:Uno_BIOS_Flasher2_EagleCad.zip|Schematics]]<br />
</gallery><br />
<br />
=== Shield with SPI and LPC/FWH for 5V Arduinos ===<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/serprog-improvements this branch] instead.<br />
<br />
== Compatibility, software and setup ==<br />
=== Compatibility ===<br />
There are some differences between the various arduinos that are relevant for this flasher:<br />
==== Architecture ====<br />
* Only the AVR architecture is supported for now, because the code depends on avr-libc. In one hand that makes it portable across other non-arduino AVR boards, but it also makes it incompatible with the arduinos that don't have an AVR.<br />
<br />
==== USB<->serial converter ====<br />
* Some Arduinos have an FTDI USB<->Serial converter, we can achieve a very high speed of 2000000 bauds with ir.<br />
* Some Arduino have a 8u2/16u2 instead: This is an extra microcontroller which does the USB<->serial conversion trough a firmware build on LUFA. While that brings lower cost and more flexibility, the downside is that in our case the default firmware was not written for speed over 115200. To get more speed we would need to write another firmware for it.<br />
* Some Arduinos don't have an USB<->serial converter, like the arduino leonardo. Instead they have a native USB port.<br />
* Most/All Arduinos have an accessible serial port on their pins. if you have an extra USB<->Serial converter, you can plug it to theses pins. BE SURE TO CHECK THE VOLTAGE COMPATIBILITY BEFORE ATTEMPTING THAT.<br />
==== Voltage ====<br />
* Some arduinos are at 3.3v.<br />
* Some are at 5v. Unfortunately most SPI chips are at 3.3v at the time of writing.<br />
<br />
==== Boards ====<br />
{| class="wikitable" border="1"<br />
! Arduinos<br />
! Hardware<br />
! User notes<br />
|-<br />
|<br />
* Arduino uno<br />
|<br />
* Has a 8u2 or 16u2 for the USB<->Serial converter<br />
* Uses 5V logic levels.<br />
|<br />
|-<br />
|<br />
* Arduino nano<br />
|<br />
* Uses 3.3v logic<br />
* Has an FTDI<br />
| <br />
* using the three wires serial '''and''' lowering the speed all problems disappear; the code has to be changed to reflects the new speed (115200); to program the board use "avrdude -c arduino -vv -P /dev/ttyUSB* -p atmega328p -b 57600 -U flash:w:serprog.hex"<br />
|-<br />
|<br />
* Arduino Duemilanove<br />
|<br />
* Has an FTDI<br />
* Uses 5V logic.<br />
|<br />
|-<br />
|<br />
* Arduino leonardo<br />
|<br />
* Lacks an USB<->Serial converter<br />
* Arduino Leonardo<br />
|<br />
* Untested<br />
|-<br />
|}<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)<br />
<br />
==== Advantages and disadvantages ====<br />
* <s>The speed isn't that great(about 3 minutes for reading+writing+verifying a 1M chip)</s> Fixed by by Sebastian Parborg.<br />
* <s>Voltage issues( SPI levels are at 5v, it's problematic for flashing 3.3v chips...)</s><br />
* it is made of very commonly available parts(if you can find an arduino uno, you will be able to build it).<br />
<br />
=== TODO ===<br />
* <s>Find a way to lower the voltage to 3.3v</s><br />
* <s>Fix the arduino UNO speed and reliability issues</s> Simply lowering the bauds as advised on the LUFA mailing list long time did fixed it.<br />
* Write a faster 8u2 firmware<br />
* Look at other AVR targets<br />
* Look if it's portable to other architectures (like ARM).</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Supported_programmers&diff=2123Supported programmers2015-07-26T09:54:47Z<p>Urjaman: Say a word about what frser-duino can be used with</p>
<hr />
<div>Flashrom supports many different programmers, including PC mainboards, various PCI cards with soldered-on flash chips, and various USB/serial-port/parallel-port based programmers.<br />
<br />
{| border="0" style="vertical-align: top; font-size: smaller" <br />
|- bgcolor="#6699ff"<br />
! colspan="2" | Programmer<br />
!Status<br />
!Comments<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Via pc2500e.jpg|100px|left]]<br />
| internal<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports a [[Supported_hardware#Supported_mainboards|large number of mainboards]], other mainboards may be supported out-of-the-box too, or might require a little additional code in flashrom.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Computer.png|100px|left]]<br />
| dummy<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | The "dummy" programmer is a software-only implementation of a simple programmer which is mostly useful for flashrom development and testing.<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:3com prog.jpg|100px|left]]<br />
| nic3com<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports some [[NIC3Com|3Com network cards]] to reflash the (parallel) flash attached to these cards, but it is also possible to use these cards to reflash other chips which fit in there electrically. Please note that the small number of address lines connected to the chip may make accessing large chips impossible. The maximum supported chip size if '''128KB'''.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nic3realtek<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Gfxnvidia original card.jpg|100px|left]]<br />
| gfxnvidia<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports some [[Gfxnvidia|Nvidia graphic cards]] to reflash the (parallel) flash attached to these cards, but it is also possible to use these cards to reflash other chips which fit in there electrically.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Dr kaiser.jpg|100px|left]]<br />
| drkaiser<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Satasii original.jpg|100px|left]]<br />
| satasii<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports some SiI ATA/SATA controllers to reflash the flash attached to these controller cards, but it is also possible to use these cards to reflash other chips which fit in there electrically. Please note that the small number of address lines connected to the chip may make accessing large chips impossible.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:FT2232.jpg|100px|left]]<br />
| ft2232_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports the usage of various [[FT2232SPI Programmer|FTDI FT2232/FT4232H/FT232H-based devices]] as SPI flashers:<br />
<br />
|- bgcolor="#dddddd"<br />
| <br />
| ft2232_spi<br />[[File:Dlp usb1232h spi programmer breadboard 1.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#DLP_Design_DLP-USB1232H|DLP Design DLP-USB1232H]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#FTDI_FT2232H_Mini-Module|FTDI FT2232H Mini-Module]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#FTDI_FT4232H_Mini-Module|FTDI FT4232H Mini-Module]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Openbiosprog-spi-assembled-device-0.1-powerled-chip.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#openbiosprog-spi|openbiosprog-spi]] is an Open Hardware USB-based programmer for SPI chips, designed by [[User:Uwe|Uwe Hermann]]. It uses an FTDI FT2232H chip and features either a DIP-8 socket or a pinheader where jumper-wires can be attached.<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:RushSPI-board.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#RushSPI|RushSPI]] is an Open Hardware USB-based programmer for SPI chips, designed by [[User:CodeRush|Nikolaj Schlej]]. It uses an FTDI FT232H chip and features a DIP-8 socket and a pinheader where jumper-wires can be attached.<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Jtagkey-tiny.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#Amontec_JTAGkey.2FJTAGkey2.2FJTAGkey-Tiny|Amontec JTAGkey, JTAGkey-tiny, and JTAGkey2]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:ARM-USB-TINY pinout.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#Olimex_ARM-USB-TINY_and_related_devices|ARM-USB-TINY, ARM-USB-TINY-H, ARM-USB-OCD, ARM-USB-OCD-H]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer|GOEPEL PicoTAP]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer|TIAO Tumpa (USB Multi-Protocol Adapter)]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer|Dangerous Prototypes Bus Blaster]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Openmoko_0001.jpeg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#Openmoko|OpenMoko Neo1973 Debug board (V2+)]]<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| serprog<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports various [[serprog|serprog-derived hardware projects]] which all use the [http://flashrom.org/trac/flashrom/browser/trunk/serprog-protocol.txt serprog protocol]:<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Avr rs232 programmer.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#AVR_flasher_by_Urja_Rannikko|AVR flasher by Urja Rannikko]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#AVR_flasher_by_eightdot|AVR flasher by eightdot]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#Arduino_Mega_flasher_by_fritz|Arduino Mega flasher by fritz]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:InSystemFlasher-prototype1.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#InSystemFlasher_by_Juhana_Helovuo|InSystemFlasher by Juhana_Helovuo]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:AtmegaXXu2-flasher.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#atmegaXXu2-flasher_by_Stefan_Tauner|atmegaXXu2-flasher by Stefan Tauner]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Serprog-duino-top.JPG|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#Arduino_flasher_by_GNUtoo|Arduino Uno flasher by GNUtoo]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#Frser-duino|Frser-duino]] can be used with ATMega328-based arduinos for SPI flashing<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Teensy31_lpcspi_flasher.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Teensy 3.1 SPI + LPC/FWH Flasher|Teensy 3.1 SPI + LPC/FWH Flasher by Urja Rannikko]]<br />
<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| linux_spi<br /><br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" |<br />
<br />
|- bgcolor="#eeeeee"<br />
| <br />
| linux_spi<br /><br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [http://wiki.buglabs.net/index.php/SPI_Flash_Programmer linux_spi on the bug from buglabs by GNUtoo]<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Raspberry_Pi_Photo.jpg|100px|left]]<br />
| linux_spi<br /><br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[RaspberryPi|Using RaspberryPi's expansion port]]<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nic3realtek<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Buspirate v3 front.jpg|100px|left]]<br />
| buspirate_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | The Dangerous Prototypes [[Bus Pirate]] is a USB-attached opensource/openhardware device for debugging and prototyping various serial bus protocols. Flashrom supports flashing SPI chips which are connected to a Bus Pirate.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| rayer_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nicintel<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:IMG 1774.JPG|100px|left]]<br />
| nicintel_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| ogp_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| satamv<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| usbblaster_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Altera USB Blaster adapter, both brandname and clone products should work.<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Hpt370a orig.jpg|100px|left]]<br />
| atahpt<br />
| bgcolor="orange" align="center" | [[File:Nuvola Red.png|32px]]<br />work&nbsp;in&nbsp;progress<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nicnatsemi<br />
| bgcolor="orange" align="center" | [[File:Nuvola Red.png|32px]]<br />work&nbsp;in&nbsp;progress<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| dediprog<br />
| bgcolor="yellow" align="center" | [[File:Nuvola Orange.png|32px]]<br />partially&nbsp;working<br />
| style="vertical-align: top" | TODO<br />
<br />
|}</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Teensy_3.1_SPI_%2B_LPC/FWH_Flasher&diff=2122Teensy 3.1 SPI + LPC/FWH Flasher2015-07-26T09:48:54Z<p>Urjaman: Fix typos, include flashrom commandline example</p>
<hr />
<div><br />
= Hardware =<br />
[[File:Teensy31_lpcspi_flasher.jpg|thumb|right|Teensy 3.1 SPI + LPC/FWH Flasher as built]]<br />
The hardware is made of a [https://www.pjrc.com/teensy/teensy31.html Teensy 3.1] and a shield-like PCB over it. Schematic and board files for the PCB<br />
can be found in the [https://github.com/urjaman/frser-teensyflash/tree/master/hardware github].<br />
The PCB is also [https://oshpark.com/shared_projects/izukIxq8 shared at OshPark] - and as of writing OshPark also sells the Teensy 3.1.<br />
<br />
Other components required:<br />
* pin headers (total 28, but get more)<br />
* a DIL8 socket (if you want to use SPI DIL8)<br />
* a PLCC32 SMD socket (if you want to use LPC/FWH)<br />
* optional: small SMD capacitor - pad exists under the shield PCB<br />
<br />
=== Assembly ===<br />
* start by installing the SMD cap (if available) and the DIL8 socket on the shield PCB<br />
* split appropriate strips of pin headers for the teensy and solder them on the teensy, you can use the shield pcb to align them<br />
** my arrangement was as pictured in order to have more ground clearance under the teensy for the prog button<br />
* push the shield pcb only a little bit on the pin headers, just so the headers dont come over the top of the PCB<br />
* solder two corner pins to keep the shield PCB in place, these can be done from above<br />
* solder the rest of headers from the underside while watching that you dont flood the topside with too much solder, especially for the ones close to the PLCC socket<br />
* in order to solder the SMD PLCC32 socket, you'll need to break out the middle plastic bit, but keep it safe<br />
** to protect from solder bridges forming between the pin headers and PLCC socket, i placed a very thin tape over the pin header holes on the pcb during the soldering<br />
** notice that the PLCC footprint isnt centered on the PCB, meaning dont try to align the PLCC socket exactly on the PCB<br />
* after soldering the PLCC socket, i installed the plastic bit back with a little bit of glue<br />
<br />
<br />
= Software =<br />
Firmware for the Teensy is available at https://github.com/urjaman/frser-teensyflash<br />
<br />
Also see the README in that directory, both it or this document might be outdated ;)<br />
<br />
As of writing the setup would be:<br />
* download arduino, extract it somewhere where you have write access<br />
* download [https://www.pjrc.com/teensy/td_download.html the Teensyduino thingy]<br />
* run it on that arduino tree<br />
* install the udev rules provided in the above url<br />
* compile and install the [https://www.pjrc.com/teensy/loader_cli.html teensy_loader_cli] in your path<br />
git clone --recursive https://github.com/urjaman/frser-teensyflash.git<br />
cd frser-teensyflash<br />
nano Makefile # Edit the TEENSYDIR path to include your arduino directory<br />
make<br />
make program-cli # If this waits you need to press the PROG button on the teensy<br />
<br />
After this you should be able to use it with flashrom serprog, for speedups and enhancements to serprog before they're upstreamed I'd suggest to use this flashrom tree: <br />
https://github.com/urjaman/flashrom/tree/serprog-improvements<br />
<br />
Device should be something like /dev/ttyACM0 and the baudrate doesnt matter:<br />
flashrom -p serprog:dev=/dev/ttyACM0:2000000<br />
<br />
=== ISP Usage ===<br />
The same software could be used on a bare teensy 3.1 for ISP SPI programming - this is untested and also the 3.3V supply in the teensy is not strong, so beware, but the SPI pins used would be:<br />
* CS: "Pin 2", PD0<br />
* SCK: "Pin 14", PD1<br />
* MOSI: "Pin 7", PD2<br />
* MISO: "Pin 8", PD3<br />
<br />
See https://forum.pjrc.com/threads/25643-Combined-Pin-Assignments-card for a good Teensy pinmap picture.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Supported_programmers&diff=2121Supported programmers2015-07-26T09:33:13Z<p>Urjaman: Include the Teensy 3.1 flasher (i linked directly instead of to serprog because i made the serprog page section about this also have just a link)</p>
<hr />
<div>Flashrom supports many different programmers, including PC mainboards, various PCI cards with soldered-on flash chips, and various USB/serial-port/parallel-port based programmers.<br />
<br />
{| border="0" style="vertical-align: top; font-size: smaller" <br />
|- bgcolor="#6699ff"<br />
! colspan="2" | Programmer<br />
!Status<br />
!Comments<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Via pc2500e.jpg|100px|left]]<br />
| internal<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports a [[Supported_hardware#Supported_mainboards|large number of mainboards]], other mainboards may be supported out-of-the-box too, or might require a little additional code in flashrom.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Computer.png|100px|left]]<br />
| dummy<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | The "dummy" programmer is a software-only implementation of a simple programmer which is mostly useful for flashrom development and testing.<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:3com prog.jpg|100px|left]]<br />
| nic3com<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports some [[NIC3Com|3Com network cards]] to reflash the (parallel) flash attached to these cards, but it is also possible to use these cards to reflash other chips which fit in there electrically. Please note that the small number of address lines connected to the chip may make accessing large chips impossible. The maximum supported chip size if '''128KB'''.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nic3realtek<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Gfxnvidia original card.jpg|100px|left]]<br />
| gfxnvidia<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports some [[Gfxnvidia|Nvidia graphic cards]] to reflash the (parallel) flash attached to these cards, but it is also possible to use these cards to reflash other chips which fit in there electrically.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Dr kaiser.jpg|100px|left]]<br />
| drkaiser<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Satasii original.jpg|100px|left]]<br />
| satasii<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports some SiI ATA/SATA controllers to reflash the flash attached to these controller cards, but it is also possible to use these cards to reflash other chips which fit in there electrically. Please note that the small number of address lines connected to the chip may make accessing large chips impossible.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:FT2232.jpg|100px|left]]<br />
| ft2232_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports the usage of various [[FT2232SPI Programmer|FTDI FT2232/FT4232H/FT232H-based devices]] as SPI flashers:<br />
<br />
|- bgcolor="#dddddd"<br />
| <br />
| ft2232_spi<br />[[File:Dlp usb1232h spi programmer breadboard 1.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#DLP_Design_DLP-USB1232H|DLP Design DLP-USB1232H]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#FTDI_FT2232H_Mini-Module|FTDI FT2232H Mini-Module]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#FTDI_FT4232H_Mini-Module|FTDI FT4232H Mini-Module]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Openbiosprog-spi-assembled-device-0.1-powerled-chip.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#openbiosprog-spi|openbiosprog-spi]] is an Open Hardware USB-based programmer for SPI chips, designed by [[User:Uwe|Uwe Hermann]]. It uses an FTDI FT2232H chip and features either a DIP-8 socket or a pinheader where jumper-wires can be attached.<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:RushSPI-board.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#RushSPI|RushSPI]] is an Open Hardware USB-based programmer for SPI chips, designed by [[User:CodeRush|Nikolaj Schlej]]. It uses an FTDI FT232H chip and features a DIP-8 socket and a pinheader where jumper-wires can be attached.<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Jtagkey-tiny.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#Amontec_JTAGkey.2FJTAGkey2.2FJTAGkey-Tiny|Amontec JTAGkey, JTAGkey-tiny, and JTAGkey2]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:ARM-USB-TINY pinout.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#Olimex_ARM-USB-TINY_and_related_devices|ARM-USB-TINY, ARM-USB-TINY-H, ARM-USB-OCD, ARM-USB-OCD-H]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer|GOEPEL PicoTAP]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer|TIAO Tumpa (USB Multi-Protocol Adapter)]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer|Dangerous Prototypes Bus Blaster]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Openmoko_0001.jpeg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#Openmoko|OpenMoko Neo1973 Debug board (V2+)]]<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| serprog<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports various [[serprog|serprog-derived hardware projects]] which all use the [http://flashrom.org/trac/flashrom/browser/trunk/serprog-protocol.txt serprog protocol]:<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Avr rs232 programmer.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#AVR_flasher_by_Urja_Rannikko|AVR flasher by Urja Rannikko]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#AVR_flasher_by_eightdot|AVR flasher by eightdot]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#Arduino_Mega_flasher_by_fritz|Arduino Mega flasher by fritz]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:InSystemFlasher-prototype1.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#InSystemFlasher_by_Juhana_Helovuo|InSystemFlasher by Juhana_Helovuo]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:AtmegaXXu2-flasher.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#atmegaXXu2-flasher_by_Stefan_Tauner|atmegaXXu2-flasher by Stefan Tauner]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Serprog-duino-top.JPG|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#Arduino_flasher_by_GNUtoo|Arduino Uno flasher by GNUtoo]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#Frser-duino|Frser-duino]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Teensy31_lpcspi_flasher.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Teensy 3.1 SPI + LPC/FWH Flasher|Teensy 3.1 SPI + LPC/FWH Flasher by Urja Rannikko]]<br />
<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| linux_spi<br /><br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" |<br />
<br />
|- bgcolor="#eeeeee"<br />
| <br />
| linux_spi<br /><br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [http://wiki.buglabs.net/index.php/SPI_Flash_Programmer linux_spi on the bug from buglabs by GNUtoo]<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Raspberry_Pi_Photo.jpg|100px|left]]<br />
| linux_spi<br /><br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[RaspberryPi|Using RaspberryPi's expansion port]]<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nic3realtek<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Buspirate v3 front.jpg|100px|left]]<br />
| buspirate_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | The Dangerous Prototypes [[Bus Pirate]] is a USB-attached opensource/openhardware device for debugging and prototyping various serial bus protocols. Flashrom supports flashing SPI chips which are connected to a Bus Pirate.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| rayer_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nicintel<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:IMG 1774.JPG|100px|left]]<br />
| nicintel_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| ogp_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| satamv<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| usbblaster_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Altera USB Blaster adapter, both brandname and clone products should work.<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Hpt370a orig.jpg|100px|left]]<br />
| atahpt<br />
| bgcolor="orange" align="center" | [[File:Nuvola Red.png|32px]]<br />work&nbsp;in&nbsp;progress<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nicnatsemi<br />
| bgcolor="orange" align="center" | [[File:Nuvola Red.png|32px]]<br />work&nbsp;in&nbsp;progress<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| dediprog<br />
| bgcolor="yellow" align="center" | [[File:Nuvola Orange.png|32px]]<br />partially&nbsp;working<br />
| style="vertical-align: top" | TODO<br />
<br />
|}</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Supported_programmers&diff=2120Supported programmers2015-07-26T09:28:51Z<p>Urjaman: Fix fser-duino typo</p>
<hr />
<div>Flashrom supports many different programmers, including PC mainboards, various PCI cards with soldered-on flash chips, and various USB/serial-port/parallel-port based programmers.<br />
<br />
{| border="0" style="vertical-align: top; font-size: smaller" <br />
|- bgcolor="#6699ff"<br />
! colspan="2" | Programmer<br />
!Status<br />
!Comments<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Via pc2500e.jpg|100px|left]]<br />
| internal<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports a [[Supported_hardware#Supported_mainboards|large number of mainboards]], other mainboards may be supported out-of-the-box too, or might require a little additional code in flashrom.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Computer.png|100px|left]]<br />
| dummy<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | The "dummy" programmer is a software-only implementation of a simple programmer which is mostly useful for flashrom development and testing.<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:3com prog.jpg|100px|left]]<br />
| nic3com<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports some [[NIC3Com|3Com network cards]] to reflash the (parallel) flash attached to these cards, but it is also possible to use these cards to reflash other chips which fit in there electrically. Please note that the small number of address lines connected to the chip may make accessing large chips impossible. The maximum supported chip size if '''128KB'''.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nic3realtek<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Gfxnvidia original card.jpg|100px|left]]<br />
| gfxnvidia<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports some [[Gfxnvidia|Nvidia graphic cards]] to reflash the (parallel) flash attached to these cards, but it is also possible to use these cards to reflash other chips which fit in there electrically.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Dr kaiser.jpg|100px|left]]<br />
| drkaiser<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Satasii original.jpg|100px|left]]<br />
| satasii<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports some SiI ATA/SATA controllers to reflash the flash attached to these controller cards, but it is also possible to use these cards to reflash other chips which fit in there electrically. Please note that the small number of address lines connected to the chip may make accessing large chips impossible.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:FT2232.jpg|100px|left]]<br />
| ft2232_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports the usage of various [[FT2232SPI Programmer|FTDI FT2232/FT4232H/FT232H-based devices]] as SPI flashers:<br />
<br />
|- bgcolor="#dddddd"<br />
| <br />
| ft2232_spi<br />[[File:Dlp usb1232h spi programmer breadboard 1.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#DLP_Design_DLP-USB1232H|DLP Design DLP-USB1232H]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#FTDI_FT2232H_Mini-Module|FTDI FT2232H Mini-Module]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#FTDI_FT4232H_Mini-Module|FTDI FT4232H Mini-Module]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Openbiosprog-spi-assembled-device-0.1-powerled-chip.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#openbiosprog-spi|openbiosprog-spi]] is an Open Hardware USB-based programmer for SPI chips, designed by [[User:Uwe|Uwe Hermann]]. It uses an FTDI FT2232H chip and features either a DIP-8 socket or a pinheader where jumper-wires can be attached.<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:RushSPI-board.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#RushSPI|RushSPI]] is an Open Hardware USB-based programmer for SPI chips, designed by [[User:CodeRush|Nikolaj Schlej]]. It uses an FTDI FT232H chip and features a DIP-8 socket and a pinheader where jumper-wires can be attached.<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Jtagkey-tiny.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#Amontec_JTAGkey.2FJTAGkey2.2FJTAGkey-Tiny|Amontec JTAGkey, JTAGkey-tiny, and JTAGkey2]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:ARM-USB-TINY pinout.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#Olimex_ARM-USB-TINY_and_related_devices|ARM-USB-TINY, ARM-USB-TINY-H, ARM-USB-OCD, ARM-USB-OCD-H]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer|GOEPEL PicoTAP]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer|TIAO Tumpa (USB Multi-Protocol Adapter)]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer|Dangerous Prototypes Bus Blaster]]<br />
<br />
|- bgcolor="#dddddd"<br />
|<br />
| ft2232_spi<br />[[File:Openmoko_0001.jpeg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[FT2232SPI_Programmer#Openmoko|OpenMoko Neo1973 Debug board (V2+)]]<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| serprog<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Flashrom supports various [[serprog|serprog-derived hardware projects]] which all use the [http://flashrom.org/trac/flashrom/browser/trunk/serprog-protocol.txt serprog protocol]:<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Avr rs232 programmer.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#AVR_flasher_by_Urja_Rannikko|AVR flasher by Urja Rannikko]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#AVR_flasher_by_eightdot|AVR flasher by eightdot]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#Arduino_Mega_flasher_by_fritz|Arduino Mega flasher by fritz]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:InSystemFlasher-prototype1.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#InSystemFlasher_by_Juhana_Helovuo|InSystemFlasher by Juhana_Helovuo]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:AtmegaXXu2-flasher.jpg|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#atmegaXXu2-flasher_by_Stefan_Tauner|atmegaXXu2-flasher by Stefan Tauner]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Serprog-duino-top.JPG|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#Arduino_flasher_by_GNUtoo|Arduino Uno flasher by GNUtoo]]<br />
<br />
|- bgcolor="#eeeeee"<br />
|<br />
| serprog<br />[[File:Help-browser.png|70px|right]]<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[Serprog#Frser-duino|Frser-duino]]<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| linux_spi<br /><br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" |<br />
<br />
|- bgcolor="#eeeeee"<br />
| <br />
| linux_spi<br /><br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [http://wiki.buglabs.net/index.php/SPI_Flash_Programmer linux_spi on the bug from buglabs by GNUtoo]<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Raspberry_Pi_Photo.jpg|100px|left]]<br />
| linux_spi<br /><br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | [[RaspberryPi|Using RaspberryPi's expansion port]]<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nic3realtek<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Buspirate v3 front.jpg|100px|left]]<br />
| buspirate_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | The Dangerous Prototypes [[Bus Pirate]] is a USB-attached opensource/openhardware device for debugging and prototyping various serial bus protocols. Flashrom supports flashing SPI chips which are connected to a Bus Pirate.<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| rayer_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nicintel<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:IMG 1774.JPG|100px|left]]<br />
| nicintel_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| ogp_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| satamv<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| usbblaster_spi<br />
| bgcolor="lime" align="center" | [[File:Nuvola OK.png|32px]]<br />supported<br />
| style="vertical-align: top" | Altera USB Blaster adapter, both brandname and clone products should work.<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Hpt370a orig.jpg|100px|left]]<br />
| atahpt<br />
| bgcolor="orange" align="center" | [[File:Nuvola Red.png|32px]]<br />work&nbsp;in&nbsp;progress<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#dddddd"<br />
| [[File:Help-browser.png|100px|left]]<br />
| nicnatsemi<br />
| bgcolor="orange" align="center" | [[File:Nuvola Red.png|32px]]<br />work&nbsp;in&nbsp;progress<br />
| style="vertical-align: top" | TODO<br />
<br />
|- bgcolor="#eeeeee"<br />
| [[File:Help-browser.png|100px|left]]<br />
| dediprog<br />
| bgcolor="yellow" align="center" | [[File:Nuvola Orange.png|32px]]<br />partially&nbsp;working<br />
| style="vertical-align: top" | TODO<br />
<br />
|}</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog&diff=2119Serprog2015-07-26T09:22:52Z<p>Urjaman: Include the Teensy 3.1 flasher in the list</p>
<hr />
<div>{{DISPLAYTITLE:serprog}}<br />
This page collects information about the serprog protocol and the programmers implementing it.<br />
<br />
= Protocol =<br />
<br />
See [http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/Documentation/serprog-protocol.txt serprog-protocol.txt] in the source tree. It is designed to be compact and allow efficient storage in limited memory of programmer devices.<br />
<br />
= Hardware =<br />
<br />
== AVR flasher by Urja Rannikko ==<br />
<br />
[[File:Avr rs232 programmer.jpg|thumb|right|Prototype RS232 AVR parallel flash programmer]]<br />
<br />
The [http://www.randomprojects.org/wiki/Prototype_RS232_AVR_parallel_flash_programmer Prototype RS232 AVR parallel flash programmer] of Urja Rannikko was the first implementation of the serprog protocol.<br />
<br />
The source code can be found [http://github.com/urjaman/frser-atmega88 here].<br />
<br />
== AVR flasher by eightdot ==<br />
<br />
FIXME: Link?<br />
<br />
== Arduino Mega flasher by fritz ==<br />
<br />
[http://www.flashrom.org/pipermail/flashrom/2010-May/003016.html]<br />
[http://www.coldelectrons.com/blog/?p=115]<br />
[http://www.coldelectrons.com/blog/wp-content/uploads/2010/05/flashprg.txt]<br />
FIXME: More info?<br />
<br />
== InSystemFlasher by Juhana Helovuo ==<br />
This was the first one that talks to SPI devices via serial over USB. Details can be found in the [http://www.coreboot.org/InSystemFlasher coreboot wiki] and in this [http://www.coreboot.org/pipermail/coreboot/2011-February/063349.html coreboot mailing list thread].<br />
<br />
== atmegaXXu2-flasher by Stefan Tauner ==<br />
Like the InSystemFlasher this one uses LUFA on an AVR microcontroller to tunnel the serial data over USB.<br />
[[File:atmegaXXu2-flasher.jpg|thumb|right|atmegaXXu2-flasher with Pomona SOIC hook attached]]<br />
<br />
== Arduino flasher by GNUtoo ==<br />
<br />
For detailed instructions on how to use different Arduino models to access SPI flash chips see [[Serprog/Arduino flasher]].<br />
[[File:Serprog_0001.jpeg|thumb|right|Arduino Uno connected using a breadboard]]<br />
<br />
== Frser-duino ==<br />
The source can be found [https://github.com/urjaman/frser-duino/ here]<br />
<br />
== Teensy 3.1 SPI + LPC/FWH Flasher ==<br />
[[Teensy 3.1 SPI + LPC/FWH Flasher|A Teensy 3.1 based small flasher by Urja Rannikko.]]<br />
<br />
<br />
== serprog-stm32vcp by Chi Zhang ==<br />
<br />
The most powerful serprog-based programmer is built upon an ARM Cortex-M3 (STM32F103) featuring up to 36 MHz SPI clock.<br />
See [http://github.com/dword1511/serprog-stm32vcp#serprog-stm32vcp his github page] for further details, source code etc.<br />
[[File:Serprog-stm32vcp.jpg|thumb|right|serprog-stm32vcp]]</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Teensy_3.1_SPI_%2B_LPC/FWH_Flasher&diff=2118Teensy 3.1 SPI + LPC/FWH Flasher2015-07-26T08:38:52Z<p>Urjaman: Create page for the Teensy 3.1 flasher i made</p>
<hr />
<div><br />
= Hardware =<br />
[[File:Teensy31_lpcspi_flasher.jpg|thumb|right|Teensy 3.1 SPI + LPC/FWH Flasher as built]]<br />
The hardware is made of a [https://www.pjrc.com/teensy/teensy31.html Teensy 3.1] and a shield-like PCB over it. Schematic and board files for the PCB<br />
can be found in the [https://github.com/urjaman/frser-teensyflash/tree/master/hardware github].<br />
The PCB is also [https://oshpark.com/shared_projects/izukIxq8 shared at OshPark] - and as of writing OshPark also sells the Teensy 3.1.<br />
<br />
Other components required:<br />
* pin headers (total 28, but get more)<br />
* a DIL8 socket (if you want to use SPI DIL8)<br />
* a PLCC32 SMD socket (if you want to use LPC/FWH)<br />
* optional: small SMD capacitor - pad exists under the shield PCB<br />
<br />
=== Assembly ===<br />
* start by installing the SMD cap (if available) and the DIL8 socket on the shield PCB<br />
* split appropriate strips of pin headers for the teensy and solder them on the teensy, you can use the shield pcb to align them<br />
** my arrangement was as pictured in order to have more ground clearance under the teensy for the prog button<br />
* push the shield pcb only a little bit on the pin headers, just so the headers dont come over the top of the PCB<br />
* solder two corner pins to keep the shield PCB in place, these can be done from above<br />
* solder the rest of headers from the underside while watching that you dont flood the topside with too much solder, especially for the ones close to the PLCC socket<br />
* in order to solder the SMD PLCC32 socket, you'll need to break out the middle plastic bit, but keep it safe<br />
** to protect from solder bridges forming between the pin headers and PLCC socket, i placed a very thin tape over the pin header holes on the pcb during the soldering<br />
** notice that the PLCC footprint isnt centered on the PCB, meaning dont try to align the PLCC socket exactly on the PCB<br />
* after soldering the PLCC socket, i installed the plastic bit back with a little bit of glue<br />
<br />
<br />
= Software =<br />
Firmware for the Teensy is available at https://github.com/urjaman/frser-teensyflash<br />
<br />
Also see the README in that directory, both it or this document might be outdated ;)<br />
But currently the setup would be:<br />
* download arduino, extract it somewhere where you have write access<br />
* download [https://www.pjrc.com/teensy/td_download.html the Teensyduino thingy]<br />
* run it on that arduino tree<br />
* install the udev rules provided in the above url<br />
* compile and install the [https://www.pjrc.com/teensy/loader_cli.html teensy_loader_cli] in your path<br />
git clone --recursive https://github.com/urjaman/frser-teensyflash.git<br />
cd frser-teensyflash<br />
nano Makefile # Edit the TEENSYDIR path to include your arduino directory<br />
make<br />
make program-cli # If this waits you need to press the PROG button on the teensy<br />
<br />
After this you should be able to use it with flashrom serprog, for speedups and enhancemnts to serprog before they're upstreamed I'd suggest to use this flashrom tree: <br />
https://github.com/urjaman/flashrom/tree/serprog-improvements<br />
<br />
Device should be something like /dev/ttyACM0 and the baudrate doesnt matter.<br />
<br />
=== ISP Usage ===<br />
The same software could be used on a bare teensy 3.1 for ISP SPI programming - this is untested and also the 3.3V supply in the teensy is not strong, so beware, but the SPI pins used would be:<br />
* CS: "Pin 2", PD0<br />
* SCK: "Pin 14", PD1<br />
* MOSI: "Pin 7", PD2<br />
* MISO: "Pin 8", PD3<br />
<br />
See https://forum.pjrc.com/threads/25643-Combined-Pin-Assignments-card for a good Teensy pinmap picture.</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:Teensy31_lpcspi_flasher.jpg&diff=2117File:Teensy31 lpcspi flasher.jpg2015-07-26T07:13:38Z<p>Urjaman: Image of the built Teensy 3.1 SPI + LPC/FWH flasher (by Urja Rannikko).</p>
<hr />
<div>Image of the built Teensy 3.1 SPI + LPC/FWH flasher (by Urja Rannikko).</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2092Serprog/Arduino flasher2015-03-25T00:48:02Z<p>Urjaman: /* Setup */ Switch to point to frser-duino</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING,if you don't add the resistors, the SPI levels are at 5V, while I tried it with 3.3V chip and that it worked(but DIO was at 4.3v which was over the maximum of 4v, during all the time that the chip was connected to the programmer), it may not work for you and break the chip...'''</div><br />
== Building the flasher ==<br />
This flasher require the following hardware parts:<br />
* An arduino uno or an arduino Duemilanove(way faster) and its usb cable<br />
* some wires(optionally some connectors to solder on(for easier plugin and more reliability)<br />
* <s>a 10k resistor</s><br />
* 3 x 10k resistors (for the 3.3v version)<br />
* 3 x 15k resistors (for the 3.3v version)<br />
* A flash chip with the following characteristics:<br />
** supported by flashrom<br />
** SPI<br />
** 3.3v or 5v(the arduino has a 3.3v and a 5v output, only 3.3v was tested...)<br />
=== 5V version ===<br />
==== Pictures ====<br />
<gallery caption="Pictures " widths="250px" heights="250px" perrow="4"><br />
File:Serprog_0001.jpeg<br />
File:Serprog_0002.jpeg<br />
File:Serprog_0003.jpeg<br />
File:Serprog_0004.jpeg<br />
File:Serprog_0005.jpeg<br />
File:Serprog_0006.jpeg<br />
File:Serduino_laptop.jpeg| Because of the long cables flashrom had to retry once before reflashing the BIOS but at the end it worked. So don't use cables that are that long... <br />
File:W1qtO.jpg| Setup by Sebastian Parborg (DarkDefender)<br />
File:Arduino_topview_noresistor.jpeg| It now seem to also work without resistor...<br />
File:Serduino fritzing.jpg| [[File:Serduino.fzz.zip]]<br />
</gallery><br />
<br />
==== Building ====<br />
<br />
Left pins of the BIOS chip:<br />
--------------------------------------------------------<br />
[pin1 of the bios chip] /CS<->10k resistor<->VCC <br />
<br />
[pin1 of the bios chip] /CS<->Arduino pin10(SS, PORTB2)<br />
[pin2 of the bios chip] DO<->Arduino pin12(MISO, PORTB4)<br />
[pin3 of the bios chip] /WP<->VCC<br />
[pin4 of the bios chip] GND<->GND on the power pins<br />
<br />
Right pins of the BIOS chip:<br />
--------------------------------------------------------<br />
[pin8 of the bios chip] VCC<->+3.3V on the power pins of the Arduino<br />
[pin7 of the bios chip] /HOLD<->VCC<br />
[pin6 of the bios chip] CLK<->Arduino pin13(SCK, PORTB5)<br />
[pin5 of the bios chip] DIO<->Arduino pin11(MOSI, PORTB3)<br />
<br />
The Bios chip used is a W25X80. <br />
The Arduino is an arduino uno.<br />
<br />
=== 3.3v version ===<br />
==== Pictures ====<br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING''', I was told that by Simon Inns by mail: "The 3V3 fritzing example on the Wiki (the diagram of the breadboard) is quite wrong... The 3V3 output from the Uno is shorted to GND and the CLK and DI pins of the EEPROM are connected together after the 10K resistors. Might be a good idea to fix it before you get "You broke my Uno" emails ;)"</div><br />
<br />
<gallery caption="Pictures " widths="250px" heights="250px" perrow="4"><br />
File:Serduino-v2_bb.jpg<br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
==== Improved version by Simon Inns ====<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:Uno BIOS Flasher 2.png | [[File:Uno_BIOS_Flasher2_EagleCad.zip|Schematics]]<br />
</gallery><br />
<br />
=== Shield with SPI and LPC/FWH for 5V Arduinos ===<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/serprog-improvements this branch] instead.<br />
<br />
== Compatibility, software and setup ==<br />
=== Compatibility ===<br />
There are some differences between the various arduinos that are relevant for this flasher:<br />
==== Architecture ====<br />
* Only the AVR architecture is supported for now, because the code depends on avr-libc. In one hand that makes it portable across other non-arduino AVR boards, but it also makes it incompatible with the arduinos that don't have an AVR.<br />
<br />
==== USB<->serial converter ====<br />
* Some Arduinos have an FTDI USB<->Serial converter, we can achieve a very high speed of 2000000 bauds with ir.<br />
* Some Arduino have a 8u2/16u2 instead: This is an extra microcontroller which does the USB<->serial conversion trough a firmware build on LUFA. While that brings lower cost and more flexibility, the downside is that in our case the default firmware was not written for speed over 115200. To get more speed we would need to write another firmware for it.<br />
* Some Arduinos don't have an USB<->serial converter, like the arduino leonardo. Instead they have a native USB port.<br />
* Most/All Arduinos have an accessible serial port on their pins. if you have an extra USB<->Serial converter, you can plug it to theses pins. BE SURE TO CHECK THE VOLTAGE COMPATIBILITY BEFORE ATTEMPTING THAT.<br />
==== Voltage ====<br />
* Some arduinos are at 3.3v.<br />
* Some are at 5v. Unfortunately most SPI chips are at 3.3v at the time of writing.<br />
<br />
==== Boards ====<br />
{| class="wikitable" border="1"<br />
! Arduinos<br />
! Hardware<br />
! User notes<br />
|-<br />
|<br />
* Arduino uno<br />
|<br />
* Has a 8u2 or 16u2 for the USB<->Serial converter<br />
* Uses 5V logic levels.<br />
|<br />
|-<br />
|<br />
* Arduino nano<br />
|<br />
* Uses 3.3v logic<br />
* Has an FTDI<br />
| <br />
* using the three wires serial '''and''' lowering the speed all problems disappear; the code has to be changed to reflects the new speed (115200); to program the board use "avrdude -c arduino -vv -P /dev/ttyUSB* -p atmega328p -b 57600 -U flash:w:serprog.hex"<br />
|-<br />
|<br />
* Arduino Duemilanove<br />
|<br />
* Has an FTDI<br />
* Uses 5V logic.<br />
|<br />
|-<br />
|<br />
* Arduino leonardo<br />
|<br />
* Lacks an USB<->Serial converter<br />
* Arduino Leonardo<br />
|<br />
* Untested<br />
|-<br />
|}<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://github.com/urjaman/frser-duino frser-duino which runs on the arduino]<br />
** This page used to link to [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino], frser-duino should build in a similar fashion and has better serial buffering and some other features (spi speed setting).<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone --recursive git://github.com/urjaman/frser-duino<br />
$ cd frser-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the README.md, or here:<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)<br />
<br />
==== Advantages and disadvantages ====<br />
* <s>The speed isn't that great(about 3 minutes for reading+writing+verifying a 1M chip)</s> Fixed by by Sebastian Parborg.<br />
* <s>Voltage issues( SPI levels are at 5v, it's problematic for flashing 3.3v chips...)</s><br />
* it is made of very commonly available parts(if you can find an arduino uno, you will be able to build it).<br />
<br />
=== TODO ===<br />
* <s>Find a way to lower the voltage to 3.3v</s><br />
* <s>Fix the arduino UNO speed and reliability issues</s> Simply lowering the bauds as advised on the LUFA mailing list long time did fixed it.<br />
* Write a faster 8u2 firmware<br />
* Look at other AVR targets<br />
* Look if it's portable to other architectures (like ARM).</div>Urjamanhttps://wiki.flashrom.org/index.php?title=Serprog/Arduino_flasher&diff=2091Serprog/Arduino flasher2015-03-24T23:17:22Z<p>Urjaman: Add information about the SPI/LPC/FWH shield.</p>
<hr />
<div><br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING,if you don't add the resistors, the SPI levels are at 5V, while I tried it with 3.3V chip and that it worked(but DIO was at 4.3v which was over the maximum of 4v, during all the time that the chip was connected to the programmer), it may not work for you and break the chip...'''</div><br />
== Building the flasher ==<br />
This flasher require the following hardware parts:<br />
* An arduino uno or an arduino Duemilanove(way faster) and its usb cable<br />
* some wires(optionally some connectors to solder on(for easier plugin and more reliability)<br />
* <s>a 10k resistor</s><br />
* 3 x 10k resistors (for the 3.3v version)<br />
* 3 x 15k resistors (for the 3.3v version)<br />
* A flash chip with the following characteristics:<br />
** supported by flashrom<br />
** SPI<br />
** 3.3v or 5v(the arduino has a 3.3v and a 5v output, only 3.3v was tested...)<br />
=== 5V version ===<br />
==== Pictures ====<br />
<gallery caption="Pictures " widths="250px" heights="250px" perrow="4"><br />
File:Serprog_0001.jpeg<br />
File:Serprog_0002.jpeg<br />
File:Serprog_0003.jpeg<br />
File:Serprog_0004.jpeg<br />
File:Serprog_0005.jpeg<br />
File:Serprog_0006.jpeg<br />
File:Serduino_laptop.jpeg| Because of the long cables flashrom had to retry once before reflashing the BIOS but at the end it worked. So don't use cables that are that long... <br />
File:W1qtO.jpg| Setup by Sebastian Parborg (DarkDefender)<br />
File:Arduino_topview_noresistor.jpeg| It now seem to also work without resistor...<br />
File:Serduino fritzing.jpg| [[File:Serduino.fzz.zip]]<br />
</gallery><br />
<br />
==== Building ====<br />
<br />
Left pins of the BIOS chip:<br />
--------------------------------------------------------<br />
[pin1 of the bios chip] /CS<->10k resistor<->VCC <br />
<br />
[pin1 of the bios chip] /CS<->Arduino pin10(SS, PORTB2)<br />
[pin2 of the bios chip] DO<->Arduino pin12(MISO, PORTB4)<br />
[pin3 of the bios chip] /WP<->VCC<br />
[pin4 of the bios chip] GND<->GND on the power pins<br />
<br />
Right pins of the BIOS chip:<br />
--------------------------------------------------------<br />
[pin8 of the bios chip] VCC<->+3.3V on the power pins of the Arduino<br />
[pin7 of the bios chip] /HOLD<->VCC<br />
[pin6 of the bios chip] CLK<->Arduino pin13(SCK, PORTB5)<br />
[pin5 of the bios chip] DIO<->Arduino pin11(MOSI, PORTB3)<br />
<br />
The Bios chip used is a W25X80. <br />
The Arduino is an arduino uno.<br />
<br />
=== 3.3v version ===<br />
==== Pictures ====<br />
<div class="boilerplate" style="background-color: red; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">'''WARNING''', I was told that by Simon Inns by mail: "The 3V3 fritzing example on the Wiki (the diagram of the breadboard) is quite wrong... The 3V3 output from the Uno is shorted to GND and the CLK and DI pins of the EEPROM are connected together after the 10K resistors. Might be a good idea to fix it before you get "You broke my Uno" emails ;)"</div><br />
<br />
<gallery caption="Pictures " widths="250px" heights="250px" perrow="4"><br />
File:Serduino-v2_bb.jpg<br />
File:Serprogduino_v2.jpeg<br />
</gallery><br />
<br />
==== Improved version by Simon Inns ====<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:Uno BIOS Flasher 2.png | [[File:Uno_BIOS_Flasher2_EagleCad.zip|Schematics]]<br />
</gallery><br />
<br />
=== Shield with SPI and LPC/FWH for 5V Arduinos ===<br />
<gallery widths="250px" heights="250px" perrow="4"><br />
File:arduino_5V_lpc_spi_shield.jpg <br />
File:Arduino_lpcspi_shield_render.png<br />
</gallery><br />
[https://github.com/urjaman/frser-m328lpcspi Firmware and hardware sources]<br />
[https://oshpark.com/shared_projects/E6jwmbWy Shield PCB shared at oshpark]<br />
<br />
* This shield and firmware was built for 5V arduinos with FTDI, variations to that will need adaptations in building the shield and/or in the firmware.<br />
* This shield uses a different pin for SPI CS than the other circuits on this page, and has LPC/FWH capability, thus different firmware.<br />
* Note: do check for any incompatibilities between your arduino and the shield, eg. the PD7 used as LPC CLK clashes with BT reset in BT arduinos.<br />
* For LPC/FWH, current (15/03/25) flashrom trunk will not work, until that is fixed use [https://github.com/urjaman/flashrom/tree/serprog-improvements this branch] instead.<br />
<br />
== Compatibility, software and setup ==<br />
=== Compatibility ===<br />
There are some differences between the various arduinos that are relevant for this flasher:<br />
==== Architecture ====<br />
* Only the AVR architecture is supported for now, because the code depends on avr-libc. In one hand that makes it portable across other non-arduino AVR boards, but it also makes it incompatible with the arduinos that don't have an AVR.<br />
<br />
==== USB<->serial converter ====<br />
* Some Arduinos have an FTDI USB<->Serial converter, we can achieve a very high speed of 2000000 bauds with ir.<br />
* Some Arduino have a 8u2/16u2 instead: This is an extra microcontroller which does the USB<->serial conversion trough a firmware build on LUFA. While that brings lower cost and more flexibility, the downside is that in our case the default firmware was not written for speed over 115200. To get more speed we would need to write another firmware for it.<br />
* Some Arduinos don't have an USB<->serial converter, like the arduino leonardo. Instead they have a native USB port.<br />
* Most/All Arduinos have an accessible serial port on their pins. if you have an extra USB<->Serial converter, you can plug it to theses pins. BE SURE TO CHECK THE VOLTAGE COMPATIBILITY BEFORE ATTEMPTING THAT.<br />
==== Voltage ====<br />
* Some arduinos are at 3.3v.<br />
* Some are at 5v. Unfortunately most SPI chips are at 3.3v at the time of writing.<br />
<br />
==== Boards ====<br />
{| class="wikitable" border="1"<br />
! Arduinos<br />
! Hardware<br />
! User notes<br />
|-<br />
|<br />
* Arduino uno<br />
|<br />
* Has a 8u2 or 16u2 for the USB<->Serial converter<br />
* Uses 5V logic levels.<br />
|<br />
|-<br />
|<br />
* Arduino nano<br />
|<br />
* Uses 3.3v logic<br />
* Has an FTDI<br />
| <br />
* using the three wires serial '''and''' lowering the speed all problems disappear; the code has to be changed to reflects the new speed (115200); to program the board use "avrdude -c arduino -vv -P /dev/ttyUSB* -p atmega328p -b 57600 -U flash:w:serprog.hex"<br />
|-<br />
|<br />
* Arduino Duemilanove<br />
|<br />
* Has an FTDI<br />
* Uses 5V logic.<br />
|<br />
|-<br />
|<br />
* Arduino leonardo<br />
|<br />
* Lacks an USB<->Serial converter<br />
* Arduino Leonardo<br />
|<br />
* Untested<br />
|-<br />
|}<br />
<br />
=== Setup ===<br />
==== Required software ====<br />
To make it work you need:<br />
* A recent flashrom with the serprog protocol compiled in (most packaged versions do)<br />
* [https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino serprog-duino which runs on the arduino]<br />
* The avr toolchain(avr-gcc, avr-libc,make etc...)<br />
<br />
==== Building the software ====<br />
First get the firmware source:<br />
$ git clone git://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino.git<br />
$ cd serprog-duino<br />
<br />
Then build it:<br />
<br />
For a board with a 8u2 or a 16u2:<br />
$ make u2 && make flash-u2<br />
<br />
For a board with an ftdi:<br />
$ make ftdi && make flash-ftdi<br />
<br />
==== Running flashrom ====<br />
The right flashrom arguments are explained in the help when running make.<br />
$ make<br />
Available targets:<br />
ftdi, flash-ftdi:<br />
For the Arduinos with an FTDI<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
Other boards using an hardware USB<->Serial converter might work too.<br />
u2, flash-u2:<br />
For the Arduino with a 8u2 or a 16u2<br />
compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200<br />
<br />
So for a board that has an ftdi that would give:<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000<br />
<br />
==== Speed ====<br />
The speed is very dependant on the flash chip used:<br />
* Its capacity impacts the speed a lot, as you would expect.<br />
* The chip model as also a huge impact.<br />
<br />
===== Duemillanove =====<br />
With the duemillanove:<br />
# time flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r duemillanove.rom<br />
we have:<br />
4.23s user 0.29s system 8% cpu 56.010 total<br />
<br />
===== Uno =====<br />
With the Arduino uno:<br />
# flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom <br />
flashrom v0.9.7-r1711 on Linux 3.18.3-gnu-1 (i686)<br />
flashrom is free software, get the source code at http://www.flashrom.org<br />
<br />
Calibrating delay loop... delay loop is unreliable, trying to continue OK.<br />
serprog: Programmer name is "serprog-duino"<br />
Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on serprog.<br />
Reading flash... done.<br />
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r uno.rom<br />
<br />
we have:<br />
4.77s user 0.65s system 1% cpu 6:02.43 total<br />
<br />
==== Tested chips ====<br />
* SST25VF016B => huge issues, not recognized by the 3.3v version, had to use the 5v version which is over maximum allowed voltage, also had to lower the serial speed to 115200, ultra slow to write(seem related to the chip itself, since that with the openmoko programmer it's even slower...)...<br />
* W25X80 works well in 3.3v mode(5v works also but it's highly not advised to use 5v)<br />
<br />
==== Advantages and disadvantages ====<br />
* <s>The speed isn't that great(about 3 minutes for reading+writing+verifying a 1M chip)</s> Fixed by by Sebastian Parborg.<br />
* <s>Voltage issues( SPI levels are at 5v, it's problematic for flashing 3.3v chips...)</s><br />
* it is made of very commonly available parts(if you can find an arduino uno, you will be able to build it).<br />
<br />
=== TODO ===<br />
* <s>Find a way to lower the voltage to 3.3v</s><br />
* <s>Fix the arduino UNO speed and reliability issues</s> Simply lowering the bauds as advised on the LUFA mailing list long time did fixed it.<br />
* Write a faster 8u2 firmware<br />
* Look at other AVR targets<br />
* Look if it's portable to other architectures (like ARM).</div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:Arduino_lpcspi_shield_render.png&diff=2090File:Arduino lpcspi shield render.png2015-03-24T22:43:36Z<p>Urjaman: </p>
<hr />
<div></div>Urjamanhttps://wiki.flashrom.org/index.php?title=File:Arduino_5V_lpc_spi_shield.jpg&diff=2089File:Arduino 5V lpc spi shield.jpg2015-03-24T22:36:20Z<p>Urjaman: </p>
<hr />
<div></div>Urjaman