[En-Nut-Discussion] Nut-OS, AVR, and MMC interface....

PragmaLab info at pragmalab.nl
Thu Jan 22 12:51:15 CET 2009


Hello Jim,

> The problem I had was with the PHAT0 device driver...I could 
> not find any way of getting NutConfigurator to include that 
> driver into the library build (for the AVR....ATmega2561).  I 

True, that's because there is a dependancy of the 'BLOCK_DEVICE' in the
configurator.
We encountered the same problem and also modified the .nut files to be able
to include the proper sources in the build.

Due to this dependancy, the standard configurator files don't allow you to
use the PHAT-filesystem for the 8-bit Mega's, which is a pitty (why
shouldn't you use SD-card functions on a Mega256?). I used the Nut
blockdevice driver and modified it in such a way that it interfaces to our
(selfmade) SPI-driver functions (not a NUT-device). Our SPI-driver serves 3
external devices (serial flash, SD-card and VLSI-chip) and all goes well.

> finally sat down, and poured through all of the Lua scripts 
> (a learning experience for me...I never even heard of Lua 
> until yesterday), and at the very least figured out how to 
> modify the scripts so I could build the libraries.

Not sure if the .nut files are Lua....
 
> Anyway, my question is:
> 
> Was there an easier way to get the Nut libraries to build and 
> include PHAT without resorting to changing the Lua scripts... 
> (I specifically changed fs.nut ... think that was the name of 
> the file)?

Not that I know of.... ;-) We went through the same exercise....

The PHAT-filessytem has become an important part of our application on the
Meag256 and is robust enough to use in commercial applications (like ours).
So my credits go to Harald who did most of the development on this module I
think.  Some basic concepts (like setting file-atributes) are missing, but
in general PHAT does the job quite well. However, there are some perfomance
issues we like to work on in the near future: especially writing to a card
takes too much time (and deleting, which of course is also a kind of
writing). I might optimise some parts of the PHAT-code to achieve better
performance. Last december I've sent my pathces to Harald and Ole that
support SD-HC cards and a small optimisation that reduces the time it takes
to mount the card (counting clusters with large capacity cards took too
long). Not sure if these changes have made it to the next 4.8 release...

Best regrads,

Rob van Lieshout




More information about the En-Nut-Discussion mailing list