Make error when attempting build of rawhid_test.exe using source code from pjrc.com

Status
Not open for further replies.

WallyB

New member
Issue
Make error when attempting build of rawhid_test.exe using source code from
http://www.pjrc.com/teensy/rawhid.html

Teensy 2.0 Hardware

Make Error
E:\Teensy\RawHID Source Code\rawhid_1\rawhid>make
I586-mingw32msvc-gcc –Wall -02 –Dos_WINDOWS -c -o rawhid_test.o rawhid_test.c
Process begin: CreateProcess<NULL, i586-mingw32msvc-gcc –Wall -02 –Dos_WINDOWS –c –o rawhid_test.o rawhid_test.c, …> failed
make <e=2>: The System cannot find the file specified.
Make: *** [rawhid_test.o] Error 2


Have installed on my computer:
WinAVR – 20100110
Microsoft Visual Studio 2010
WinRAR
7-Zip
Arduino

SYSTEM Information
OS Name Microsoft Windows 7 Professional
Version 6.1.7601 Service Pack 1 Build 7601
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Name DAD-PC
System Manufacturer To Be Filled By O.E.M.
System Model To Be Filled By O.E.M.
System Type x64-based PC
Processor Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz, 3401 Mhz, 4 Core(s), 4 Logical Processor(s)
BIOS Version/Date American Megatrends Inc. P1.40, 7/13/2012
SMBIOS Version 2.7
Windows Directory C:\Windows
System Directory C:\Windows\system32
Boot Device \Device\HarddiskVolume1
Locale United States
Hardware Abstraction Layer Version = "6.1.7601.17514"
User Name Dad-PC\Dad
Time Zone Eastern Standard Time
Installed Physical Memory (RAM) 16.0 GB
Total Physical Memory 15.7 GB
Available Physical Memory 14.1 GB
Total Virtual Memory 31.4 GB
Available Virtual Memory 27.0 GB
Page File Space 15.7 GB
Page File C:\pagefile.sys




Contents of E:\Teensy\RawHID Source Code\rawhid_1\rawhid directory

Using 7-Zip and WinRAR
Extracted source code from link : http://www.pjrc.com/teensy/rawhid.html

Followed instructions provided by pjrc.com.
Edited OS variable for WINDOWS within Makefile as instructed, using Microsoft Visual Studios 2010 as editor
(Tried to upload Makefile as attachment but was unsuccessful. Used pjrc.com downloaded Makefile with OS edited to WINDOWS)

Ran Make as instructed.

Please see attachments

Any Suggestions to build sample code .exe without error?


I was successful in loading the downloaded .hex and running the downloaded .exe example.
Just unable to build the .exe from the source code downloaded.

Thanks

WallyB
 

Attachments

  • hid..h
    219 bytes · Views: 122
  • hid_LINUX.c
    11.2 KB · Views: 442
  • hid_MACOSX.c
    11.5 KB · Views: 282
  • hid_WINDOWS.c
    8.3 KB · Views: 363
  • rawhid_test.c
    1.9 KB · Views: 177
  • DeviceMgr-1.jpg
    DeviceMgr-1.jpg
    102.7 KB · Views: 191
  • DeviceMgr-2.jpg
    DeviceMgr-2.jpg
    116.4 KB · Views: 175
i586-mingw32msvc-gcc is the part it can't find.
This is the compiler specified in the Makefile.
I have tried modifying the Makefile to point to the version of mingw32 gcc compiler I have installed on my Win7 machine and I get slightly further, but another error which I will post here later, stops me in my tracks.
I believe Mr. Stoffregen used linux to compile his executables. However I can't get the code to compile under Ubuntu 12.04 with mingw-w64. I will post those error messages also (I'm posting from my iPad at the moment).
My next step is to uninstall mingw-w64 from my Ubuntu vm and install the vanilla mingw to see if that gets me the ever elusive i586-mingw32msvc-gcc.
If Mr. Stoffregen could include a description of his build environment with the source code, that would help immensely.
Btw: I love my Teensy 3.0 and plan to get a 3.1 ASAP. :)
 
Last edited:
i586-mingw32msvc-gcc is the part it can't find.
This is the compiler specified in the Makefile.
I have tried modifying the Makefile to point to the version of mingw32 gcc compiler I have installed on my Win7 machine and I get slightly further, but another error which I will post here later, stops me in my tracks.
I believe Mr. Stoffregen used linux to compile his executables. However I can't get the code to compile under Ubuntu 12.04 with mingw-w64. I will post those error messages also (I'm posting from my iPad at the moment).
My next step is to uninstall mingw-w64 from my Ubuntu vm and install the vanilla mingw to see if that gets me the ever elusive i586-mingw32msvc-gcc.
If Mr. Stoffregen could include a description of his build environment with the source code, that would help immensely.
Btw: I love my Teensy 3.0 and plan to get a 3.1 ASAP. :)

I can now compile on a Windows7 64bit machine with mingw32 and gcc 4.8.1

I have attached a text file with my previously mentioned errors and the Makefile used to get the error.
It turns out that there is a function, "SetupDiGetInterfaceDeviceDetail" that is now deprecated. The function that should be used is "SetupDiGetDeviceInterfaceDetail" (please note the transposition of the words "Interface" and "Detail".
The deprecated function appears on line 201 of hid_WINDOWS.c and the current function appears on line 207. When the deprecated function was still supported, you could use either interchangeably. However, the way my system is setup, it knows nothing about the deprecated version of the function. Changing the function name at line 201 to the current named function allows the file to compile using the attached Makefile. (adding .txt where required for upload)

NOTE: I had to make a minor adjustment to the Makefile because mingw32 gcc on Windows automatically adds the .exe extension so the call to "strip" failed. I have attached my "corrected" hid_WINDOWS.c and the Makefile that compiled the code for me. Not only that, the resulting rawhid_test.exe works!
Now, on to modifying Mr. Stoffregen's code for my own plan. :cool:
 

Attachments

  • make error undefined reference to SetupDiGetDeviceInterfaceDetail.txt
    580 bytes · Views: 165
  • hid_WINDOWS.c
    8.3 KB · Views: 159
  • Makefile SetupDiGetDeviceInterfaceDetail error.txt
    1.3 KB · Views: 143
  • Makefile.txt
    1.4 KB · Views: 145
I am able to compile rawhid_test for all OS targets on my Ubuntu 12.04 32bit system.

I removed all the mingw64 packages and installed the exact packages specified in the original Makefile supplied by Mr. Stoffregen.
If you want to compile on Windows, the above information should help.
 
crstrand: Thank you for your work on this issue. When trying to compile your provided files, I am now seeing "This program can not start because zlib1.dll is missing from your computer. Try reinstalling the program to fix this problem". Attaching JPEGs.
Make Compile Error.jpgAfter Error OK.jpg. When researching a fix, I'm seeing mixed answers. Some as drastic as needing to reinstall the operating system. Any suggestions?
 
I suppose I was lucky I did not get the zlib1.dll error. The solution posted here: http://stackoverflow.com/questions/25542055/mingw-c-compiler-zlib1-dll-missing-error seems reasonable. It says to install the mingw32-libz dev and dll with the MinGW Installation Manager. I don't remember doing this, but there are more and more things I don't remember as time marches on. ;) I *do* know that I haven't added anything to MinGW in at least a year or two.
If you already have those things, then the problem is, obviously, more complicated.
 
Hi WallyB,

Kindly type (or better yet, paste) the installation path for WinAVR on your machine.

John
 
Status
Not open for further replies.
Back
Top