FAQ | Points | Add... | Recent posts | Search | Register | Log in


[STR911][OpenOCD]Problem z połączeniem


Post new topic  This topic is locked      Main Page -> Forum Index -> Microcontrollers Generally -> ARM Microcontrollers -> [STR911][OpenOCD]Problem z połączeniem
Author
Message
Zaquadnik
Poziom 20
Poziom 20


Joined: 03 Aug 2005
Posts: 922
Location: Gdańsk

Post#1 Post from the author of the topic 27 Feb 2010 10:54   

[STR911][OpenOCD]Problem z połączeniem


W zasadzie bardziej jest to problem z resetem. JTAG łączy się z procesorem i dostaję komunikat:
Code:


e:\Projekty\ARM\Eclipse\STR91x_example>openocd-ftd2xx -f str912.cfg
Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info:    options.c:50 configuration_output_handler(): jtag_speed: 1, 1
Info:    options.c:50 configuration_output_handler(): Open On-Chip Debugger (200
8-06-19 19:00) svn: 717
Info:    options.c:50 configuration_output_handler(): Open On-Chip Debugger (200
8-06-19 19:00) svn: 717
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufa
cturer: 0x020, Part: 0x4570, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufa
cturer: 0x020, Part: 0x5966, Version: 0x2)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufa
cturer: 0x020, Part: 0x457f, Version: 0x2)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufa
cturer: 0x020, Part: 0x4570, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufa
cturer: 0x020, Part: 0x5966, Version: 0x2)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufa
cturer: 0x020, Part: 0x457f, Version: 0x2)
User:    target.c:436 target_process_reset(): Timed out waiting for halt after r
eset


A oto mój skrypt. Pewnie w nim mam coś źle. Byłbym wdzięczny za pomoc.

Code:

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Turtelizer JTAG/RS232 Adapter A"
ft2232_layout turtelizer2
ft2232_vid_pid 0x0403 0xbdc8
jtag_speed 1
jtag_nsrst_delay 200
jtag_ntrst_delay 200

#use combined on interfaces or targets that can't set TRST/SRST separately
#reset_config trst_and_srst srst_pulls_trst
reset_config trst_and_srst
#reset_config trst_only

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 8 0x1 0x1 0xfe
jtag_device 4 0x1 0xf 0xe
jtag_device 5 0x1 0x1 0x1e

#target configuration
daemon_startup reset

#target <type> <startup mode>
#target arm966e <endianness> <reset mode> <chainpos> <variant>
target arm966e little run_and_init 1 arm966e
run_and_halt_time 0 30
daemon_startup reset
 
working_area 0 0x50000000 16384 nobackup
 
#flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank str9x 0x00000000 0x00080000 0 0 0
target_script 0 reset /tmp/pgm.script


Zawartość pliku pgm.script:
Code:

halt
poll
str9x flash_config 4 2 0 0x80000
flash protect 0 0 1 off
flash erase 0 0 1
flash write 0 /home/lucck/worksrc/str912/examples/ex1_sysclk/sysclock.bin 0
resume 0
shutdown

Back to top
   
Google

Google Adsense


Post# Post from the author of the topic 27 Feb 2010 10:54   





Back to top
   
Freddie Chopin
Poziom 25
Poziom 25


Joined: 12 Dec 2005
Posts: 6723
Location: Zawiercie

Post#2 27 Feb 2010 11:44   

Re: [STR911][OpenOCD]Problem z połączeniem


czemu takiego starego OpenOCD używasz? Ma to jakiekolwiek uzasadnienie?

4\/3!!
Back to top
   
Zaquadnik
Poziom 20
Poziom 20


Joined: 03 Aug 2005
Posts: 922
Location: Gdańsk

Post#3 Post from the author of the topic 27 Feb 2010 12:12   

Re: [STR911][OpenOCD]Problem z połączeniem


No jakoś nie ściągałem nowego. Ale czym prędzej to zrobię =] To pomoże ? Bo w sumie ten OpenOCD bez problemów działa z ARM7 i Cortexami.

EDIT:
Odpaliłem nowe OpenOCD (pobrane z Twojej strony) i mam komunikat:
Code:

E:\Projekty\ARM\Eclipse\STR91x_example>openocd -f str912.cfg
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
RCLK - adaptive
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Warn : str912.flash: nonstandard IR mask
Warn : str912.bs: nonstandard IR mask
Error: unable to open ftdi device: device not found
Command handler execution failed


Zmodyfikowałem oczywiście plik cfg:
Code:

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Turtelizer JTAG/RS232 Adapter"
ft2232_layout turtelizer2
ft2232_vid_pid 0x0403 0xbdc8

if { [info exists CHIPNAME] } {
   set  _CHIPNAME $CHIPNAME
} else {
   set  _CHIPNAME str912
}

if { [info exists ENDIAN] } {
   set  _ENDIAN $ENDIAN
} else {
   set  _ENDIAN little
}

# jtag speed. We need to stick to 16kHz until we've finished reset.
jtag_rclk 16

jtag_nsrst_delay 100
jtag_ntrst_delay 100

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst

if { [info exists FLASHTAPID ] } {
   set _FLASHTAPID $FLASHTAPID
} else {
   set _FLASHTAPID 0x04570041
}
jtag newtap $_CHIPNAME flash -irlen 8 -ircapture 0x1 -irmask 0x1 -expected-id $_FLASHTAPID

if { [info exists CPUTAPID ] } {
   set _CPUTAPID $CPUTAPID
} else {
   set _CPUTAPID 0x25966041
}
jtag newtap $_CHIPNAME cpu   -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID


if { [info exists BSTAPID ] } {
   set _BSTAPID $BSTAPID
} else {
   set _BSTAPID 0x1457f041
}
jtag newtap $_CHIPNAME bs    -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id $_BSTAPID

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm966e -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm966e

$_TARGETNAME configure -event reset-start { jtag_rclk 16 }

$_TARGETNAME configure -event reset-init {
   # We can increase speed now that we know the target is halted.
   #jtag_rclk 3000

   # -- Enable 96K RAM
   # PFQBC enabled / DTCM & AHB wait-states disabled
   mww 0x5C002034 0x0191

   str9x flash_config 0 4 2 0 0x80000
   flash protect 0 0 7 off
}

$_TARGETNAME configure -work-area-phys 0x50000000 -work-area-size 16384 -work-area-backup 0

#flash bank str9x <base> <size> 0 0 <target#> <variant>
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME str9x 0x00000000 0x00080000 0 0 $_TARGETNAME
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME str9x 0x00080000 0x00008000 0 0 $_TARGETNAME

Back to top
   
Google

Google Adsense


Post# Post from the author of the topic 27 Feb 2010 12:12   





Back to top
   
Freddie Chopin
Poziom 25
Poziom 25


Joined: 12 Dec 2005
Posts: 6723
Location: Zawiercie

Post#4 27 Feb 2010 14:13   

Re: [STR911][OpenOCD]Problem z połączeniem


1. Musisz zainstalować RĘCZNIE sterowniki libusb-win32 z katalogu drivers - tylko dla kanału z JTAGiem. Opis w pliku info.txt w archiwum ze sterownikami.

2. Użyj standardowych plików - openocd -f interface/turtelizer2.cfg -f target/str912.cfg

4\/3!!
Back to top
   
Zaquadnik
Poziom 20
Poziom 20


Joined: 03 Aug 2005
Posts: 922
Location: Gdańsk

Post#5 Post from the author of the topic 27 Feb 2010 19:46   

Re: [STR911][OpenOCD]Problem z połączeniem


Zrobiłem tak, jak mówisz i mam:
Code:


e:\Projekty\ARM\Eclipse\STR91x_example>openocd -f interface/turtelizer2.cfg -f t
arget/str912.cfg
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
RCLK - adaptive
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Warn : str912.flash: nonstandard IR mask
Warn : str912.bs: nonstandard IR mask
Info : RCLK (adaptive clock speed) not supported - fallback to 16 kHz
Info : JTAG tap: str912.flash tap/device found: 0x04570041 (mfg: 0x020, part: 0x
4570, ver: 0x0)
Info : JTAG tap: str912.cpu tap/device found: 0x25966041 (mfg: 0x020, part: 0x59
66, ver: 0x2)
Info : JTAG tap: str912.bs tap/device found: 0x2457f041 (mfg: 0x020, part: 0x457
f, ver: 0x2)
Warn : JTAG tap: str912.bs       UNEXPECTED: 0x2457f041 (mfg: 0x020, part: 0x457
f, ver: 0x2)
Error: JTAG tap: str912.bs  expected 1 of 1: 0x1457f041 (mfg: 0x020, part: 0x457
f, ver: 0x1)
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 6
Info : str912.cpu: hardware has 2 breakpoint/watchpoint units
Info : accepting 'gdb' connection from 0
Warn : acknowledgment received, but no packet pending
undefined debug reason 6 - target needs reset
Warn : target not halted
Error: Target not halted
Error: failed erasing sectors 0 to 0 (-304)
Error: flash_erase returned -304
Warn : WARNING! The target is already running. All changes GDB did to registers
will be discarded! Waiting for target to halt.
Error: timeout waiting for SYSCOMP & DBGACK, last DBG_STATUS: 4
Warn : WARNING! The target is already running. All changes GDB did to registers
will be discarded! Waiting for target to halt.


EDIT:

I teraz insight mi przestał działać w ogóle :/
Back to top
   
Freddie Chopin
Poziom 25
Poziom 25


Joined: 12 Dec 2005
Posts: 6723
Location: Zawiercie

Post#6 27 Feb 2010 23:19   

Re: [STR911][OpenOCD]Problem z połączeniem


Pierwszego errora pozbędziesz się zamieniając w skryptach BSTAPPID z 0x1457f041 na 0x2457f041 (masz nowszą rewizję procka, pewnie tym się str911 różni od wersji z -2 na końcu).

Co do reszty - Jakie komendy wydajesz przez GDB? Jeśli "zwyczajne" "reset halt" to spróbuj to zamienić na "reset init"

Początkowo dobrze byłoby popróbować bez gdb - przez telnet (w cmd wpisz "telnet localhost 4444") wydać pare koment typu "reset init" i zaprogramować przez "flash write_image ..." - będziesz wiedział w którym miejscu jest błąd.

W miarę postępu możesz próbować odkomentować linijkę "#jtag_rclk 3000" w skrypcie str912.cfg

4\/3!!
Back to top
   
Google

Google Adsense


Post# 27 Feb 2010 23:19   





Back to top
   
Zaquadnik
Poziom 20
Poziom 20


Joined: 03 Aug 2005
Posts: 922
Location: Gdańsk

Post#7 Post from the author of the topic 11 Mar 2010 00:05   

Re: [STR911][OpenOCD]Problem z połączeniem


Wydałem przez konsolę GDB polecenie "reset halt" i "reset init" i za każdym razem był komunikat "timed out while waiting for target halted". Po wydaniu komendy "poll" pokazuje, że "target running".
Back to top
   
Freddie Chopin
Poziom 25
Poziom 25


Joined: 12 Dec 2005
Posts: 6723
Location: Zawiercie

Post#8 11 Mar 2010 07:15   

Re: [STR911][OpenOCD]Problem z połączeniem


Więcej pomysłów już nie mam, więc polecam napisać na listę dyskusyjną OpenOCD.

4\/3!!
Back to top
   
Zaquadnik
Poziom 20
Poziom 20


Joined: 03 Aug 2005
Posts: 922
Location: Gdańsk

Post#9 Post from the author of the topic 11 Mar 2010 21:12   

Re: [STR911][OpenOCD]Problem z połączeniem


Zaczęło działać samo z siebie z OpenOCD ściągniętym z Twojej strony. Temat zamykam =] Dziękować.
Back to top
   
Post new topic  This topic is locked      Main Page -> Forum Index -> Microcontrollers Generally -> ARM Microcontrollers -> [STR911][OpenOCD]Problem z połączeniem
Page 1 of 1
Similar topics
[AT91SAM7S]Openocd - problem z programowaniem (23)
[LPC2103][C][OpenOCD] problem z timerem0 (6)
[lpc2917][openocd] Problem z flashowaniem (9)
[STM32] [OpenOCD] Problem z debuggerem (17)
[OpenOCD][SAM7S256] problem z jtagiem (1)
AT91SAM7S64 - problem z OPENOCD (6)
[STM32][Openocd]Dziwne zachowanie openocd (8)
[STR911][OpenOCD]Problem z połączeniem. Odsłona II. (5)
[STM32F103R]+[openocd]+[oocdlink] - problem z Jtagiem (4)
ZL11ARM + ZL14PRG OpenOCD problem z konfiguracja (5)

Page generation time: 0.082 seconds


FAQ || Administrator || Moderators || Widgets and banners || Contact
elektroda.pl topic RSS feed