Leonardo with USB Keyboard and Mouse only..

Hi all
I'm totally newbie then I don't know how to ask..
I buy Arduino Leonardo board. Working good, try USB Keyboard and USB Mouse example. Working good but I have little problem.
In some PC (Windows 7) have problem with USB Serial port by CDC .
I use 1.6.6 IDE .
I need solution how to change part of source file to disable CDC serial port .

I understand so then will not possible to upload code directly by IDE , but I use external dev. board STK500 or similar .

I need it .. need USB Keyboard and USB Mouse only .. no other ..

Best regards.

If you don't use Serial.begin(), then the serial port is not started (by the sketch).
If you use a programmer to upload the sketch, then the bootloader is removed, so that won't start a serial port either.
After that the Leonardo has only what you start in the sketch.

You need a programmer. Something like USBasp Version 2 or an Arduino Uno as ArduinoISP.
Do you know someone who can help with a programmer ?

Hi.
Sorry .. but this is not true..
If not use in Sketch Serial.begin .. then not use serial port but only by my sketch ..
Serial port is still installed.. on system.. ehm..
if you compile sketch with control led only (blinking for example .. no serial port use ) then compiler still append serial CDC usb keyboard and usb mouse to core .. doesn't matter if you use it or not .. I must change descriptor and some part of code .. I don't know what .. atmega32u4 have hardware USB , this usb is used for bootloader and communication with IDE .. etc..

Sorry, then I must be wrong. I tried it in the past, and I assumed it was as I wrote. Perhaps I'm wrong or perhaps it worked with one of the first bootloaders.
The bootloader for the Leonardo was changed in the past and the CDC section has changed with Arduino IDE version 1.6.6 to make it pluggable for other USB additions.

When I comment out the USBCON define in iom32u4.h, the Blink sketch resulting *.hex file becomes very small (3597 bytes).
But then the sketch has to be uploaded with a programmer without the bootloader. I'm not sure if that is possible, perhaps "Upload sketch with programmer" still appends the large bootloader.

Perhaps this is the preferred way to disable it : Using Leonardo as mouse. How to prevent automatic driver install on Windows? - #4 by Steph - Project Guidance - Arduino Forum
Or perhaps that is outdated.

The core of the Leonardo keeps USB serial running because otherwise there would be no way for the IDE to notify the Leonardo it needs to reboot and run the bootloader. The IDE switches baud rates temporarily to 1200 and the Leonardo USB serial watches for this and reboots. Then the bootloader (if you have one installed) runs and accepts a new sketch. I would bet that link Koepel gives is the only practical solution, although it requires some editing of the core, and that would affect all sketches you upload to Leonardo, not just this one project. I'm sure in that post from 2012 they were talking about a much earlier version IDE. Leonardo requires version 1.0.1 or later. If I were going to do something like this with the Leonardo, I would probably install 1.0.6, which is the latest of the older-generation IDE. Pretty advanced stuff to try if you're "totally newbie."

Yes. I know ..
I want use external ISP porgrammer ..

who can help with this ??? or what version is possible to use where is possible easy disable CDC serial port??

regards..

Hi all.
I use latest version of LUFA .. and can compile with latest version winavr and avr studio 4,19 .. now use LUFA code .. thanks all..

Thanks for telling us.
LUFA : http://www.fourwalledcubicle.com/LUFA.php
I have not used LUFA before, but I see that LUFA is far ahead of Arduino for the USB possibilities.