I could use some advice as I already spent really a lot of time on this.
I’m trying to make the BootloadHid work with atmega8 @12.8Mhz without success. (unrecognized device)
I know that the hardware is fine because it's working @16Mhz with the same atmega8
It seems also that my fuses are ok because a simple VUSB code works @12.8mhz with them.
I’m using gcc 3.4.6 to have the code fit in the boot section of the atmega8.
I’m using the latest BootloadHid firmware "as is" (bootloadHID.2012-12-08), I only changed the makefile
I also tried this: http://www-user.tu-chemnitz.de/~heha/viewzip.cgi/bastelecke/Rund%20um%20den%20PC/USB2LPT/usb2lpt.zip/src/firmware/bootloadHID/src-ATmega8-bootload/
Code: Select all
# Name: Makefile
# Project: bootloadHID
# Author: Christian Starkjohann
# Creation Date: 2007-03-19
# Tabsize: 4
# Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
# License: GNU GPL v2 (see License.txt)
# This Revision: $Id$
DEVICE = atmega8
BOOTLOADER_ADDRESS = 1800
F_CPU = 12800000
FUSEH = 0xD8
FUSEL = 0x64
AVRDUDE = avrdude -c usbasp -p $(DEVICE)
LDFLAGS += -Wl,--relax,--section-start=.text=$(BOOTLOADER_ADDRESS)
# Omit -fno-* options when using gcc 3, it does not support them.
COMPILE = avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) -DDEBUG_LEVEL=0 # -DTEST_MODE
# NEVER compile the final product with debugging! Any debug output will
# distort timing so that the specs can't be met.
OBJECTS = usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
# symbolic targets:
all: main.hex
.c.o:
$(COMPILE) -c $< -o $@
.S.o:
$(COMPILE) -x assembler-with-cpp -c $< -o $@
# "-x assembler-with-cpp" should not be necessary since this is the default
# file type for the .S (with capital S) extension. However, upper case
# characters are not always preserved on Windows. To ensure WinAVR
# compatibility define the file type manually.
.c.s:
$(COMPILE) -S $< -o $@
clean:
rm -f main.hex main.bin *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s
program:
$(AVRDUDE) -U hfuse:w:$(FUSEH):m -U lfuse:w:$(FUSEL):m -U flash:w:main.hex:i -U lock:w:0x2f:m
#$(AVRDUDE) -U hfuse:r:high.hex:i -U lfuse:r:low.hex:i
#$(AVRDUDE) -U hfuse:w:$(FUSEH):m -U lfuse:w:$(FUSEL):m -U lock:w:0x3F:m
# file targets:
main.bin: $(OBJECTS)
$(COMPILE) -o main.bin $(OBJECTS) $(LDFLAGS)
main.hex: main.bin
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.bin main.hex
avr-size main.hex
disasm: main.bin
avr-objdump -d main.bin
cpp:
$(COMPILE) -E main.c
I also try with this fuses
Code: Select all
HFUSE = 0x90
LFUSE = 0x84
Can you help me
Thank you