[Openocd-development] [PATCH] FT2232H/FT4232H support

2009-08-13 Thread Jonas Horberg
Hi,

I found some odd things in ft2232.c when it is built with FT2232H/FT4232H 
support :

1. It can only be built with the FTD2XX driver. libftdi supports 
FT2232H/FT4232H
since version 0.16

2. A speed value of 0 is used as a RTCK request indicator. This clashes 
with the
valid clock division value 0 that provide the highest fixed clock 
frequency.

3. The ft2232_speed_div function return the maximum selectable frequency 
(30MHz)
when RTCK is activated. It should return 0.

4. The ft2232_khz function return ERROR_OK when RTCK is requested even for
devices lacking RTCK support. It should return ERROR_FAIL so the upper 
driver layers
can detect this and try to fallback to a fixed frequency.

5. FT2232H/FT4232H have a backward compatibility function that divide the 
clock
by 5 to get the same frequency range as FT2232D. There is no code that 
disable
this functionality. I can not find anything about if this is enabled or 
disabled by default.
I think it is safest to actively disable it.

The following patches is attached:

p0_ft2232.patch
Fixes item 1-5 above

p1_readme_configure.patch
Add test of libftdi for FT2232H/FT4232H support (version => 0.16)

p2_readme_ft2232_configure.patch
Renames the enable-ftd2xx-highspeed configure option to 
enable-ft2232-highspeed
because builds with libftdi are also supported. The BUILD_FTD2XX_HIGHSPEED
macro is renamed to BUILD_FT2232_HIGHSPEED for the same reason.

p3_ft2232.patch
Minimizes the conditional compiling that is dependent on the
BUILD_FT2232_HIGHSPEED macro.

I have tested both a libftdi and a FTD2XX build on a FT2232D (only a full 
speed chip)
equipped interface.
I have no acces to a FT2232H/FT4232H interface, so none tests have been 
done for
these devices.

The enable-ft2232-highspeed configure option could be removed so highspeed
inclusion is only dependent on the FT2232H/FT4232H support check of 
libftdi/FTD2XX.
This should be done after the code have been tested on a FT2232H/FT4232H 
interface.

Best regards
Jonas Hörberg



p0_ft2232.patch
Description: Binary data


p1_readme_configure.patch
Description: Binary data


p2_readme_ft2232_configure.patch
Description: Binary data


p3_ft2232.patch
Description: Binary data
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH] Add LPC1700 suport

2009-08-13 Thread Spencer Oliver
> 
> Finally my MCB1760 dev board from Keil arrived and I 
> programmed the support of LPC1768 with excitement. Attached 
> is a patch against trunk of R2578.
> LPC1700 flash support is made as an extension of LPC2000 
> driver with several tweaks. Also created tcl config files for 
> Keil MCB1760 board and LPC1768 target and updated 
> openocd.texi to reflect changes to lpc2000 driver.
> 
> Comments and criticisms are welcome.
> 

committed r2579 - many thanks.

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


Re: [Openocd-development] linux console will not out when openocdresume

2009-08-13 Thread loody
Hi:

2009/8/13 Nico Coesel :
> I don't think this is an openocd issue. The kernel has numerous interrupts 
> running. Generally speaking you can't halt a piece of software that uses 
> interrupts and expect it to resume normally.
>
> Nico Coesel
>
thanks for your reply.
But the same operations, halt then resume, will not let the console
stop response with FS2.
i agree with your comment that there are a lot interrupts running.
But some interrupts have to finish its job when the cpu is unlocked, like uart.
appreciate your help,
miloody
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH] Add LPC1700 suport

2009-08-13 Thread Rolf Meeser


--- Spencer Oliver  schrieb am Mi, 12.8.2009:

> Von: Spencer Oliver 
> Betreff: Re: [Openocd-development] [PATCH] Add LPC1700 suport
> An: "'Audrius Urmanavičius'" , "'openocd-devel'" 
> 
> Datum: Mittwoch, 12. August 2009, 21:13
> >
> > Hello List,
> > 
> > Finally my MCB1760 dev board from Keil arrived and I 
> > programmed the support of LPC1768 with excitement.
> Attached 
> > is a patch against trunk of R2578.
> > LPC1700 flash support is made as an extension of
> LPC2000 
> > driver with several tweaks. Also created tcl config
> files for 
> > Keil MCB1760 board and LPC1768 target and updated 
> > openocd.texi to reflect changes to lpc2000 driver.
> > 
> > Comments and criticisms are welcome.
> > 
> 
> Looks good thanks,
> Can someone test this does not break the other lpc
> variants, then i will
> commit.
> 
> Cheers
> Spen
>

Hi Spen,

I've just completed tests on LPC2478 (variant v2) and LPC2194 (variant v1). 
Everything works fine. As expected. it's working now on an LPC1768.

The patch also fixes the handling of return values, and therefore the part_id 
sub-command is now working. Thanks Audrius!

Regards,
Rolf



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


Re: [Openocd-development] linux console will not out when openocdresume

2009-08-13 Thread Nico Coesel
I don't think this is an openocd issue. The kernel has numerous interrupts 
running. Generally speaking you can't halt a piece of software that uses 
interrupts and expect it to resume normally.

Nico Coesel

> -Original Message-
> From: openocd-development-boun...@lists.berlios.de [mailto:openocd-
> development-boun...@lists.berlios.de] On Behalf Of loody
> Sent: donderdag 13 augustus 2009 9:35
> To: R.Doss
> Cc: Openocd-Dev
> Subject: Re: [Openocd-development] linux console will not out when
> openocdresume
> 
> HI:
> 
> 2009/8/13 R.Doss :
> > What do you undersand for linux?
> >  The kernel or also all around?
> >
> > You need a bootloader  and a rootfilesystem in addition to the kernel.
> Thanks for your reply.
> Maybe I need to describe my environment more clearly.
> I use initramfs as my root file system and use openocd to upload the
> whole kernel image, include root file system, to dram.
> Then set the pc to the kernel entry point, then execute.
> It works fine and I can get the console out.
> But my problem is if I halt openocd at this time then resume, the
> console will not get back.
> Sometimes I need to wait at least 1 min to get the console back, and
> sometimes it is fail.
> Is there any setting I need to take care?
> appreciate your help,
> miloody
> ___
> 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


Re: [Openocd-development] linux console will not out when openocd resume

2009-08-13 Thread loody
HI:

2009/8/13 R.Doss :
> What do you undersand for linux?
>  The kernel or also all around?
>
> You need a bootloader  and a rootfilesystem in addition to the kernel.
Thanks for your reply.
Maybe I need to describe my environment more clearly.
I use initramfs as my root file system and use openocd to upload the
whole kernel image, include root file system, to dram.
Then set the pc to the kernel entry point, then execute.
It works fine and I can get the console out.
But my problem is if I halt openocd at this time then resume, the
console will not get back.
Sometimes I need to wait at least 1 min to get the console back, and
sometimes it is fail.
Is there any setting I need to take care?
appreciate your help,
miloody
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development