Forum Discussion
Altera_Forum
Honored Contributor
21 years agoUsing alt_flash_open_dev
Hello, I have a Nios2 system that runs from flash (flash = program memory). My program needs to access flash at a certain moment, it needs to write/read some data to it. The alt_flash_open_de...
Altera_Forum
Honored Contributor
21 years agoDolphin,
If you look at the header file I mentioned in my previous post you will see that all the flash functions will not work if you have any of the sections text, rw_data or ro_data in flash. You could remove these macros, but you will have to ensure that any flash accesses are not to the sector you're running code from As for your question <div class='quotetop'>QUOTE </div> --- Quote Start --- You suggest to read from the address, can you explain me how to do that? (or where I can find an example?).[/b] --- Quote End --- It's a simple case of using pointers char* test; char result; test = (char*)SOME_FLASH_ADDRESS; result = *test; Will do the job.