Arduino V1.0.1 and the LeoStick

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
Post Reply
Fractal
Posts:12
Joined:Mon May 21, 2012 10:45 pm
Arduino V1.0.1 and the LeoStick

Post by Fractal » Tue May 22, 2012 8:41 pm

So, the Arduino IDE version 1.0.1 has been released, and the exiting new feature is out of the box Arduino Leonardo support. No more editing boards.txt, or inserting extra folders, to get an Atmega 32U4 to work.

I've been doing a bit of playing, several things are of note
Now, when you press upload, you are expected to also press the reset button, every time.
The IDE now selects the serial port that appears soonest after compiling is done- so even a botched sketch that breaks USB will still upload. This is, to be fair, less convenient otherwise!.
The timeout for uploading has therefore increased.

The original LeoStick bootloader (Diskloader-Leonardo.hex) has been replaced by caterina-Leonardo.hex. The new one pulses a bit faster, I think. It is pretty huge though, the hex file is 78kb (not sure how!). Upload is straightforward and it works, though there is no turning back without v1.0!

Sadly, the bug with the tone library is still there - no straight out the box piezo fx quite yet. If you know how to fix it 'properly', I suggest uploading a diffs files to the arduino code page!
It does still crash the atmega32u4,

Code: Select all

  void setup() {
     pinMode(10, OUTPUT);  //Blue LED set to output
     digitalWrite(10, 1); //Blue LED on

     tone(11, 50,1000);  //This kills the LeoStick

     digitalWrite(10, 0);  //Blue LED off (Never reaches this point)
}
void loop()
{
}
In the above code, the Leostick will turn on the LED, then crash, with Leonardo bootloader, and v1.0.1 of the Arduino IDE

Other than that, all is well - I'd recommend the upgrade- the longstanding bug of it recompiling everything each time you pressed upload has been patched- now only different files are compiled- much, much quicker.

It's very easy to use an existing Arduino to program the bootloader for another, there are a few guides online, and the LeoStick somehow even has room for an ICSP header. I'd recommend the new bootloader, simply for the ease of not having to faff with timings pressing the reset button. The hardware is fully Leonardo capable, and astonishingly tiny.

adr1an
Posts:21
Joined:Tue Nov 01, 2011 10:04 am

Re: Arduino V1.0.1 and the LeoStick

Post by adr1an » Wed May 23, 2012 3:07 pm

Fractal wrote:The original LeoStick bootloader (Diskloader-Leonardo.hex) has been replaced by caterina-Leonardo.hex. The new one pulses a bit faster, I think. It is pretty huge though, the hex file is 78kb (not sure how!). Upload is straightforward and it works, though there is no turning back without v1.0!
To answer the query re the huge size of the Leonardo.hex file, I believe the size difference is that the Arduino bootloaders as shipped are not the as compiled bootloader by itself, but rather, the compiled bootloader, and then the Fade sketch loaded (or AndroidADK Test Suite in the case of Seeed's MegaADK) and then the whole flash is read back in Intel hex format - hence its a full dump of everything not just whats used in the loader/sketch. Many boards do the same thing so it avoids issues with the board stuck at the bootloader. If the other thread wasn't my own personal hack I would have built the same .hex file, thats the proper way to package the .hex file for end-users...

Backing up the stock LeoStick produces a similar 78k file

Fractal
Posts:12
Joined:Mon May 21, 2012 10:45 pm

Re: Arduino V1.0.1 and the LeoStick

Post by Fractal » Wed May 23, 2012 3:12 pm

Ah, that explains the large bit in the middle filled with FFFFF.
Still would be nice to see tone() fixed, though to do it properly would require more coding knowledge than I have.

efry
Posts:6
Joined:Tue May 29, 2012 12:10 am

Re: Arduino V1.0.1 and the LeoStick

Post by efry » Tue May 29, 2012 12:24 am

Hi,

I was having problems loading the windows XP driver from the Arduino IDE package. It turns out that they have changed the USB vid/pid's in release 1.0.1

In version 1.0 it is
[DeviceList]
%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0032
%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0034&MI_00

and in the new 1.0.1 version it is now
[DeviceList]
%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0036
%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_8036&MI_00

I think you might need to update the windows usb driver guide to tell people to use the drivers from the 1.0 release instead of the new 1.0.1 release.

Regards,
Eric

adr1an
Posts:21
Joined:Tue Nov 01, 2011 10:04 am

Re: Arduino V1.0.1 and the LeoStick

Post by adr1an » Wed May 30, 2012 5:13 am

efry wrote:Hi,

I was having problems loading the windows XP driver from the Arduino IDE package. It turns out that they have changed the USB vid/pid's in release 1.0.1
Indeed.... refer to viewtopic.php?f=27&t=663

Post Reply