Forum Discussion
Altera_Forum
Honored Contributor
21 years agoProgramming the EPCS
Hi All, We found a problem in the AVALON HAL. We are using a CFI flash from Spansion, when registering the Flash, the code will put the flash into Query Mode several times in a row. This causes th...
Altera_Forum
Honored Contributor
21 years agoI can shed some light on this issue. There was indeed a bug in alt_epcs_flash_memcmp in the nios 2 1.0 release, which could result in a buffer overrun. The bug fix is present in the upcoming nios2 1.1 release. If you want to patch your HAL code until 1.1 is available, change the following two lines in altera_avalon_epcs_flash_controller.c:
line 145: was: while (n >= 0) change to: while (n > 0) line 154: was: &chunk_buffer[current_offset], change to: chunk_buffer,