Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI very much doubt you'll manage to use the altera higher layer HAL functions to access the flash without having external memory.
I suspect that the read() and write() pull in all of stdio (as does printf) - so your minumum code size will be over 70k, never mind how much space you need in the heap (for malloc/free). Also a quick look at the flash write() code shows that it will erase the entire flash segment if the data you are writing differs from that already programmed (not if the write would need to set any bits). So you'll need to write entire flash sectors in one write() call - which needs a 256k byte buffer if you have EPCS128 - you are unlikely to fit that it either. I also suspect a 100MHz nios could directly bit-bang the EPCS device with 60ns per bit (write) and 80ns (read) with minimal interface logic or code.