I was able to program the spi flash memory on the cmod a7 by compiling xc3sprog from source on my raspberry pi. Here are the steps I used:
(1) install libftd2xx drivers
download libftd2xx-arm-v7-hf-1.4.22.gz and follow instructions in ReadMe.txt
case 0xba:
fprintf(stderr, "Found Numonyx N25Q Device, Device ID 0x%02x%02x\n",
fbuf[1], fbuf[2]);
switch (fbuf[2])
{
case 0x16:
pages = 16384;
sector_size = 65536;
break;
(4) Compile xc3sprog
mkdir xc3sprog/build
cd xc3sprog/build
cmake ..
make
sudo make install
(5) Run the program command with the "-I" option, using the attached first.bit to help detect the spi flash rom.
xc3sprog -c jtaghs1_fast -Ifirst.bit
xc3sprog -c jtaghs1_fast -I your_design.bit
Works like a charm.
I have attached the xc3sprog compiled to run on raspberry pi (it still needs the libftdi1 library to be installed... sudo apt-get install libftdi1).
first.bit run_first_spi_flash_cmod_a7.sh xc3sprog
The first.bit file was created by taking this VHDL design from the github xc3sprog repo: xc3sprog/bscan_spi/bscan_xc7_spi.vhd and making it into a bit file using Vivado (with the target being the CMOD A7 board). I have included the constrants file "constr.xdc" which I used to create the first.bit file.