Forum: Mikrocontroller und Digitale Elektronik STK1000 und JTAGICE MKII - Verbindung


von Frank B. (fbergemann)


Lesenswert?

Ich hab' ein altes STK1000 erstanden.
Wenn ich mich mit 'putty' da dranhänge, dann seh' ich auch ein log von 
einem internes linux, das gebooted wird.
Eine SD-Card mit vorinstalliertem linux image lag aber nicht bei.
Das hab' ich dann selber erstellt - unter linux mit 'dd'.
Allerdings reagiert das board nicht auf die Tastatur - d.h. ich kann den 
boot-Vorgang nicht mit <space> unterbrechen und von SD Karte booten.
Es kommen beim booten auch etliche Fehler auf dem Schirm:
1
CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
2
CLEANMARKER node found at 0x00020000 has totlen 0xc != normal 0x0
3
CLEANMARKER node found at 0x00040000 has totlen 0xc != normal 0x0
4
CLEANMARKER node found at 0x00060000 has totlen 0xc != normal 0x0
5
[...]
6
JFFS2 notice: (194) check_node_data: wrong data CRC in data node at 0x07925044: read 0xa173700e, calculated 0x11075390.
7
JFFS2 notice: (194) check_node_data: wrong data CRC in data node at 0x07924044: read 0xa173700e, calculated 0x11075390.
8
JFFS2 notice: (194) check_node_data: wrong data CRC in data node at 0x07923044: read 0xa173700e, calculated 0x11075390.

Am Ende dann:
1
STK1000 ready
2
3
sh-3.2#

Aber es ist auch hier keine Eingabe über Tastatur möglich.
Deshalb wollte ich jetzt den bootloader neu flashen - mit JTAGICE-MKII.
Bzw. weil das auch nicht funktioniert (s.u.), hab' ich mir erst mal ein 
Demo aus dem AVR32 Studio rausgepickt und wollte das auf's board 
bringen.
Ich bekomme aber eine Fehlermeldung, wenn ich nur "Read MCU Info" 
aufrufe
(nicht immer - aber recht häufig):
1
Executing cmd.exe /C avr32program -c USB:FFFFFFFFFFFF -pjtagicemkii --gui cpuinfo --features  (WAIT)
2
Connected to JTAGICE mkII version 6.6, 6.6 at USB:FFFFFFFFFFFF.
3
Unable to communicate with CPU, even tried ABORT and RESET.
4
Process failed with error code 1.

Oder beim Programmieren eines Demos
1
Executing cmd.exe /C avr32program -c USB:FFFFFFFFFFFF -pjtagicemkii --gui --part AP7000 program -fcfi@0 -F elf -O 0 -v -e -R -r E:\Users\FBE\Documents\Atmel Studio\6.2\STK1000\STK1000 - DRIVERS - LCD Controller (LCD) moving bitmap example\Debug\STK1000 - DRIVERS - LCD Controller (LCD) moving bitmap example_DEBUG.elf  (WAIT)
2
Connected to JTAGICE mkII version 6.6, 6.6 at USB:FFFFFFFFFFFF.
3
Unable to communicate with CPU, even tried ABORT and RESET.
4
Process failed with error code 1.

Bei MKII/Properties "aWire Clock" und "VTarget" abfragen geht aber.

Kann mir jemand helfen?

von Frank B. (fbergemann)


Lesenswert?

Kann es sein, dass das board einiges an Strom zieht?
Ich hatte nur 12V / 1A dran.
Reicht das?

von Frank B. (fbergemann)


Angehängte Dateien:

Lesenswert?

Das flash läßt sich nicht programmieren:
1
Executing cmd.exe /C avr32program -c USB:FFFFFFFFFFFF -pjtagicemkii --gui --part AP7000 program -fcfi@0 -F elf -O 0 -v -e -R -r E:\Users\FBE\Documents\Atmel Studio\6.2\STK1000\STK1000 - DRIVERS - LCD Controller (LCD) moving bitmap example\Debug\STK1000 - DRIVERS - LCD Controller (LCD) moving bitmap example_DEBUG.elf  (WAIT)
2
Connected to JTAGICE mkII version 6.6, 6.6 at USB:FFFFFFFFFFFF.
3
Programming 17672 bytes in 4 segments.
4
Failed programming 200 bytes of flash memory at 0x0000343c.
5
Attempted to program unerased word.
6
Process failed with error code 1.
Ist der Flash Speicher hinüber?

von Frank B. (fbergemann)


Lesenswert?

Das AVR32 Studio scheint nicht so das Gelbe vom Ei zu sein.
Ich hab' jetzt einen neuen boot-loader manuell raufgespielt, anhand 
von:
http://hhoegl.informatik.fh-augsburg.de/hhweb/elinux/ngw100/atmel-support/support-uboot-upgrade.txt

Wie waren noch mal die Uboot-Kommandos zum booten von SD-Card?

von Frank B. (fbergemann)


Angehängte Dateien:

Lesenswert?

Trotz Anlegen der zu bootenden SD Card mit Linux Image anhand der 
Beschreibung im angehängten CreateSdCard.txt, bootet mein STK1000 immer 
noch nicht :-(
1
U-Boot 1.1.4-at0 (Mar  9 2007 - 10:52:10)
2
3
U-Boot code: 00000000 -> 000153ef  data: 24000000 -> 24003e10
4
SDRAM: 8 MB at address 0x10000000
5
Testing SDRAM...OK
6
malloc: Using memory from 0x10780000 to 0x10800000
7
Flash:  8 MB at address 0x00000000
8
DRAM Configuration:
9
Bank #0: 10000000  8 MB
10
*** Warning - bad CRC, using default environment
11
12
In:    serial
13
Out:   serial
14
Err:   serial
15
Net:   macb0
16
Press SPACE to abort autoboot in 2 seconds
17
Manufacturer ID:       02
18
OEM/Application ID:    544D
19
Product name:          SD256
20
Product Revision:      0.8
21
Product Serial Number: 2078258961
22
Manufacturing Date:    04/10
23
SD Card detected (RCA 19267)
24
CSD data: 002d0032 135983d8 f6daff80 1640000f
25
CSD structure version:   1.0
26
MMC System Spec version: 0
27
Card command classes:    135
28
Read block length:       512
29
Supports partial reads
30
Write block length:      512
31
Does not support partial writes
32
Does not support group WP
33
Card capacity:          258211840 bytes
34
File format:            0/0
35
Write protection:
36
mmc: Using 28672 cycles data timeout (DTOR=0x57)
37
.** Bad partition 1 **
38
## Booting image at 90250000 ...
39
Bad Magic Number
40
Uboot>

von Frank B. (fbergemann)


Angehängte Dateien:

Lesenswert?

Die SD Karte musste partitioniert werden, damit uboot davon booten 
kann.
Aber der Bootvorgang hängt noch hier:
1
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
2
VFS: Mounted root (ext2 filesystem).
3
Freeing init memory: 76K (90000000 - 90013000)
4
Warning: unable to open an initial console.
5
warning: 'proftpd' uses 32-bit capabilities (legacy support in use)
Die falsche Addresse zum Laden?
1
U-Boot> printenv
2
bootdelay=1
3
baudrate=115200
4
hostname="atstk1006-no-mplayer"
5
ethact=macb0
6
bootargs=console=ttyS0 root=/dev/mmcblk0p1 rootdelay=1
7
bootcmd=mmcinit; ext2load mmc 0:1 0x10400000 boot/uImage; bootm
8
9
Environment size: 192/65532 bytes
10
U-Boot>

: Bearbeitet durch User
von Frank B. (fbergemann)


Lesenswert?

da fehlte noch was beim einrichten der bootable SD Card
(http://sourceforge.net/p/colinux/mailman/message/22962415/)
Karte noch mal in den PC, unter linux mounten und dann:
1
mknod -m 600 dev/console c 5 1
2
mknod -m 666 dev/null c 1 3
3
mknod -m 666 dev/zero c 1 5
Nun bootet das STK1006 vernünftig.
Jetzt geht's an's fine-tuning mit dem Linux auf dem board (Netzwerk 
einrichten, web service, etc.).
Und am Ende dann noch mal ein image für's flash auf dem board selbst 
(ohne SD Card).

Ich werden das ganze Prozedere dann noch mal sortieren und hier ablegen
http://www.mikrocontroller.net/articles/STK1000
Kann nicht schaden - auch wenn's schon ein altes board ist.

[ Nachtrag - damit ich's nicht vergesse:
  Das Problem mit der Tastatur-Eingabe via 'putty'
  (siehe ganz oben - initialer Eintrag)
  lag einfach nur an den Settings in 'putty' unter "Connection/Serial/".
  Anstelle von RTS/CTS muss es XON/XOFF sein ]

: Bearbeitet durch User
von Frank B. (fbergemann)


Lesenswert?

LAN-Netzwerk einrichten erfordert das Setzen von MAC Addressen im uboot
- 'ethaddr' und 'eth1addr' -
sonst verweigert /etc/init.d/S20network die Arbeit:
1
U-Boot> printenv
2
bootdelay=1
3
baudrate=115200
4
hostname="atstk1006-no-mplayer"
5
ethact=macb0
6
bootargs=console=ttyS0 root=/dev/mmcblk0p1 rootdelay=1
7
bootcmd=mmcinit; ext2load mmc 0:1 0x10400000 boot/uImage; bootm
8
ethaddr=FC:C2:3D:00:01:01
9
eth1addr=FC:C2:3D:00:01:02

Danach bekommt man dann auch eine IP-Addresse nach dem booten:
1
~ # ifconfig
2
eth0      Link encap:Ethernet  HWaddr FC:C2:3D:00:01:01
3
          inet addr:192.168.1.143  Bcast:192.168.1.255  Mask:255.255.255.0
4
          inet6 addr: fe80::fec2:3dff:fe00:101/64 Scope:Link
5
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
6
          RX packets:29 errors:4 dropped:0 overruns:0 frame:0
7
          TX packets:29 errors:4 dropped:0 overruns:0 carrier:4
8
          collisions:0 txqueuelen:1000
9
          RX bytes:3918 (3.8 KiB)  TX bytes:3106 (3.0 KiB)
10
          Interrupt:25 Base address:0x1800
11
12
lo        Link encap:Local Loopback
13
          inet addr:127.0.0.1  Mask:255.0.0.0
14
          inet6 addr: ::1/128 Scope:Host
15
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
16
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
17
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
18
          collisions:0 txqueuelen:0
19
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
eth0 geht damit schon mal.
Ich muss noch sehen, wie ich eth1 auch an den Start bekomme

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.