Leonardo and mass storage help

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
michael.ruppe
 
Posts: 1
Joined: Tue Jul 10, 2012 6:20 am

Leonardo and mass storage help

Post by michael.ruppe »

When I read that the new Arduino Leonardo/Leostick etc will be using the ATmega 32u4 which supports mass storage emulation I rushed out and got my hands on one.
And now I'm lost. I've seen a successful project interfacing an SD card to the micro
http://elasticsheep.com/2010/04/teensy2 ... n-sd-card/
but it is using the rather daunting (to a beginner at least) Atmel/Avr Studio.
Aside from that one link, I haven't found anything solid looking to do with 32u4 mass storage, which is a shame because its a very nice feature when it comes to my datalogging project.
Has anyone been able to craft a mass storage library for the leonardo, or made any progress in this area? It seems a crying shame that the only thing holding back a device like this is the lack of documentation. I appreciate that it's quite new but its a shame that it was marketed as a mass storage enabled micro and now there is no code to be found.

User avatar
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 6:59 pm

Re: Leonardo and mass storage help

Post by philba »

Well, if you are willing to do a little work, it shouldn't be too hard. First, I'd find a library that works with one of the other arduinos. Look at each control pin for the SD card and see what it's used for. If there are interrupts, you will need to move to a different one. The actual code should mostly be the same but pins may have to change.

mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Re: Leonardo and mass storage help

Post by mtbf0 »

it looks like the project you reference is set up to compile with avr-gcc, which you've already got since it's the compiler arduino uses. try running the make file and see what happens.

download and unzip the project, then cd to whereveryouputit/elasticsheep-lufa-sdcard-mass-storage-demo-38ad47963e18/LowLevelMassStorage+SD and type make. ought to compile.

then try uploading with

Code: Select all

avrdude -p atmega32u4 -c avr109 -b 57600 -U flash:w:MassStorage.hex
might work. i don't have a leonardo. maybe it'll amuse you until someone writes a mass storage library for the leonardo.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”