Fab,
The AU1100 is 32 bits. I guess the 32 versus 36 bit issue could be
solved in a generic way by adding a 'variant' option.


________________________________

        Van: Fab Clement [mailto:clement....@gmail.com] 
        Verzonden: vrijdag 10 april 2009 13:40
        Aan: Nico Coesel
        CC: openocd-development@lists.berlios.de
        Onderwerp: Re: [Openocd-development] AU1100 (MIPS) problems
Fixed!
        
        
        Hi
        
        I add the same problem with an AU1200 and an Amontec that I also
solved with a polling without being satisfied. At least it worked enough
to flash a bricked box.
        
        The AU1200 has a 36 bits ADDRESS width. What about the AU1100?
Could it be an explaination for these 5 added clocks?
        
        Best Regards
        Fab
        
        
        On Fri, Apr 10, 2009 at 11:46 AM, Nico Coesel
<ncoe...@dealogic.nl> wrote:
        

                Another update on the AU1100 troubles. Adding 5 clocks
after clearing
                the Pracc bit solved the problem. The patch is attached
to this e-mail.
                

                Met vriendelijke groet / Best regards,
                DEA bv
                
                ing. Nico Coesel
                
                Kweekgrasstraat 18
                1313BX  Almere
                tel: +31 (0)36 5343888
                fax: +31 (0)36 5342244
                e-mail: ncoe...@dealogic.nl
                www.c-lock.nl
                www.dealogic.nl
                
                (op al onze leveringen van goederen en diensten zijn
onze algemene
                voorwaarden van toepassing zoals gedeponeerd bij de KvK
te Lelystad,
                inschrijfnummer 39046783)
                
                
                
                > -----Oorspronkelijk bericht-----
                
                > Van: openocd-development-boun...@lists.berlios.de
                > [mailto:openocd-development-boun...@lists.berlios.de]
Namens
                > Nico Coesel
                > Verzonden: donderdag 9 april 2009 12:15
                > Aan: John McCarthy
                
                > CC: openocd-development@lists.berlios.de
                > Onderwerp: Re: [Openocd-development] AU1100 (MIPS)
problems Fixed!
                >
                > John,
                > Polling in wait_for_pracc_rw() doesn't work. The way I
                > understand it is that read/write are used to catch a
memory
                > fetch/write that the processor. After that the Pracc
bit is
                > cleared to 0 to allow the processor to 'process' the
fetch. I
                > suspect the AU1100 is not updating this register
properly and
                > needs extra TCK clocks. So my loop is actually
clocking the
                > CPU / EJTAG into the next command. A safer way to do
this is
                > using jtag_add_clocks/jtag_execute_command. Toggling
TCK in
                > the idle state doesn't hurt anything and it seems to
work. I
                > added 5 extra clocks after clearing the Pracc bit. The
                > documentation is very unclear at this point; there is
some
                > clock domain synchronisation going on between the CPU
clock and TCK.
                >
                > Met vriendelijke groet / Best regards,
                > DEA bv
                >
                > ing. Nico Coesel
                >
                > Kweekgrasstraat 18
                > 1313BX  Almere
                > tel: +31 (0)36 5343888
                > fax: +31 (0)36 5342244
                > e-mail: ncoe...@dealogic.nl
                > www.c-lock.nl
                > www.dealogic.nl
                >
                > (op al onze leveringen van goederen en diensten zijn
onze
                > algemene voorwaarden van toepassing zoals gedeponeerd
bij de
                > KvK te Lelystad, inschrijfnummer 39046783)
                >
                >
                >
                > > -----Oorspronkelijk bericht-----
                > > Van: John McCarthy [mailto:jg...@magma.ca]
                > > Verzonden: donderdag 9 april 2009 4:00
                > > Aan: Nico Coesel
                > > CC: openocd-development@lists.berlios.de
                > > Onderwerp: Re: [Openocd-development] AU1100 (MIPS)
problems Fixed!
                > >
                > > Hi Nico,
                > >
                > > On Wed, 2009-04-08 at 13:12 +0200, Nico Coesel
wrote:
                > > > I did some debugging and found that the Pracc flag
needs to
                > > be polled
                > > > for the AU1100 device to work properly. I've
attached a
                > > patch against
                > > > mips32_pracc.c. I assume the (minor) changes do
not affect
                > > other MIPS
                > > > targets.
                > >
                > > Hmm, but your patch does more than poll.  It loops
clearing
                > PRACC each
                > > time through the loop till it reads clear.  This
will miss
                > processor
                > > accesses after the access your trying to process.
When
                > > mips32_pracc_exec_read/write() is called, the PRACC
bit is
                > supposed to
                > > be already set.  PRACC set means the CPU is waiting
for a read or
                > > write from the the EJTAG debug memory region.
                > >
                > > If the AU1100 needs polling then you should do it in
                > > wait_for_pracc_rw(), waiting from PRACC to become
set.
                > Once PRACC is
                > > set then the original code in
                > > mips32_pracc_exec_read/write() should work fine.
PRACC
                > should always
                > > be clear on return (it just releases the CPU to
perform another
                > > instruction).
                > >
                > > Setting PRACC is a no-op, only clearing it has an
effect
                > and only when
                > > it was set by an active CPU access to the EJTAG
debug region.
                > >
                > > Can you try polling in wait_for_pracc_rw() with the
                > original code in
                > > mips32_pracc_exec_read/write()?  The code in your
patch
                > would not work
                > > on other MIPS targets and I'm surprised it works on
the AU1100.
                > >
                > >
                > > Cheers,
                > > John McCarthy.
                > >
                > > >
                > > > Nico Coesel
                > > >
                > > >
                > > > -----Oorspronkelijk bericht-----
                > > > Van: Nico Coesel
                > > > Verzonden: dinsdag 7 april 2009 17:00
                > > > Aan: 'openocd-development@lists.berlios.de'
                > > > Onderwerp: AU1100 (MIPS) problems
                > > >
                > > > Hello all,
                > > > I'm trying to get Openocd + a wiggler interface
working
                > > with an AU1100
                > > > MIPS based SOC. It seems the chip is recognized
correctly
                > (the JTAG
                > > > interface is working) but I can't access the
memory. When
                > I try to
                > > > read or write data the debug shows 'No memory
access in
                > progress!'.
                > > > Anyone has some suggestions on where to start
looking? I've
                > > included
                > > > the output from OpenOCD below:
                > > >
                > > >
                > > > Debug: 7 0 command.c:91 script_command():
script_command -
                > > > reset_config
                > > > Debug: 8 0 command.c:108 script_command():
script_command -
                > > > reset_config, argv[0]=ocd_reset_config
                > > > Debug: 9 0 command.c:108 script_command():
script_command -
                > > > reset_config, argv[1]=trst_and_srst
                > > > Debug: 11 0 command.c:91 script_command():
script_command -
                > > interface
                > > > Debug: 12 0 command.c:108 script_command():
script_command -
                > > > interface, argv[0]=ocd_interface
                > > > Debug: 13 0 command.c:108 script_command():
script_command -
                > > > interface, argv[1]=parport
                > > > Debug: 15 0 command.c:91 script_command():
script_command -
                > > > parport_port
                > > > Debug: 16 0 command.c:108 script_command():
script_command -
                > > > parport_port, argv[0]=ocd_parport_port
                > > > Debug: 17 0 command.c:108 script_command():
script_command -
                > > > parport_port, argv[1]=0x378
                > > > Debug: 19 0 command.c:91 script_command():
script_command -
                > > > parport_cable
                > > > Debug: 20 0 command.c:108 script_command():
script_command -
                > > > parport_cable, argv[0]=ocd_parport_cable
                > > > Debug: 21 0 command.c:108 script_command():
script_command -
                > > > parport_cable, argv[1]=wiggler2
                > > > Debug: 23 0 command.c:91 script_command():
script_command -
                > > > jtag_nsrst_delay
                > > > Debug: 24 0 command.c:108 script_command():
script_command -
                > > > jtag_nsrst_delay, argv[0]=ocd_jtag_nsrst_delay
                > > > Debug: 25 0 command.c:108 script_command():
script_command -
                > > > jtag_nsrst_delay, argv[1]=100
                > > > Debug: 27 0 command.c:91 script_command():
script_command -
                > > > jtag_ntrst_delay
                > > > Debug: 28 0 command.c:108 script_command():
script_command -
                > > > jtag_ntrst_delay, argv[0]=ocd_jtag_ntrst_delay
                > > > Debug: 29 0 command.c:108 script_command():
script_command -
                > > > jtag_ntrst_delay, argv[1]=100
                > > > Debug: 31 0 command.c:91 script_command():
script_command -
                > > jtag_speed
                > > > Debug: 32 0 command.c:108 script_command():
script_command -
                > > > jtag_speed, argv[0]=ocd_jtag_speed
                > > > Debug: 33 0 command.c:108 script_command():
script_command -
                > > > jtag_speed, argv[1]=0
                > > > Debug: 34 0 jtag.c:2620
handle_jtag_speed_command(): handle
                > > jtag speed
                > > > User : 35 0 command.c:383 command_print():
jtag_speed: 0
                > > > Debug: 36 0 jtag.c:1892 jim_newtap_cmd(): Creating
New Tap, Chip:
                > > > _CHIPNAME, Tap: cpu, Dotted: _CHIPNAME.cpu, 6
params
                > > > Debug: 37 0 jtag.c:1911 jim_newtap_cmd():
Processing
                > option: -irlen
                > > > Debug: 38 0 jtag.c:1911 jim_newtap_cmd():
Processing option:
                > > > -ircapture
                > > > Debug: 39 0 jtag.c:1911 jim_newtap_cmd():
Processing
                > option: -irmask
                > > > Debug: 40 0 jtag.c:2024 jim_newtap_cmd(): Created
Tap:
                > > _CHIPNAME.cpu @
                > > > abs position 0, irlen 5, capture: 0x1 mask: 0x1
                > > > Debug: 41 0 target.c:3911 jim_target(): Target
command params:
                > > > Debug: 42 0 target.c:3912 jim_target(): target
create
                > _CHIPNAME.cpu
                > > > mips_m4k -endian big -chain-position _CHIPNAME.cpu
-variant
                > > ejtag_srst
                > > > Debug: 44 0 command.c:91 script_command():
script_command - bank
                > > > Debug: 45 0 command.c:108 script_command():
                > script_command - bank,
                > > > argv[0]=ocd_flash_bank
                > > > Debug: 46 0 command.c:108 script_command():
                > script_command - bank,
                > > > argv[1]=cfi
                > > > Debug: 47 0 command.c:108 script_command():
                > script_command - bank,
                > > > argv[2]=0xbf000000
                > > > Debug: 48 0 command.c:108 script_command():
                > script_command - bank,
                > > > argv[3]=0x1000000
                > > > Debug: 49 0 command.c:108 script_command():
script_command - bank,
                > > > argv[4]=2
                > > > Debug: 50 0 command.c:108 script_command():
script_command - bank,
                > > > argv[5]=4
                > > > Debug: 51 0 command.c:108 script_command():
                > script_command - bank,
                > > > argv[6]=0 User : 52 0 command.c:494
command_run_line():
                > > > Debug: 54 0 command.c:91 script_command():
script_command - init
                > > > Debug: 55 0 command.c:108 script_command():
                > script_command - init,
                > > > argv[0]=ocd_init
                > > > Debug: 56 0 openocd.c:144 handle_init_command():
target
                > > init complete
                > > > Debug: 57 0 parport.c:402 parport_init():
requesting
                > privileges for
                > > > parallel port 0x378...
                > > > Debug: 58 0 parport.c:412 parport_init():
...privileges granted
                > > > Debug: 59 0 parport.c:237 parport_reset(): trst:
0, srst: 0
                > > > Debug: 60 0 openocd.c:151 handle_init_command():
jtag
                > > interface init
                > > > complete
                > > > Debug: 61 0 jtag.c:2240 jtag_init_inner(): Init
JTAG chain
                > > > Debug: 62 0 jtag.c:434
jtag_call_event_callbacks(): jtag
                > > event: JTAG
                > > > controller reset (RESET or TRST)
                > > > Debug: 63 0 jtag.c:1487 jtag_reset_callback(): -
                > > > Debug: 64 0 jtag.c:434
jtag_call_event_callbacks(): jtag
                > > event: JTAG
                > > > controller reset (RESET or TRST)
                > > > Debug: 65 0 jtag.c:1487 jtag_reset_callback():
-Info : 66 15
                > > > jtag.c:1607
                > > > jtag_examine_chain(): JTAG tap:  CHIPNAME.cpu
tap/devic e found:
                > > > 0x4020228f (Manufacturer: 0x147, Part: 0x0202,
Version: 0x4)
                > > > Debug: 67 15 jtag.c:434
jtag_call_event_callbacks(): jtag
                > > event: JTAG
                > > > controller reset (RESET or TRST)
                > > > Debug: 68 15 jtag.c:1487 jtag_reset_callback(): -
                > > > Debug: 69 15 openocd.c:157 handle_init_command():
jtag
                > init complete
                > > > Debug: 70 15 mips_ejtag.c:269 mips_ejtag_init():
impcode:
                > 0x20404000
                > > > Debug: 71 15 mips_ejtag.c:280 mips_ejtag_init():
EJTAG:
                > Version 2.5
                > > > Detected
                > > > Debug: 72 15 mips_ejtag.c:300 mips_ejtag_init():
EJTAG:
                > > features: R4k
                > > > ASID_8 noDMA MIPS32
                > > > Debug: 73 15 openocd.c:160 handle_init_command():
jtag examine
                > > > complete
                > > > Debug: 74 15 openocd.c:166 handle_init_command():
flash
                > > init complete
                > > > Debug: 75 15 openocd.c:170 handle_init_command():
mflash
                > > init complete
                > > > Debug: 76 15 openocd.c:174 handle_init_command():
NAND
                > init complete
                > > > Debug: 77 15 openocd.c:178 handle_init_command():
pld
                > init complete
                > > > Warn
                > > > : 78 15 gdb_server.c:2201 gdb_init(): no gdb port
                > specified, using
                > > > default port 3333
                > > > Debug: 79 15 gdb_server.c:2225 gdb_init(): gdb
service for target
                > > > mips_m4k at port 3333 Warn : 80 15
tcl_server.c:178
                > > tcl_init(): no tcl
                > > > port specified, using default port 6666 User : 81
15 command.c:494
                > > > command_run_line():
                > > > Debug: 82 109 mips_m4k.c:182 mips_m4k_poll():
Reset
                > > Detected Info : 83
                > > > 2921 server.c:89 add_connection(): accepting
'telnet'
                > > connection from
                > > > 0
                > > > Debug: 85 8078 command.c:91 script_command():
                > script_command - halt
                > > > Debug: 86 8078 command.c:108 script_command():
                > > script_command - halt,
                > > > argv[0]=ocd_halt
                > > > Debug: 87 8078 target.c:1744
handle_halt_command(): -
                > > > Debug: 88 8078 mips_m4k.c:226 mips_m4k_halt():
                > > target->state: running
                > > > Debug: 89 8078 mips_ejtag.c:217
mips_ejtag_enter_debug():
                > > ejtag_ctrl:
                > > > 0x4004c008
                > > >
                > > > Debug: 90 8078 mips32_pracc.c:54
wait_for_pracc_rw():
                > > DEBUGMODULE: No
                > > > memory access in progress!
                > > >
                > > > Debug: 91 8078 mips_m4k.c:729
mips_m4k_read_memory(): address:
                > > > 0xff300000, size: 0x00000004, count: 0x00000001
                > > > Debug: 92 8078 mips32_pracc.c:54
wait_for_pracc_rw():
                > > DEBUGMODULE: No
                > > > memory access in progress!
                > > >
                > > > Debug: 93 8078 target.c:1190 target_read_u32():
address:
                > 0xff300000
                > > > failed
                > > > Debug: 94 8078 mips32_pracc.c:54
wait_for_pracc_rw():
                > > DEBUGMODULE: No
                > > > memory access in progress!
                > > >
                > > > Debug: 95 8078 mips_m4k.c:154
mips_m4k_debug_entry():
                > entered debug
                > > > state at PC0x0, target->state: halted
                > > > Debug: 96 8078 target.c:696
target_call_event_callbacks(): target
                > > > event
                > > > 4 (early-halted)
                > > > Debug: 97 8078 target.c:3054
target_handle_event(): event: 4
                > > > early-halted - no action
                > > > Debug: 98 8078 target.c:696
target_call_event_callbacks(): target
                > > > event
                > > > 5 (halted)
                > > > Debug: 99 8078 target.c:3054
target_handle_event(): event:
                > > 5 halted -
                > > > no action User : 100 8078 target.c:959
target_arch_state():
                > > target state:
                > > > halted User : 101 8078 mips32.c:273
mips32_arch_state():
                > > target halted
                > > > due to debug-request, pc: 0x00000000 User : 102
8078 command.c:494
                > > > command_run_line():
                > > > Debug: 104 11468 command.c:91 script_command():
                > script_command - mdw
                > > > Debug: 105 11468 command.c:108 script_command():
                > > script_command - mdw,
                > > > argv[0]=ocd_mdw
                > > > Debug: 106 11468 command.c:108 script_command():
                > > script_command - mdw,
                > > > argv[1]=0xb1900000
                > > > Debug: 107 11468 command.c:108 script_command():
                > > script_command - mdw,
                > > > argv[2]=2
                > > >
                > > > Debug: 108 11468 mips_m4k.c:729
mips_m4k_read_memory(): address:
                > > > 0xb1900000, size: 0x00000004, count: 0x00000002
                > > > Debug: 109 11468 mips32_pracc.c:54
wait_for_pracc_rw():
                > > DEBUGMODULE:
                > > > No memory access in progress!
                > > >
                > > > Debug: 110 11468 command.c:427 run_command():
Command failed with
                > > > error code -107 User : 111 11468 command.c:626
                > > openocd_jim_vfprintf():
                > > > Runtime error, file "command.c", line 456:
                > > >     User : 112 11468 command.c:626
openocd_jim_vfprintf():
                > > >
                > > >
                > > > Met vriendelijke groet / Best regards, DEA bv
                > > >
                > > > Nico Coesel
                > > > _______________________________________________
                > > > Openocd-development mailing list
                > > > Openocd-development@lists.berlios.de
                > > >
https://lists.berlios.de/mailman/listinfo/openocd-development
                > >
                > >
                > _______________________________________________
                > Openocd-development mailing list
                > Openocd-development@lists.berlios.de
                >
https://lists.berlios.de/mailman/listinfo/openocd-development
                >
                

                _______________________________________________
                Openocd-development mailing list
                Openocd-development@lists.berlios.de
        
https://lists.berlios.de/mailman/listinfo/openocd-development
                
                


_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to