Hi Xiaofan,

Notice to switch of JLink power to check operation of vanilla / patched version.
JLink remembers last selected interface (at least untill switched off),

The most interesting right now is patch operation with V7.
Taking special care of V7 may introduce a bugs in future, when someone
decide to implement SWD.
Such specific should be avoided whenever possible.

I wil split the patch into two parts: basic V8 and special care of V7
so we can decide to merge any of them.


2012/5/27 Xiaofan Chen <[email protected]>:
> On Sun, May 27, 2012 at 12:25 PM, Xiaofan Chen <[email protected]> wrote:
>> On Fri, May 25, 2012 at 10:13 PM, Xiaofan Chen <[email protected]> wrote:
>>> On Fri, May 25, 2012 at 5:39 PM, Xiaofan Chen <[email protected]> wrote:
>>>> On Fri, May 25, 2012 at 3:08 PM, Alexander Osipenko <[email protected]> 
>>>> wrote:
>>>>> Thanks Liviu for valuable comments!
>>>>>
>>>>> I have pushed patches to gerrit, and check them on fresh branch.
>>>>>
>>>>>  http://openocd.zylin.com/666
>>>>>  http://openocd.zylin.com/667
>>>>>
>>>>
>>>> Great. I borrowed an V8 J-Link from colleague and I can carry out
>>>> some tests on the V8. I will also test if the patches will affect existing
>>>> older revisions as well (V3, V7 and I can borrow V6 as well).
>>>>
>>>
>>> It seems to cause some problems for my V7.
>>
>> You can see that in reality it still worked in the end. The above
>> is under my Mac Mini running Mac OS X 10.7.4.
>>
>> I then tried the same setup under Ubuntu Linux 12.04 with
>> another PC (6-year old Dell GX620 desktop) and actually it works
>> without a problem.
>>
>> Open On-Chip Debugger 0.6.0-dev-00593-gdd14d84 (2012-05-27-10:56)
>> Licensed under GNU GPL v2
>> For bug reports, read
>>        http://openocd.sourceforge.net/doc/doxygen/bugs.html
>> Info : only one transport option; autoselect 'jtag'
>> 1000 kHz
>> adapter_nsrst_delay: 100
>> jtag_ntrst_delay: 100
>> cortex_m3 reset_config sysresetreq
>> Info : J-Link initialization started / target CPU reset initiated
>> Info : J-Link ARM V7 compiled Feb 15 2011 11:03:33
>> Info : J-Link caps 0xb9ff7bbf
>> Info : J-Link hw version 70000
>> Info : J-Link hw type J-Link
>> Info : J-Link max mem block 9000
>> Info : J-Link configuration
>> Info : USB-Address: 0x0
>> Info : Kickstart power on JTAG-pin 19: 0xffffffff
>> Info : Vref = 3.274 TCK = 1 TDI = 0 TDO = 1 TMS = 0 SRST = 0 TRST = 0
>> Info : J-Link JTAG Interface ready
>> Info : clock speed 1000 kHz
>> Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg:
>> 0x23b, part: 0xba00, ver: 0x3)
>> Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020,
>> part: 0x6410, ver: 0x1)
>> Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
>> 1000 kHz
>> Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg:
>> 0x23b, part: 0xba00, ver: 0x3)
>> Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020,
>> part: 0x6410, ver: 0x1)
>> target state: halted
>> target halted due to debug-request, current mode: Thread
>> xPSR: 0x01000000 pc: 0x0800272c msp: 0x20000810
>> 8000 kHz
>> Info : device id = 0x20036410
>> Info : flash size = 128kbytes
>> stm32x mass erase complete
>> wrote 10048 bytes from file LCD_demo.bin in 0.595868s (16.468 KiB/s)
>> verified 10048 bytes in 0.281748s (34.827 KiB/s)
>> dumped 131072 bytes in 1.150646s (111.242 KiB/s)
>> verified 131072 bytes in 0.468557s (273.179 KiB/s)
>> stm32x mass erase complete
>> wrote 131072 bytes from file dump_LCD_demo.bin in 3.826826s (33.448 KiB/s)
>> verified 131072 bytes in 0.472781s (270.738 KiB/s)
>> 10048 bytes written at address 0x20000000
>> downloaded 10048 bytes in 0.087205s (112.522 KiB/s)
>> 1000 kHz
>> Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg:
>> 0x23b, part: 0xba00, ver: 0x3)
>> Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020,
>> part: 0x6410, ver: 0x1)
>> shutdown command invoked
>
> Then I tested the vanilla git with V7 and it works as expected.
>
> The V7 seems to have the latest firmware already since Segger
> tools under Windows does not prompt for firmware updates.
>
> I also tested your patch with V8 and it works as expected.
>
> Now it is strange. The vanilla git also works under my Ubuntu 12.04
> with the V8 and latest release firmware.
>
> I can not explain the differences now. Maybe my Mac's behavior is
> a bit strange.
>
> mcuee@GX620Ubuntu:~/Desktop/build/openocd/stm32$ openocd -f
> openocd_jlink.cfgOpen On-Chip Debugger 0.6.0-dev-00595-g445a54a
> (2012-05-27-10:22)
> Licensed under GNU GPL v2
> For bug reports, read
>        http://openocd.sourceforge.net/doc/doxygen/bugs.html
> Warn : Adapter driver 'jlink' did not declare which transports it
> allows; assuming legacy JTAG-only
> Info : only one transport option; autoselect 'jtag'
> 1000 kHz
> adapter_nsrst_delay: 100
> jtag_ntrst_delay: 100
> cortex_m3 reset_config sysresetreq
> Info : J-Link initialization started / target CPU reset initiated
> Info : J-Link ARM V8 compiled May  3 2012 18:36:22
> Info : J-Link caps 0xb9ff7bbf
> Info : J-Link hw version 80000
> Info : J-Link hw type J-Link
> Info : J-Link max mem block 9336
> Info : J-Link configuration
> Info : USB-Address: 0x0
> Info : Kickstart power on JTAG-pin 19: 0xffffff01
> Info : Vref = 3.293 TCK = 1 TDI = 0 TDO = 1 TMS = 0 SRST = 0 TRST = 0
> Info : J-Link JTAG Interface ready
> Info : clock speed 1000 kHz
> Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg:
> 0x23b, part: 0xba00, ver: 0x3)
> Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020,
> part: 0x6410, ver: 0x1)
> Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
> 1000 kHz
> Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg:
> 0x23b, part: 0xba00, ver: 0x3)
> Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020,
> part: 0x6410, ver: 0x1)
> target state: halted
> target halted due to debug-request, current mode: Thread
> xPSR: 0x01000000 pc: 0x0800272c msp: 0x20000810
> 8000 kHz
> Info : device id = 0x20036410
> Info : flash size = 128kbytes
> stm32x mass erase complete
> wrote 10048 bytes from file LCD_demo.bin in 0.575864s (17.040 KiB/s)
> verified 10048 bytes in 0.253752s (38.670 KiB/s)
> dumped 131072 bytes in 1.012384s (126.434 KiB/s)
> verified 131072 bytes in 0.464459s (275.589 KiB/s)
> stm32x mass erase complete
> wrote 131072 bytes from file dump_LCD_demo.bin in 3.815808s (33.545 KiB/s)
> verified 131072 bytes in 0.472767s (270.746 KiB/s)
> 10048 bytes written at address 0x20000000
> downloaded 10048 bytes in 0.077926s (125.921 KiB/s)
> 1000 kHz
> Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg:
> 0x23b, part: 0xba00, ver: 0x3)
> Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020,
> part: 0x6410, ver: 0x1)
> shutdown command invoked
>
>
> --
> Xiaofan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to