Error: Compiling Custom Caterina Bootloader for Atmega32u4

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I'm trying to compile a custom Caterina bootloader with new VID and PID. I compiled the source codes by using LUFA-111009 and wrote "Caterina.hex" to Atmega32u4 microcontroller on Arduino Leonardo board. But it didn't boot. LED 13 was blinking continuously like that booting procedure. I tried to write another compiled data "Caterina.eep" to EEPROM. It worked. What probably is the problem with the .hex file? I had no compiling error. Customized Makefile is attached.

Development environment: Ubuntu 16.04 64-bit

avr-gcc ver: 4.9.2

avrdude ver: 6.2

GNU make ver: 4.1

programmer: usbasp

 

Here is the terminal output of compiling.

<terminal-output>
-------- begin --------
avr-gcc (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Size before:
AVR Memory Usage
----------------
Device: atmega32u4
Program:    3900 bytes (11.9% Full)
(.text + .data + .bootloader)
Data:        162 bytes (6.3% Full)
(.data + .bss + .noinit)

Size after:
AVR Memory Usage
----------------
Device: atmega32u4
Program:    3900 bytes (11.9% Full)
(.text + .data + .bootloader)
Data:        162 bytes (6.3% Full)
(.data + .bss + .noinit)

-------- end --------
</terminal-output>

 

Here is the terminal output of writing to flash.

<terminal-output>
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "Caterina.hex"
avrdude: input file Caterina.hex auto detected as Intel Hex
avrdude: writing flash (32572 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 32572 bytes of flash written
avrdude: verifying flash memory against Caterina.hex:
avrdude: load data flash data from input file Caterina.hex:
avrdude: input file Caterina.hex auto detected as Intel Hex
avrdude: input file Caterina.hex contains 32572 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 32572 bytes of flash verified
avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)
avrdude done.  Thank you.
</terminal-output>

 

Attachment(s): 

Last Edited: Wed. Dec 6, 2017 - 02:43 PM