Efficient datahandling in flash

Hello group,

After years of development on various windows CE platforms, I am now tasked with developing software for a new Atmel ARM7 based design. We plan to use a serial SPI flash for datastorage, but I lack a little understanding. We need to handle about 2MBytes of sessiondata and systemconfig data and we need to be able to dump and modify these data on a PC via ethernet link. Also the target unit itself need fast and easy access to the data. If I was using Windows CE, i would have used the CE database to store and handle all these data. But what do people do when data resides in serial flash? Is serial flash really what we want? Do you use any readily available databases for small embedded systems, and if yes, which? Do you use some small flash filesystem? And if yes, which? Do you write your own proprietary datastorage scheme. I like the idea of a database, because of the possibility to to organize the data into tables and let the DB worry about sorting, searching, wearleveling etc.

I had a look on SQLite, from an advice in an earlier post, but I did not think that it would be possible to run it on my target system as it appears to be targeted against some PC filesystem....

Thank you for any and all inputs.

Best regards Henrik

Reply to
Henrik [6650]
Loading thread data ...

There are people using SQLite in embedded devices without a filesystem. SQLite has an interchangeable OS interface that you can replace with your own code that talks to whatever kind of mass storage you want. Use the existing os_unix.c and/or os_win.c files as your guide and implement os_arm7.c (or whatever) that talks directly to flash. This is not a trivial exercise, but it is not an insurmountable barrier either. Many others have already been down the same path.

Reply to
drh

"Henrik [6650]" skrev i meddelandet news:4474dac7$0$47029$ snipped-for-privacy@dread15.news.tele.dk...

You can get the Dataflash File System from your local Atmel distributor, and since you are in Denmark, that would be Arrow or EBV. This will need adaption to fit the SAM7.

Alternatively, you can get the USB Mass Storage Adapter code from

formatting link
which runs on the AT91.

If you are using an AT91SAM7 then you are likely to find SPI the fastest way to access external flash, since you do not have any external bus.

Another approach allowing parallel memory would be an AT91RM9200 + 8 MB of Flash running JFFS2/Linux. This would have spare area for you database

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.