<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I'm having trouble with flashrom, i have a working ft2232 board and
    i 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>
    <font color="#009900">flashrom -p ft2232_spi:type=2232H,port=A</font><br>
    And i get this:<br>
    <font color="#3333ff">flashrom v0.9.6.1-r1704 on Windows 6.1 (x86)<br>
      flashrom is free software, get the source code at
      <a class="moz-txt-link-freetext" 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.</font><br>
    <br>
    I then decided to try port B, so i wired the flash chip on port B
    and used this command<br>
    <font color="#009900">flashrom -p ft2232_spi:type=2232H,port=B</font><br>
    And i get this:<br>
    <font color="#3333ff">flashrom v0.9.6.1-r1704 on Windows 6.1 (x86)<br>
      flashrom is free software, get the source code at
      <a class="moz-txt-link-freetext" 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>
      <font color="#000000">The chip i'm trying to work with is a
        MACRONIX_MX25L25635F, specified in the flashchips.h line 478 of
        the source code v0.9.8</font><br>
      <font color="#ff6600">#define MACRONIX_MX25L25635F    0x2019    /*
        Same as MX25L25639F, but the latter seems to not support REMS */</font><br>
      <font color="#000000"><br>
        So i decided to cross compile the new version 0.9.8 for windows
        thinking that maybe the v0.9.6.1 doesn't recognise my chip ?<br>
        Anyway i installed mingw and used msys64 to get all the packages
        and update everything correctly, i also put the libusb and
        libftdi in the bin, lib and include directory, i think
        everything is installed correctly but...<br>
        When i try to compile</font></font><font color="#3333ff"><font
        color="#000000"> flashrom with <font color="#ff0000">make </font>i
        get this error<br>
        <font color="#3333ff">$ make<br>
          Files don't seem to be under version control. Replacing all
          version 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'</font><br>
        <br>
        And if i try with <font color="#ff0000">make
          CC=i686-w64-mingw32-gcc</font> i get this error<br>
        <font color="#3333ff">$ make CC=i686-w64-mingw32-gcc<br>
          Files don't seem to be under version control. Replacing all
          version 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 c:/MinGW/i686-w64-mingw32/include/stddef.h:7:0,<br>
                           from
          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 '=', ',', ';', '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 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</font><br>
        <br>
        Could you help me out to compile le latest version of flashrom
        please ?<br>
        <br>
        Thanks a lot for reading me<br>
        Best regards<br>
      </font></font>
  </body>
</html>