<div dir="ltr"><div><div><div><div><div>Hi there,<br><br></div><div>First thanks for your reply, helped me out on where to look, it was libftdi<br></div>So after doing some research here and there, it looks like the libftdi was not installed right (even tho all the files were in the correct place), anyway by doing a libftdi.pc and pointing to the files i was able to compile the last version of flashrom<br></div>But i get the same thing problem...<br><span class="im"><br>Microsoft Windows [version 10.0.10240]<br>(c) 2015 Microsoft Corporation. Tous droits réservés.<br><br><span style="color:rgb(255,0,0)">C:\flashrom>flashrom</span><br>flashrom v0.9.8-r1888 on Windows 6.2 (x86)<br>flashrom is free software, get the source code at <a href="http://www.flashrom.org">http://www.flashrom.org</a><br><br>Please select a programmer with the --programmer parameter.<br>Previously this was not necessary because there was a default set.<br>Valid choices are:<br>dummy, ft2232_spi, serprog, buspirate_spi, pony_spi, usbblaster_spi,<br>pickit2_spi.<br><span style="color:rgb(255,0,0)"><br>C:\flashrom>flashrom -p ft2232_spi:type=2232H,port=A</span><br>flashrom v0.9.8-r1888 on Windows 6.2 (x86)<br>flashrom is free software, get the source code at <a href="http://www.flashrom.org">http://www.flashrom.org</a><br><br>Calibrating delay loop... OK.<br>No EEPROM/flash device found.<br>Note: flashrom can never write if the flash chip isn't found automatically.<br><span style="color:rgb(255,0,0)"><br>C:\flashrom>flashrom -p ft2232_spi:type=2232H,port=B</span><br>flashrom v0.9.8-r1888 on Windows 6.2 (x86)<br>flashrom is free software, get the source code at <a href="http://www.flashrom.org">http://www.flashrom.org</a><br><br>Calibrating delay loop... OK.<br>Unable to reset FTDI device (USB device unavailable).<br>Unable to set latency timer (USB device unavailable).<br>Unable to set bitmode to SPI (USB device unavailable).<br>ftdi_write_data: -666, USB device unavailable<br>Error: Programmer initialization failed.<br><br></span></div><span style="color:rgb(0,0,0)"><span class="im"></span></span></div><span class="im"><span style="color:rgb(0,0,0)">Anyway now that i got it compiled and since it looks like port A works and not port B? i guess ?<br>Could you give me advices on how to make flashrom work with my flash chip MACRONIX_MX25L25635F? <br>I need to modify and add the informations to flashchips.c? What about the 24 and 32bits difference?<br><br>Thanks again for your help <br></span></span></div><span class="im"><span style="color:rgb(0,0,0)">Best Regards</span><br></span><div><div><div><div><div><span class="im"></span></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-02 21:01 GMT+01:00 Stefan Tauner <span dir="ltr"><<a href="mailto:stefan.tauner@alumni.tuwien.ac.at" target="_blank">stefan.tauner@alumni.tuwien.ac.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, 2 Feb 2016 19:43:26 +0100<br>
Bio <<a href="mailto:zackwarrior@gmail.com">zackwarrior@gmail.com</a>> wrote:<br>
<br>
> Hello,<br>
><br>
> I'm having trouble with flashrom, i have a working ft2232 board and i<br>
> correctly connected a spi flash on it on port A<br>
> I also correctly installed the libusb drivers for the board<br>
> So i found a compiled version of flashrom for windows v0.9.6.1-r1705<br>
> I run it with this command<br>
> flashrom -p ft2232_spi:type=2232H,port=A<br>
> And i get this:<br>
> flashrom v0.9.6.1-r1704 on Windows 6.1 (x86)<br>
> flashrom is free software, get the source code at <a href="http://www.flashrom.org" rel="noreferrer" target="_blank">http://www.flashrom.org</a><br>
><br>
> Calibrating delay loop... OK.<br>
> No EEPROM/flash device found.<br>
> Note: flashrom can never write if the flash chip isn't found automatically.<br>
<br>
</span>That does not tell much... the suspicion you wrote further below is<br>
correct.<br>
<span class=""><br>
> I then decided to try port B, so i wired the flash chip on port B and<br>
> used this command<br>
> flashrom -p ft2232_spi:type=2232H,port=B<br>
> And i get this:<br>
> flashrom v0.9.6.1-r1704 on Windows 6.1 (x86)<br>
> flashrom is free software, get the source code at <a href="http://www.flashrom.org" rel="noreferrer" target="_blank">http://www.flashrom.org</a><br>
><br>
> Calibrating delay loop... OK.<br>
> Unable to reset FTDI device (USB device unavailable).<br>
> Unable to set latency timer (USB device unavailable).<br>
> Unable to set bitmode to SPI (USB device unavailable).<br>
> ftdi_write_data: -666, USB device unavailable<br>
> Error: Programmer initialization failed.<br>
<br>
</span>That looks a bit fishy but might have been fixed in the meantime. I<br>
would like to see the output for the same command line with a current<br>
version...<br>
<span class=""><br>
> The chip i'm trying to work with is a MACRONIX_MX25L25635F, specified in<br>
> the flashchips.h line 478 of the source code v0.9.8<br>
> #define MACRONIX_MX25L25635F    0x2019    /* Same as MX25L25639F, but<br>
> the latter seems to not support REMS */<br>
><br>
> So i decided to cross compile the new version 0.9.8 for windows thinking<br>
> that maybe the v0.9.6.1 doesn't recognise my chip ?<br>
<br>
</span>Yes, indeed. And the current one won't help you either. The problem is<br>
that this chip requires 32 bit addresses instead of the 24 bit address<br>
used up to now in SPI flash chips. flashrom does not support this yet<br>
and so supporting your chip is not feasibly right now. There exist some<br>
patches though that would make it work.<br>
<span class=""><br>
> Anyway i installed mingw and used msys64 to get all the packages and<br>
> update everything correctly, i also put the libusb and libftdi in the<br>
> bin, lib and include directory, i think everything is installed<br>
> correctly but...<br>
</span>> When i try to compileflashrom with make i get this error<br>
<span class="">> $ make<br>
> Files don't seem to be under version control. Replacing all version<br>
> templates with 0.9.8-r1888.<br>
> Package libftdi was not found in the pkg-config search path.<br>
> Perhaps you should add the directory containing `libftdi.pc'<br>
> to the PKG_CONFIG_PATH environment variable<br>
> No package 'libftdi' found<br>
> Checking for a C compiler... found.<br>
> Target arch is x86<br>
> Target OS is MinGW<br>
> Checking for libusb-0.1/libusb-compat headers... found.<br>
> Checking if libusb-0.1 is usable... yes.<br>
> Checking for FTDI support... found.<br>
> Checking for FT232H support in libftdi... not found.<br>
> Checking for utsname support... not found.<br>
> make[1]: Entering directory `/c/flashrom/util/ich_descriptors_tool'<br>
> make[1]: Nothing to be done for `all'.<br>
> make[1]: Leaving directory `/c/flashrom/util/ich_descriptors_tool'<br>
<br>
</span>I don't see an error. The pkgconfig message is not an error..<br>
<div><div class="h5"><br>
> And if i try with make CC=i686-w64-mingw32-gcc i get this error<br>
> $ make CC=i686-w64-mingw32-gcc<br>
> Files don't seem to be under version control. Replacing all version<br>
> templates with 0.9.8-r1888.<br>
> Package libftdi was not found in the pkg-config search path.<br>
> Perhaps you should add the directory containing `libftdi.pc'<br>
> to the PKG_CONFIG_PATH environment variable<br>
> No package 'libftdi' found<br>
> Checking for a C compiler... found.<br>
> Target arch is x86<br>
> Target OS is MinGW<br>
> Checking for libusb-0.1/libusb-compat headers... In file included from<br>
> c:/MinGW/i686-w64-mingw32/include/stddef.h:7:0,<br>
>                   from<br>
> c:/MinGW/lib/gcc/i686-w64-mingw32/5.2.0/include/stddef.h:1,<br>
>                   from c:/MinGW/include/stdlib.h:22,<br>
>                   from c:/MinGW/include/lusb0_usb.h:4,<br>
>                   from .test.c:3:<br>
> c:/MinGW/i686-w64-mingw32/include/crtdefs.h:123:19: error: expected '=',<br>
> ',', ';', 'asm' or '__attribute__' before 'typedef'<br>
>   __MINGW_EXTENSION typedef __int64 __time64_t;<br>
>                     ^<br>
> c:/MinGW/i686-w64-mingw32/include/crtdefs.h:138:9: error: unknown type<br>
> name '__time64_t'<br>
>   typedef __time64_t time_t;<br>
>           ^<br>
> not found.<br>
><br>
> Please install libusb-0.1 headers or libusb-compat headers.<br>
> See README for more information.<br>
><br>
> make: *** [hwlibs] Error 1<br>
><br>
> Could you help me out to compile le latest version of flashrom please ?<br>
<br>
</div></div>Sounds like a bug in mingw or libusb to me... cross-compiling with<br>
mingw under Linux for Windows should work fine since a long time ago.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Kind regards/Mit freundlichen Grüßen, Stefan Tauner<br>
</font></span></blockquote></div><br></div>