Leonardo Clone....problems with Caterina bootloader and uploading code

Hi,
I have a custom board with a ATMega32u4 chip running 8Mhz internal oscillator.
I rebuilt the caterina bootloader for 8Mhz and I upload to the board. All looks good.
I then plugin through the USB and I see the USB "Arduino Leonardo bootloader (COM7)" device appears on COM port 7 in the device manager. Great.
Within the Arduino IDE I select my 8Mhz Arduino board and the COM port 7.
I build and upload my program which uploads and starts running. Note: I do not have to press the reset button for the upload to work.
Here is the output:

Forcing reset using 1200bps open/close on port COM7
PORTS {COM3, COM7, } / {COM3, COM7, } => {}
PORTS {COM3, COM7, } / {COM3, COM7, } => {}
Uploading using selected port: COM7
C:\Program Files\Arduino/hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega32u4 -cavr109 -PCOM7 -b57600 -D -Uflash:w:C:\DOCUME~1\ogsplosh\LOCALS~1\Temp\build4390349783801752504.tmp/Blink.cpp.hex:i
avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36

  • Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/*
  • Copyright (c) 2007-2009 Joerg Wunsch*
  • System wide configuration file is "C:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf"*
  • Using Port : COM7*
  • Using Programmer : avr109*
  • Overriding Baud Rate : 57600*
  • AVR Part : ATmega32U4*
  • Chip Erase delay : 9000 us*
  • PAGEL : PD7*
  • BS2 : PA0*
  • RESET disposition : dedicated*
  • RETRY pulse : SCK*
  • serial program mode : yes*
  • parallel program mode : yes*
  • Timeout : 200*
  • StabDelay : 100*
  • CmdexeDelay : 25*
  • SyncLoops : 32*
  • ByteDelay : 0*
  • PollIndex : 3*
  • PollValue : 0x53*
  • Memory Detail :*

Now the board shows up on COM port 8 as an "Arduino Leonardo"...not "Arduino Leonardo bootloader"
I now have to pick COM port 8 to upload but it never works. I press reset during the upload and that does not work either and I keep getting
Windows popup that "USB device is not recognized".
I can not longer upload to the board unless I upload the caterina bootloader all over again and then I go back to it working until I upload a program via USB.
Below is the output.

Forcing reset using 1200bps open/close on port COM8
PORTS {COM3, COM8, } / {COM3, COM8, } => {}
PORTS {COM3, COM8, } / {COM3, COM8, } => {}
PORTS {COM3, COM8, } / {COM3, COM8, } => {}
PORTS {COM3, COM8, } / {COM3, COM8, } => {}
PORTS {COM3, COM8, } / {COM3, COM8, } => {}
PORTS {COM3, COM8, } / {COM3, COM8, } => {}
PORTS {COM3, COM8, } / {COM3, COM8, } => {}
PORTS {COM3, COM8, } / {COM3, COM8, } => {}
PORTS {COM3, COM8, } / {COM3, COM8, } => {}
PORTS {COM3, COM8, } / {COM3, } => {}
PORTS {COM3, } / {COM3, } => {}
processing.app.debug.RunnerException: Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.

  • at cc.arduino.packages.uploaders.SerialUploader.waitForUploadPort(SerialUploader.java:213)*
  • at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:95)*
  • at processing.app.Sketch.upload(Sketch.java:1672)*
  • at processing.app.Sketch.exportApplet(Sketch.java:1578)*
  • at processing.app.Sketch.exportApplet(Sketch.java:1550)*
  • at processing.app.Editor$DefaultExportHandler.run(Editor.java:2399)*
  • at java.lang.Thread.run(Unknown Source)*

Could the upload of the program somehow be corrupting the bootloader.....I am uploading the blink example so I know it is not the size of the code.

Thanks
Mark

Never mind....I figured it out.....
I think it could have been a number of settings fuse bits settings or the lock bits. Once I started using the Arduino IDE to upload the bootloader it worked.

I wanted to delete this post but it appears you cannot delete your own topic.....very strange.

Thanks
Mark

This thread may help others that run in the same problem.
Good thing this didn't get deleted.