Forum Discussion
Altera_Forum
Honored Contributor
21 years agoDirect Read/Write of flash from uClinux app
I am trying to use the flash on the development board to store some user settings that remain between boots, but can't figure out how to directly access the flash device. I see that there are functions available for generic NIOS2 apps, or for uCOS apps, but can't find anything on how to do the same thing under uClinux. Are there any examples that I can use as a starting point for this?
2 Replies
- Altera_Forum
Honored Contributor
Why not try those same commands under uCLinux? It's built on top of the HAL, as well, I believe.
Cheers, - slacker - Altera_Forum
Honored Contributor
Hi mtmurphy,
There are a bunch of ways to do this. The easiest would probably be to use mtd and do direct access via the character mode driver (ie -- through the /dev/mtd inode). You would then be able to read/write and use ioctl for erasing. A step up from there would be to add jffs2 and just create-read-modify-write a file -- more kernel config here, but it doesn't get much easier from a programming point-of-view. Regards, --Scott