On Tue, 2 Feb 2016 19:43:26 +0100 Bio zackwarrior@gmail.com wrote:
Hello,
I'm having trouble with flashrom, i have a working ft2232 board and i correctly connected a spi flash on it on port A I also correctly installed the libusb drivers for the board So i found a compiled version of flashrom for windows v0.9.6.1-r1705 I run it with this command flashrom -p ft2232_spi:type=2232H,port=A And i get this: flashrom v0.9.6.1-r1704 on Windows 6.1 (x86) flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK. No EEPROM/flash device found. Note: flashrom can never write if the flash chip isn't found automatically.
That does not tell much... the suspicion you wrote further below is correct.
I then decided to try port B, so i wired the flash chip on port B and used this command flashrom -p ft2232_spi:type=2232H,port=B And i get this: flashrom v0.9.6.1-r1704 on Windows 6.1 (x86) flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK. Unable to reset FTDI device (USB device unavailable). Unable to set latency timer (USB device unavailable). Unable to set bitmode to SPI (USB device unavailable). ftdi_write_data: -666, USB device unavailable Error: Programmer initialization failed.
That looks a bit fishy but might have been fixed in the meantime. I would like to see the output for the same command line with a current version...
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 #define MACRONIX_MX25L25635F 0x2019 /* Same as MX25L25639F, but the latter seems to not support REMS */
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 ?
Yes, indeed. And the current one won't help you either. The problem is that this chip requires 32 bit addresses instead of the 24 bit address used up to now in SPI flash chips. flashrom does not support this yet and so supporting your chip is not feasibly right now. There exist some patches though that would make it work.
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... When i try to compileflashrom with make i get this error $ make Files don't seem to be under version control. Replacing all version templates with 0.9.8-r1888. Package libftdi was not found in the pkg-config search path. Perhaps you should add the directory containing `libftdi.pc' to the PKG_CONFIG_PATH environment variable No package 'libftdi' found Checking for a C compiler... found. Target arch is x86 Target OS is MinGW Checking for libusb-0.1/libusb-compat headers... found. Checking if libusb-0.1 is usable... yes. Checking for FTDI support... found. Checking for FT232H support in libftdi... not found. Checking for utsname support... not found. make[1]: Entering directory `/c/flashrom/util/ich_descriptors_tool' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/c/flashrom/util/ich_descriptors_tool'
I don't see an error. The pkgconfig message is not an error..
And if i try with make CC=i686-w64-mingw32-gcc i get this error $ make CC=i686-w64-mingw32-gcc Files don't seem to be under version control. Replacing all version templates with 0.9.8-r1888. Package libftdi was not found in the pkg-config search path. Perhaps you should add the directory containing `libftdi.pc' to the PKG_CONFIG_PATH environment variable No package 'libftdi' found Checking for a C compiler... found. Target arch is x86 Target OS is MinGW Checking for libusb-0.1/libusb-compat headers... In file included from c:/MinGW/i686-w64-mingw32/include/stddef.h:7:0, from c:/MinGW/lib/gcc/i686-w64-mingw32/5.2.0/include/stddef.h:1, from c:/MinGW/include/stdlib.h:22, from c:/MinGW/include/lusb0_usb.h:4, from .test.c:3: c:/MinGW/i686-w64-mingw32/include/crtdefs.h:123:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef' __MINGW_EXTENSION typedef __int64 __time64_t; ^ c:/MinGW/i686-w64-mingw32/include/crtdefs.h:138:9: error: unknown type name '__time64_t' typedef __time64_t time_t; ^ not found.
Please install libusb-0.1 headers or libusb-compat headers. See README for more information.
make: *** [hwlibs] Error 1
Could you help me out to compile le latest version of flashrom please ?
Sounds like a bug in mingw or libusb to me... cross-compiling with mingw under Linux for Windows should work fine since a long time ago.