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
(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/
  
=== Help ===
+
==Forumsdiskussion==
usage: lpctool [-d NAME] [-i] [-r [NAME]] [-R ADDRESS] [-X [ADDRESS]] [-a [NAME] [-A ADRDESS]] [-e] [-b [NAME] [-B ADDRESS]] [-E] [-s] [-S] [-c] [-C] [-v] [-V]
+
Die Ankündigung des Programms im Forum: http://bettyhacks.com/forum/index.php?topic=54.0
 +
 
 +
==Funktion==
 +
Siehe [[#Flashvorgang]].
 +
 
 +
# Bootloader aktivieren
 +
## Zusätzlich zu den Datenleitungen werden zwei Handshake-Signale benutzt
 +
<pre>
 +
PC    Betty
 +
-----------
 +
TX  - RX
 +
RX  - TX
 +
DTR - nReset
 +
RTS - eINT1
 +
</pre>
 +
 
 +
# 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>
 +
cd trunk
 +
make
 +
sudo make install
 +
</pre>
 +
Bei dem Paket für Debian Basierte Systeme
 +
<pre>
 +
dpkg -i LPCTool.deb
 +
</pre>
 +
 
 +
==Boop Flashen==
 +
 
 +
=== LPCTool Parameter ===
 +
 
 +
<pre>
 +
usage: lpctool [-d NAME] [-i] [-r [NAME]] [-R ADDRESS] [-X [ADDRESS]] [-a [NAME] [-A ADRDESS]] [-e] [-b [NAME] [-B ADDRESS]]  
 +
              [-E] [-s] [-S] [-c] [-C] [-v] [-V]
  
 
         -d NAME        specify serial device, default is /dev/ttyS0
 
         -d NAME        specify serial device, default is /dev/ttyS0
Line 39: Line 105:
 
         -v              print version
 
         -v              print version
 
         -V              be more verbose
 
         -V              be more verbose
 +
</pre>
 +
 +
 +
===Linux===
 +
 +
Flashen kann man dann z.B. so:
 +
 +
<pre>
 +
./lpctool -d /dev/ttyS0 -i -v -e -a boop_rom.bin
 +
</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:
  
at least -r or -i must be given to be usefull. everything in [] is optional
+
'''lpctool_serial.h'''  ''Zeile 5'':
examples:
+
  
to just load ramtool.bin, starting at 0x40000200, using serial device /dev/ttyS0 :
+
  <nowiki>#define TOOLBAUD 115200</nowiki>
lpcload -r
+
muss geändert werden in
 +
  <nowiki>#define TOOLBAUD 38400</nowiki>
  
to do the same, but using serial device /dev/ttyS1 instead :
+
'''serial.c'''  ''Zeile 170'':
lpcload -r -d /dev/ttyS1
+
  
using the file image.bin as source for the ram, use /dev/ttyS1 as serial device :
+
  <nowiki>serial_setbrg (115200);</nowiki>
lpcload -r image.bin -d /dev/ttyS1
+
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