Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 860

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 839

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 860

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 839

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 860

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 839

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w008c51e/wiki/includes/MagicWord.php on line 860
LPCTool - Bettyhacks.com - Hack BettyTV-Remote

LPCTool

From Bettyhacks.com - Hack BettyTV-Remote
Jump to: navigation, search
(Boop Flashen)
(Lpctool-Probleme)
 
Line 1: Line 1:
===Aktuelle Version===
+
lpctool überträgt [[boop|Firmware]] über einen [[Interfaces PC zu Betty|Adapter]] [http://de.wikipedia.org/wiki/RS-232 seriell] zur [[Betty]].
  
 +
Siehe auch: [[Betty-Heaven]]
 +
 +
==Aktuelle Version==
 
lpctool V0.9
 
lpctool V0.9
 
This Software is free Software under GNU GPL 3 or later
 
This Software is free Software under GNU GPL 3 or later
 
(c) 2007 Ch. Klippel <ck@mamalala.net>
 
(c) 2007 Ch. Klippel <ck@mamalala.net>
  
===LPCTool aus dem svn Laden und Instalieren===
+
Quellcode im SVN ansehen: http://boopfirmware.svn.sourceforge.net/viewvc/boopfirmware/lpctool/trunk/
 +
 
 +
==Forumsdiskussion==
 +
Die Ankündigung des Programms im Forum: http://bettyhacks.com/forum/index.php?topic=54.0
  
Das LPCTool kann man unter linux mit dem folgenden Befehl herunterladen.
+
==Funktion==
 +
Siehe [[#Flashvorgang]].
  
 +
# Bootloader aktivieren
 +
## Zusätzlich zu den Datenleitungen werden zwei Handshake-Signale benutzt
 
<pre>
 
<pre>
svn checkout svn://svn.mamalala.org/lpctool/trunk
+
PC    Betty
 +
-----------
 +
TX  - RX
 +
RX  - TX
 +
DTR - nReset
 +
RTS - eINT1
 
</pre>
 
</pre>
  
Als nächstes können wir dann das Programm compilieren.
+
# Flashtool ins RAM der Betty laden
 +
# LPCTool sendet neue Firmware an Flashtool
 +
# Flashtool schreibt neue Firmware in den Flash
 +
 
 +
==Unterstützte Hardware==
 +
 
 +
Findet man unter [[Interfaces PC zu Betty]].
 +
 
 +
==Windows==
 +
http://megabug.de/cmde/betty_pub/lpctool-cygwin.zip
 +
 
 +
Es gibt aber Einschränkungen, siehe [[LPCTool#Lpctool-Probleme]].
 +
 
 +
==Linux==
 +
=== Debian Paket ===
 +
Für Debian Basierte Distr. kann man folgendes Paket nehmen.
 +
<pre>
 +
http://www.grautier.com/grautier/index.php?/plugin/dlfile_108
 +
</pre>
 +
 
 +
=== selbst kompilieren ===
 +
Man benötigt die ARM-toolchain, siehe [[Entwicklungsumgebungen]]
 +
 
 +
Das LPCTool kann man unter Linux mit subversion herunterladen.
 +
 
 +
<pre>
 +
svn co http://boopfirmware.svn.sourceforge.net/svnroot/boopfirmware/lpctool/ lpctool
 +
</pre>
 +
 
 +
Alsdann kann das Programm compiliert werden:
  
 
<pre>
 
<pre>
Line 19: Line 62:
 
make
 
make
 
sudo make install
 
sudo make install
 +
</pre>
 +
Bei dem Paket für Debian Basierte Systeme
 +
<pre>
 +
dpkg -i LPCTool.deb
 
</pre>
 
</pre>
  
Sollte das nicht klappen muss noch das armtoolchan installiert werden, welches auch von Boop verwendet wird.
+
==Boop Flashen==
  
=== Help ===
+
=== LPCTool Parameter ===
  
 
<pre>
 
<pre>
Line 60: Line 107:
 
</pre>
 
</pre>
  
===Boop Flashen===
 
  
Flaschen kann man dann mit folgenden Befehl.
+
===Linux===
 +
 
 +
Flashen kann man dann z.B. so:
  
 
<pre>
 
<pre>
 
./lpctool -d /dev/ttyS0 -i -v -e -a boop_rom.bin
 
./lpctool -d /dev/ttyS0 -i -v -e -a boop_rom.bin
 
</pre>
 
</pre>
 +
 +
Wenn man LPCTool installiert hat (Debian-Paket oder <code>make install</code>) lässt man das <code>./</code> weg.
 +
 +
===Windows===
 +
Flashen kann man dann z.B. so:
 +
 +
<pre>
 +
lpctool.exe -d /dev/com4 -i -v -e -a boop_rom.bin
 +
</pre>
 +
 +
 +
=== Flashvorgang ===
 +
 +
<pre>
 +
lpctool -d /dev/ttyUSB0 -i -v -e -a boop_rom.bin
 +
 +
lpctool V0.9
 +
 +
This Software is free Software under GNU GPL 3 or later
 +
(c) 2007 Ch. Klippel <ck@mamalala.net>
 +
 +
Info : erasing flash #0 before write
 +
Info : using flash #0 image boop_rom.bin
 +
Info : opening serial device /dev/ttyUSB0
 +
Info : reset into bootmode
 +
Info : opening bootloader
 +
Info : initiating auto-baud
 +
Info : awaiting autobaud response
 +
Info : got response, answering
 +
Info : setting frequency
 +
Info : switching baudrate
 +
Info : disabling echo
 +
Info : unlocking bootloader
 +
Info : uploading compiled-in ram image
 +
Info : starting ram upload
 +
Info : ram upload complete, total bytes: 0x000049CC
 +
Info : ram uploaded
 +
Info : executing code at ram address 0x40000200
 +
Info : code execution started 0x40000200
 +
Info : opening ram tool
 +
Info : opened ramtool
 +
Info : opening flash0 image boop_rom.bin
 +
Info : uploading flash0 image boop_rom.bin
 +
Info : setting address to 0x80000000
 +
Info : erasing whole flash
 +
Info : erasing flash
 +
Info : whole flash erased
 +
Info : enabling bulk write
 +
Info : setting total number of bytes to 0x000301D8
 +
Info : starting flash upload
 +
Info : flash upload complete, total bytes: 0x000301D8
 +
Info : flash #0 uploaded
 +
Info : reset device
 +
Info : closing file descriptor
 +
Info : closing serial device /dev/ttyUSB0
 +
</pre>
 +
 +
 +
 +
==Lpctool-Probleme==
 +
 +
Falls nach dem Laden des Bootloaders (ramtool) die Fernbedienung neu startet (reset!) -
 +
im Quellcode die Geschwindigkeit (u.a. TOOLBAUD) von 115.200 baud auf 38.400 baud
 +
reduzieren.
 +
"tcsetattr" toggelt beim Baud-Wechsel (38.400->115.200) den reset-Pin (Linux, CentOS 5, USB-Seriell-Kabel, Windows mit FT232R, Linux mit PL2303(H?)X.
 +
 +
Eine gebremste lpctool-cygwin für Windows gibt es [http://bettyhacks.com/forum/index.php?topic=54.msg842#msg842 im Forum].
 +
 +
Eine mit cygwin für Windows gebaute Version, die ohne Baudratenwechsel bei 38400 baud auskommt gibt es ebenfalls [http://bettyhacks.com/forum/index.php?topic=241.msg1667#msg1667 im Forum]. Getestet mit PL-230? USB-UART Wandler.
 +
 +
 +
Stellen im Code von LPCTOOL:
 +
 +
'''lpctool_serial.h'''  ''Zeile 5'':
 +
 +
  <nowiki>#define TOOLBAUD 115200</nowiki>
 +
muss geändert werden in
 +
  <nowiki>#define TOOLBAUD 38400</nowiki>
 +
 +
'''serial.c'''  ''Zeile 170'':
 +
 +
  <nowiki>serial_setbrg (115200);</nowiki>
 +
muss geändert werden in
 +
  <nowiki>serial_setbrg (38400);</nowiki>
 +
 +
[[Category:Tools]]
 +
[[Category:Firmware]]

Latest revision as of 11:50, 4 October 2010

Personal tools