openFPGALoader: Segmentation fault when flashing bitstream into sipeed FPGA

This is the log when I use the latest openFPGAloader, hope this can be fixed soon.

lee@ubuntu:/mnt/hgfs/share$ sudo openFPGALoader -b tangnano9k nanows2812.fs 
Jtag frequency : requested 6.00MHz   -> real 6.00MHz  
Parse file Parse nanows2812.fs: 
Done
DONE
Jtag frequency : requested 2.50MHz   -> real 2.00MHz  
erase SRAM Done
Flash SRAM: [==================================================] 100.00%
Done
lee@ubuntu:/mnt/hgfs/share$ sudo openFPGALoader -b tangnano9k -f nanows2812.fs 
write to flash
Jtag frequency : requested 6.00MHz   -> real 6.00MHz  
Parse file Parse nanows2812.fs: 
Done
DONE
Jtag frequency : requested 2.50MHz   -> real 2.00MHz  
Jtag frequency : requested 10.00MHz  -> real 6.00MHz  
erase SRAM Done
Segmentation fault

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 15 (9 by maintainers)

Commits related to this issue

Most upvoted comments

When i comment out _spi->spi_put(0x9F, NULL, rx, len); in spiFlash.cpp around line 550 I do not get seg_faults any more The info read by the spi_put call is not used it looks like. /Jørgne

printf("Read Exteted --------------------------------------\n");
		/* read extended */
		if ((_jedec_id & 0xff) != 0) {
			has_edid = true;
			len += (_jedec_id & 0x0ff);
			printf("will call spi_put len = %d\n",len);
			int spi_ok; 
			//spi_ok =_spi->spi_put(0x9F, NULL, rx, len);
			printf("spi_put return %d\n",spi_ok);
		}

It’s really interesting and may make sense to update FAQ by adding a section. I don’t know why this fails using sudo… I have to try by myself on all distro I have to check this behavior.

Thanks for this information!