no luck with building dfu-util for windows

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

no luck with building dfu-util for windows

Daniel Li
Mail
Hi All,
 
I want to build dfu-util for windows.
 
But no luck with following links, any one has been successfully build a image for windows?
 

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: no luck with building dfu-util for windows

Tormod Volden
Hi Daniel,

Did you try the "windows" branch of the git repo?
http://cgit.openezx.org/dfu-util/log/?h=windows
What kind of compiler/environment did you try?

Once you have it built, there is the driver and libusb installation as
well. For libusb 1.0 on Windows, this might be the best reference:
http://www.libusb.org/wiki/windows_backend
If I understand it right, you can use Zadig.exe to install/register
the WinUSB driver for your device. Then libusb will access the device
through winusb.dll.

Tormod

2012/4/5 Daniel Li <[hidden email]>:

> Hi All,
>
> I want to build dfu-util for windows.
>
> But no luck with following links, any one has been successfully build a
> image for windows?
>
> http://wiki.openmoko.org/wiki/Dfu-util-windows
> http://openmoko-public-mailinglists.1958.n2.nabble.com/Build-dfu-util-for-Windows-td6980736.html;cid=1333628129968-793
>
> _______________________________________________
> devel mailing list
> [hidden email]
> https://lists.openmoko.org/mailman/listinfo/devel
>

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: no luck with building dfu-util for windows

Daniel Li
Hi, Tormod Volden


>Hi Daniel,
>
>Did you try the "windows" branch of the git repo?
>http://cgit.openezx.org/dfu-util/log/?h=windows 
>What kind of compiler/environment did you try?

==> I have VS2005/Cygwin/ubuntu(Vmware) installed. And thanks for you info. This is a great link, i'll try tonight.

>
>Once you have it built, there is the driver and libusb installation as
>well. For libusb 1.0 on Windows, this might be the best reference:
>http://www.libusb.org/wiki/windows_backend 
>If I understand it right, you can use Zadig.exe to install/register
>the WinUSB driver for your device. Then libusb will access the device
>through winusb.dll.
>
>Tormod
>
_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: no luck with building dfu-util for windows

Daniel Li
In reply to this post by Tormod Volden
Hi Tormod Volden,


I have get windows dfu-util source and start to use vs2005 to build dfu-util. And got following compile error:

1>dfu.c
1>z:\openmoko\dfu-util\src\dfu.c(24) : fatal error C1083: Cannot open include file: 'libusb.h': No such file or directory

And I don't know how to build libusb-1.0.8 with VS2005, so I tried cygwin, and got following error:

$ make
make  all-recursive
make[1]: Entering directory `/cygdrive/d/OpenMoko/libusb-1.0.8'
Making all in libusb
make[2]: Entering directory `/cygdrive/d/OpenMoko/libusb-1.0.8/libusb'
  CC     libusb_1_0_la-io.lo
gcc: unrecognized option '-pthread'
io.c:1:0: warning: -fPIC ignored for target (all code is position independent)
io.c: In function ‘calculate_timeout’:
io.c:1083:2: error: implicit declaration of function ‘TIMESPEC_TO_TIMEVAL’
Makefile:375: recipe for target `libusb_1_0_la-io.lo' failed
make[2]: *** [libusb_1_0_la-io.lo] Error 1
make[2]: Leaving directory `/cygdrive/d/OpenMoko/libusb-1.0.8/libusb'
Makefile:358: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/d/OpenMoko/libusb-1.0.8'
Makefile:265: recipe for target `all' failed
make: *** [all] Error 2


Any idea or suggestion to make this right?



>Hi Daniel,
>
>Did you try the "windows" branch of the git repo?
>http://cgit.openezx.org/dfu-util/log/?h=windows 
>What kind of compiler/environment did you try?
>
>Once you have it built, there is the driver and libusb installation as
>well. For libusb 1.0 on Windows, this might be the best reference:
>http://www.libusb.org/wiki/windows_backend 
>If I understand it right, you can use Zadig.exe to install/register
>the WinUSB driver for your device. Then libusb will access the device
>through winusb.dll.
>
>Tormod
>
>2012/4/5 Daniel Li :
>> Hi All,
>>
>> I want to build dfu-util for windows.
>>
>> But no luck with�following links, any one has been successfully build a
>> image for windows?
>>
>> http://wiki.openmoko.org/wiki/Dfu-util-windows 
>> http://openmoko-public-mailinglists.1958.n2.nabble.com/Build-dfu-util-for-Windows-td6980736.html;cid=1333628129968-793 
>>
>> _______________________________________________
>> devel mailing list
>> [hidden email]
>> https://lists.openmoko.org/mailman/listinfo/devel 
>>
>
>
>-----
>No virus found in this message.
>Checked by AVG - www.avg.com
>Version: 2012.0.1913 / Virus Database: 2409/4914 - Release Date: 04/04/12
>
>

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: no luck with building dfu-util for windows

Tormod Volden
2012/4/6 Daniel Li:
> Hi Tormod Volden,
>
>
> I have get windows dfu-util source and start to use vs2005 to build dfu-util. And got following compile error:
>
> 1>dfu.c
> 1>z:\openmoko\dfu-util\src\dfu.c(24) : fatal error C1083: Cannot open include file: 'libusb.h': No such file or directory

The wiki page says "To create projects relying on libusb 1.0, please
refer to how the example executables (lsusb, xusb) are compiled".
Maybe they explain how to let the compiler find your libusb headers.

>
> And I don't know how to build libusb-1.0.8 with VS2005, so I tried cygwin, and got following error:

Don't use the 1.0.8 release (it is several years old), you have to use
latest git.

Have you tried the binary snapshots? They probably include header files as well.

I have no experience with building libusb or libusb applications on
Windows, I only have the info from that wiki page.


Tormod

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rs: Re: Re: Re: no luck with building dfu-util for windows

Daniel Li
Mail
Hi all,

I downloaded libusb-win32-bin-1.2.6.0.zip, and extract the only head file "lusb0_usb.h" and msvc library libusb.lib.

As dfu-util uses libusb.h, I guess it's the only head file "lusb0_usb.h"

But vc6 can't compile dfu-util sucessfully, see below log:

Any idea about this log???

--------------------Configuration: dfu_util - Win32 Debug--------------------
Compiling...
dfu.c
z:\openmoko\dfu-util\src\dfu.h(120) : error C2061: syntax error : identifier 'libusb_device'
z:\openmoko\dfu-util\src\dfu.h(121) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(122) : error C2059: syntax error : '}'
z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(127) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(128) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(130) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(132) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(134) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(136) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(138) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(139) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.c(73) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.c(73) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.c(74) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.c(75) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.c(102) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.c(102) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.c(103) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.c(105) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.c(158) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.c(158) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.c(159) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.c(161) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.c(204) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.c(204) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.c(205) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.c(206) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.c(251) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.c(251) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.c(252) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.c(252) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.c(279) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.c(279) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.c(280) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.c(280) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.c(315) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.c(315) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.c(316) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.c(316) : error C2059: syntax error : ')'
dfu_load.c
z:\openmoko\dfu-util\src\dfu.h(120) : error C2061: syntax error : identifier 'libusb_device'
z:\openmoko\dfu-util\src\dfu.h(121) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(122) : error C2059: syntax error : '}'
z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(127) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(128) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(130) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(132) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(134) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(136) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(138) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(139) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing ')' before '*'
z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing '{' before '*'
z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : 'type'
z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : ')'
z:\openmoko\dfu-util\src\dfu_load.c(60) : warning C4013: 'dfu_upload' undefined; assuming extern returning int
z:\openmoko\dfu-util\src\dfu_load.c(60) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
z:\openmoko\dfu-util\src\dfu_load.c(60) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
z:\openmoko\dfu-util\src\dfu_load.c(141) : warning C4013: 'dfu_download' undefined; assuming extern returning int
z:\openmoko\dfu-util\src\dfu_load.c(141) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
z:\openmoko\dfu-util\src\dfu_load.c(141) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
z:\openmoko\dfu-util\src\dfu_load.c(149) : warning C4013: 'dfu_get_status' undefined; assuming extern returning int
z:\openmoko\dfu-util\src\dfu_load.c(149) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
z:\openmoko\dfu-util\src\dfu_load.c(149) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
z:\openmoko\dfu-util\src\dfu_load.c(191) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
z:\openmoko\dfu-util\src\dfu_load.c(191) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
z:\openmoko\dfu-util\src\dfu_load.c(204) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
z:\openmoko\dfu-util\src\dfu_load.c(204) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
dfuse.c
z:\openmoko\dfu-util\src\dfuse.c(32) : fatal error C1083: Cannot open include file: 'config.h': No such file or directory
main.c
z:\openmoko\dfu-util\src\main.c(30) : fatal error C1083: Cannot open include file: 'config.h': No such file or directory
Error executing cl.exe.

dfu_util.exe - 102 error(s), 3 warning(s)

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Re: no luck with building dfu-util for windows

Daniel Li
In reply to this post by Tormod Volden
Hi all,
Anyway, I have been sucessfully build dfu-util with cygwin, which has libusb1.0
But it can program the device, any idea about this issue? Why dfu-util can't open the device?
$ ./dfu-util.exe -l
dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Found Runtime: [0x0a5c:0x217f] devnum=0, cfg=1, intf=3, alt=0, name="UNDEFINED"
Found Runtime: [0x1d50:0x5119] devnum=0, cfg=1, intf=2, alt=0, name="UNDEFINED"


$ ./dfu-util.exe -d 0x1d50:0x5119 -a u-boot -R -D qi-ubi-s3c2442-1.0.2-r5+gitr0+c38b062a609f1442e6a9e13005cfbdfd59a5ac0d.udfu
dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Filter on vendor = 0x1d50 product = 0x5119
Cannot open device
Opening DFU USB device...
_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Re: no luck with building dfu-util for windows

Tormod Volden
In reply to this post by Tormod Volden
2012/4/7 Daniel Li:
> Hi all,
>
> I downloaded libusb-win32-bin-1.2.6.0.zip, and extract the only head file "lusb0_usb.h" and msvc library libusb.lib.
>
> As dfu-util uses libusb.h, I guess it's the only head file "lusb0_usb.h"
>
> But vc6 can't compile dfu-util sucessfully, see below log:
>
> Any idea about this log???

libusb-win32-bin-1.2.6.0.zip follows the libusb 0.1 API, while
dfu-util (now) uses libusb 1.0. So the compiler does not recognize
"libusb_device" which is part of libusb 1.0.

The snapshots I had in mind are those linked under "Latest Binary
Snapshots" on the previously mentioned wiki page, libusb_2012.01.08.7z
(pbr348) and so on.

Tormod



>
> --------------------Configuration: dfu_util - Win32 Debug--------------------
> Compiling...
> dfu.c
> z:\openmoko\dfu-util\src\dfu.h(120) : error C2061: syntax error : identifier 'libusb_device'
> z:\openmoko\dfu-util\src\dfu.h(121) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(122) : error C2059: syntax error : '}'
> z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(127) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(128) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(130) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(132) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(134) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(136) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(138) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(139) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(73) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(73) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(74) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(75) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(102) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(102) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(103) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(105) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(158) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(158) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(159) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(161) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(204) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(204) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(205) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(206) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(251) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(251) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(252) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(252) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(279) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(279) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(280) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(280) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(315) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(315) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(316) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(316) : error C2059: syntax error : ')'
> dfu_load.c
> z:\openmoko\dfu-util\src\dfu.h(120) : error C2061: syntax error : identifier 'libusb_device'
> z:\openmoko\dfu-util\src\dfu.h(121) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(122) : error C2059: syntax error : '}'
> z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(127) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(128) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(130) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(132) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(134) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(136) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(138) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(139) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu_load.c(60) : warning C4013: 'dfu_upload' undefined; assuming extern returning int
> z:\openmoko\dfu-util\src\dfu_load.c(60) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(60) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(141) : warning C4013: 'dfu_download' undefined; assuming extern returning int
> z:\openmoko\dfu-util\src\dfu_load.c(141) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(141) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(149) : warning C4013: 'dfu_get_status' undefined; assuming extern returning int
> z:\openmoko\dfu-util\src\dfu_load.c(149) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(149) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(191) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(191) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(204) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(204) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> dfuse.c
> z:\openmoko\dfu-util\src\dfuse.c(32) : fatal error C1083: Cannot open include file: 'config.h': No such file or directory
> main.c
> z:\openmoko\dfu-util\src\main.c(30) : fatal error C1083: Cannot open include file: 'config.h': No such file or directory
> Error executing cl.exe.
>
> dfu_util.exe - 102 error(s), 3 warning(s)

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Re: no luck with building dfu-util for windows

Tormod Volden
In reply to this post by Daniel Li
2012/4/7 Daniel Li:
> Hi all,
> Anyway, I have been sucessfully build dfu-util with cygwin, which has libusb1.0

Great to hear!

> But it can program the device, any idea about this issue? Why dfu-util can't open the device?
> $ ./dfu-util.exe -l
> dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
> This program is Free Software and has ABSOLUTELY NO WARRANTY
>
> dfu-util does currently only support DFU version 1.0
>
> Found Runtime: [0x0a5c:0x217f] devnum=0, cfg=1, intf=3, alt=0, name="UNDEFINED"
> Found Runtime: [0x1d50:0x5119] devnum=0, cfg=1, intf=2, alt=0, name="UNDEFINED"
>

This looks like a permission issue, when the alternate interface name
is "UNDEFINED" it is because dfu-util could not read it out. From your
command line below, I would expect the correct name to be "u-boot".

Do you have lsusb in your environment? If lsusb -v can not read out
the name either (listed after iInterface), there is a permission
issue.

Tormod


>
> $ ./dfu-util.exe -d 0x1d50:0x5119 -a u-boot -R -D qi-ubi-s3c2442-1.0.2-r5+gitr0+c38b062a609f1442e6a9e13005cfbdfd59a5ac0d.udfu
> dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
> This program is Free Software and has ABSOLUTELY NO WARRANTY
>
> dfu-util does currently only support DFU version 1.0
>
> Filter on vendor = 0x1d50 product = 0x5119
> Cannot open device
> Opening DFU USB device...

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Re: Re: no luck with building dfu-util for windows

Daniel Li
Tormod Volden,

Well, I didn't get luck.

So I have fixed my Celeron (Coppermine), which is 700MHz GenuineIntel processor. Re-install ubuntu 8.04.

It's ok to flash the device now.

If there is any good way to build dfu-util with clear guide (windows xp), I wish to try then.

>2012/4/7 Daniel Li:
>> Hi all,
>> Anyway, I have been sucessfully build dfu-util with cygwin, which has libusb1.0
>
>Great to hear!
>
>> But it can program the device, any idea about this issue? Why dfu-util can't open the device?
>> $ ./dfu-util.exe -l
>> dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
>> This program is Free Software and has ABSOLUTELY NO WARRANTY
>>
>> dfu-util does currently only support DFU version 1.0
>>
>> Found Runtime: [0x0a5c:0x217f] devnum=0, cfg=1, intf=3, alt=0, name="UNDEFINED"
>> Found Runtime: [0x1d50:0x5119] devnum=0, cfg=1, intf=2, alt=0, name="UNDEFINED"
>>
>
>This looks like a permission issue, when the alternate interface name
>is "UNDEFINED" it is because dfu-util could not read it out. From your
>command line below, I would expect the correct name to be "u-boot".
>
>Do you have lsusb in your environment? If lsusb -v can not read out
>the name either (listed after iInterface), there is a permission
>issue.
>
>Tormod
>
>
>>
>> $ ./dfu-util.exe -d 0x1d50:0x5119 -a u-boot -R -D qi-ubi-s3c2442-1.0.2-r5+gitr0+c38b062a609f1442e6a9e13005cfbdfd59a5ac0d.udfu
>> dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
>> This program is Free Software and has ABSOLUTELY NO WARRANTY
>>
>> dfu-util does currently only support DFU version 1.0
>>
>> Filter on vendor = 0x1d50 product = 0x5119
>> Cannot open device
>> Opening DFU USB device...
>
>
>-----
>No virus found in this message.
>Checked by AVG - www.avg.com
>Version: 2012.0.1913 / Virus Database: 2411/4923 - Release Date: 04/08/12
>
_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Re: Re: no luck with building dfu-util for windows

Tormod Volden
2012/4/15 Daniel Li:

> Tormod Volden,
>
> Well, I didn't get luck.
>
> So I have fixed my Celeron (Coppermine), which is 700MHz GenuineIntel processor. Re-install ubuntu 8.04.
>
> It's ok to flash the device now.
>
> If there is any good way to build dfu-util with clear guide (windows xp), I wish to try then.
>

If you are using MS Visual Studio, it might work to grab the .dsp
project file from
http://cgit.openezx.org/dfu-util/tree/win/dfu_util.dsp?h=windows and
add it to a new subfolder (e.g. msvc) of my tree. For those interested
in building on Windows, I'd suggest to look at how it is done for
libusb-1.0. I see that they ship a separate stdint.h for Windows
builds, so if you get errors about missing stdint.h, try adding that
file: http://git.libusb.org/?p=libusb.git;a=blob;f=msvc/stdint.h;hb=HEAD

When building dfu-util you have to tell the compiler where to find the
libusb.h headers and the libusb library (.so, .dylib, .dll etc) but I
do not know how that is done in Visual Studio etc.

In general, dfu-util almost only depends on libusb, so we should make
it possible to build dfu-util on all platforms where libusb builds. We
can use the same porting tweaks as libusb. But we will need someone to
test and keep these ports alive.

Tormod


>>2012/4/7 Daniel Li:
>>> Hi all,
>>> Anyway, I have been sucessfully build dfu-util with cygwin, which has libusb1.0
>>
>>Great to hear!
>>
>>> But it can program the device, any idea about this issue? Why dfu-util can't open the device?
>>> $ ./dfu-util.exe -l
>>> dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
>>> This program is Free Software and has ABSOLUTELY NO WARRANTY
>>>
>>> dfu-util does currently only support DFU version 1.0
>>>
>>> Found Runtime: [0x0a5c:0x217f] devnum=0, cfg=1, intf=3, alt=0, name="UNDEFINED"
>>> Found Runtime: [0x1d50:0x5119] devnum=0, cfg=1, intf=2, alt=0, name="UNDEFINED"
>>>
>>
>>This looks like a permission issue, when the alternate interface name
>>is "UNDEFINED" it is because dfu-util could not read it out. From your
>>command line below, I would expect the correct name to be "u-boot".
>>
>>Do you have lsusb in your environment? If lsusb -v can not read out
>>the name either (listed after iInterface), there is a permission
>>issue.
>>
>>Tormod
>>
>>
>>>
>>> $ ./dfu-util.exe -d 0x1d50:0x5119 -a u-boot -R -D qi-ubi-s3c2442-1.0.2-r5+gitr0+c38b062a609f1442e6a9e13005cfbdfd59a5ac0d.udfu
>>> dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
>>> This program is Free Software and has ABSOLUTELY NO WARRANTY
>>>
>>> dfu-util does currently only support DFU version 1.0
>>>
>>> Filter on vendor = 0x1d50 product = 0x5119
>>> Cannot open device
>>> Opening DFU USB device...
>>
>>
>>-----
>>No virus found in this message.
>>Checked by AVG - www.avg.com
>>Version: 2012.0.1913 / Virus Database: 2411/4923 - Release Date: 04/08/12
>>

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Loading...