I wanted to perform write and reads on the internal flash of the Max10 FPGA. Using the below code the file handle is getting zero return from this function (i have ensured that Flash device name matches the one included in system.h). How do i access the internal flash using the built in flash functions available in HAL (alt_read_flash,alt_write_flash)? In BSP i have also ensured enable_small_c_library, enable_reduced_device_drivers and enable_sim_optimize flags are disabled(unchecked). Is there any other setting to be done to access the internal flash on the Max10 FPGA.
fd = alt_flash_open_dev("/dev/flash_control");
#define DMA_READ_MASTER_FLASH_CONTROL_NAME "/dev/flash_control"
Getting below Error message:
# -ERROR: Could not open /dev/flash_control,FD:0
Can you download the BUP design from here
And then open the Eclipse>New>NIOS II application and BSP from template>choose the memtest template
Run this test and see if you will get the same error. This should be working fine
Please also check SW1 and SW2 in the bottom of the board.
Can you please create the MEM-test application to test your flash?
Go to File>> New>>application and PSB from template>> choose the sopicinfo file and choose "Memory test application".