FTDI support in avrdude 6 (problems)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

FTDI support in avrdude 6 (problems)

Roman Volodchenko
Hello everybody,

My OS windows 7 64 bit/windows XP 32/64 bit.
Programmer: FT232RL+gate section. Schematics is here:
http://img-fotki.yandex.ru/get/5644/7864766.0/0_95f81_3bbbc5e_orig
Assembled version:
http://we.easyelectronics.ru/uploads/images/00/21/13/2012/10/03/49a5e4.jpg
 http://we.easyelectronics.ru/uploads/images/00/21/13/2012/10/03/789a41.jpg
It have simple 1 side board, no chicken and egg problem, very reliable (i
use it more than 1.5 years).
Article on russian (want to translate it to english):
http://we.easyelectronics.ru/AVR/usb-programmator-dlya-mikrokontrollerov-avr-na-baze-ft232-apu-2.html

First of all.
I downloaded mingw32 binary version (i tried all 6's builds) and it can't
start with next message:
avrdude: error: no pthread support. Please compile again with pthread
installed. See http://sourceware.org/pthreads-win32/.


So it's not working....
ok. Using ming32 (i tryied Cygwin also - bad result - it's build but not
working properly), src and there new problem.
If include libftdi support program can't be linked. ./configure result says
that there are pthread support, but compiler says next:
gcc -Wall -Wno-pointer-sign -g -O2 -DWIN32NATIVE  -static -o avrdude.exe
avrdude-main.o avrdude-term.o ./libavrdude.a -lusb-1.0  -lftdi1  -lhid
-lsetupapi  -lpthread -lm
./libavrdude.a(libavrdude_a-ft245r.o): In function `ft245r_close':
C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:642: undefined reference
to `_imp__pthread_cancel'
C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:643: undefined reference
to `_imp__pthread_join'
./libavrdude.a(libavrdude_a-ft245r.o): In function `add_to_buf':
C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:172: undefined reference
to `_imp__sem_wait'
C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:172: undefined reference
to `_imp__sem_post'
./libavrdude.a(libavrdude_a-ft245r.o): In function `reader':
C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:186: undefined reference
to `_imp__pthread_testcancel'
./libavrdude.a(libavrdude_a-ft245r.o): In function `ft245r_recv':
C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:213: undefined reference
to `_imp__sem_post'
C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:209: undefined reference
to `_imp__sem_wait'
./libavrdude.a(libavrdude_a-ft245r.o): In function `ft245r_open':
C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:613: undefined reference
to `_imp__sem_init'
C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:615: undefined reference
to `_imp__pthread_create'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [avrdude.exe] Error 1
make[2]: Leaving directory `/home/user/avrdude-6.0.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/avrdude-6.0.1'
make: *** [all] Error 2

Also, looking in internet says that compiler option -lpthread should to be
in end of command.

After that i disable static linking and it's linked. I copied dll,
avrdude.exe and conf file to my folder and try to work with MCU. There are
new surprises:
1. New config format - ok. I made need changes.
2. avrdude didn't see ft programmer without changing standart ftdi inf file
to inf maded by libusb utilites. It's really bad - because FT232RL have
many pins and can be used as virtual com-port. But if i change inf file - i
can't acces to ft COMport. I have to delete device, update it inf to
standart - after that i can use COM-port, and can't use it as programmer....
There are patched avrdude 5 version with ftdi support - there is no this
problem. Plug ftdi, standart inf and you have working programmer with
COMport. And can used it.
3. After changing fuses avrdude can't see device, but when i tried to read
- it's working normall. I think delay needed little bit more.

Good news - 6 version working little bit faster (The same size flash write
on 5 version need 0.9 seconds, 6 version need 0.7 seconds). eeprom reading
problem was fixed (5 version have this problem). Also i tried to changes
fuses (switch working frequency from 1 to 8 MHz) - it's changed ok with one
problem (number 3 upper).

P.S. Can test ftdi part in future...

Roman Volodchenko
_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: FTDI support in avrdude 6 (problems)

René Liebscher
Hi Roman,

the problem with the provided binary is probably the fact that the
cross-compiling did not found the pthread library. (MinGW on Window
usually provides it.)

About libusb: As the windows ftdi library is not open source it was
decided to use libusb and libftdi on Windows too. So you either install
a libusb device driver or try the libusb filter driver
(http://sourceforge.net/apps/trac/libusb-win32/wiki).


René


On 07.03.2014 08:13, Roman Volodchenko wrote:

> Hello everybody,
>
> My OS windows 7 64 bit/windows XP 32/64 bit.
> Programmer: FT232RL+gate section. Schematics is here:
> http://img-fotki.yandex.ru/get/5644/7864766.0/0_95f81_3bbbc5e_orig
> Assembled version:
> http://we.easyelectronics.ru/uploads/images/00/21/13/2012/10/03/49a5e4.jpg
>  http://we.easyelectronics.ru/uploads/images/00/21/13/2012/10/03/789a41.jpg
> It have simple 1 side board, no chicken and egg problem, very reliable (i
> use it more than 1.5 years).
> Article on russian (want to translate it to english):
> http://we.easyelectronics.ru/AVR/usb-programmator-dlya-mikrokontrollerov-avr-na-baze-ft232-apu-2.html
>
> First of all.
> I downloaded mingw32 binary version (i tried all 6's builds) and it can't
> start with next message:
> avrdude: error: no pthread support. Please compile again with pthread
> installed. See http://sourceware.org/pthreads-win32/.
>
>
> So it's not working....
> ok. Using ming32 (i tryied Cygwin also - bad result - it's build but not
> working properly), src and there new problem.
> If include libftdi support program can't be linked. ./configure result says
> that there are pthread support, but compiler says next:
> gcc -Wall -Wno-pointer-sign -g -O2 -DWIN32NATIVE  -static -o avrdude.exe
> avrdude-main.o avrdude-term.o ./libavrdude.a -lusb-1.0  -lftdi1  -lhid
> -lsetupapi  -lpthread -lm
> ./libavrdude.a(libavrdude_a-ft245r.o): In function `ft245r_close':
> C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:642: undefined reference
> to `_imp__pthread_cancel'
> C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:643: undefined reference
> to `_imp__pthread_join'
> ./libavrdude.a(libavrdude_a-ft245r.o): In function `add_to_buf':
> C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:172: undefined reference
> to `_imp__sem_wait'
> C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:172: undefined reference
> to `_imp__sem_post'
> ./libavrdude.a(libavrdude_a-ft245r.o): In function `reader':
> C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:186: undefined reference
> to `_imp__pthread_testcancel'
> ./libavrdude.a(libavrdude_a-ft245r.o): In function `ft245r_recv':
> C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:213: undefined reference
> to `_imp__sem_post'
> C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:209: undefined reference
> to `_imp__sem_wait'
> ./libavrdude.a(libavrdude_a-ft245r.o): In function `ft245r_open':
> C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:613: undefined reference
> to `_imp__sem_init'
> C:\mingw\msys\1.0\home\user\avrdude-6.0.1/ft245r.c:615: undefined reference
> to `_imp__pthread_create'
> collect2.exe: error: ld returned 1 exit status
> make[2]: *** [avrdude.exe] Error 1
> make[2]: Leaving directory `/home/user/avrdude-6.0.1'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/user/avrdude-6.0.1'
> make: *** [all] Error 2
>
> Also, looking in internet says that compiler option -lpthread should to be
> in end of command.
>
> After that i disable static linking and it's linked. I copied dll,
> avrdude.exe and conf file to my folder and try to work with MCU. There are
> new surprises:
> 1. New config format - ok. I made need changes.
> 2. avrdude didn't see ft programmer without changing standart ftdi inf file
> to inf maded by libusb utilites. It's really bad - because FT232RL have
> many pins and can be used as virtual com-port. But if i change inf file - i
> can't acces to ft COMport. I have to delete device, update it inf to
> standart - after that i can use COM-port, and can't use it as programmer....
> There are patched avrdude 5 version with ftdi support - there is no this
> problem. Plug ftdi, standart inf and you have working programmer with
> COMport. And can used it.
> 3. After changing fuses avrdude can't see device, but when i tried to read
> - it's working normall. I think delay needed little bit more.
>
> Good news - 6 version working little bit faster (The same size flash write
> on 5 version need 0.9 seconds, 6 version need 0.7 seconds). eeprom reading
> problem was fixed (5 version have this problem). Also i tried to changes
> fuses (switch working frequency from 1 to 8 MHz) - it's changed ok with one
> problem (number 3 upper).
>
> P.S. Can test ftdi part in future...
>
> Roman Volodchenko
> _______________________________________________
> avrdude-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/avrdude-dev
>


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev