BootloadHID

Registered forum users can contribute their rating for projects based on V-USB in this forum.

Please rate BootloadHID on a scale from 0 (worst) to 5 (best):

(0)
0
No votes
(1) *
0
No votes
(2) **
0
No votes
(3) ***
0
No votes
(4) ****
1
8%
(5) *****
12
92%
 
Total votes: 13

christian
Objective Development
Objective Development
Posts: 1335
Joined: Thu Nov 09, 2006 11:46 am

Re: BootloadHID

Postby christian » Wed Oct 21, 2009 9:33 pm

You can find the lines

Code: Select all

        GICR = (1 << IVCE);  /* enable change of interrupt vectors */
        GICR = (1 << IVSEL); /* move interrupts to boot flash section */

and

Code: Select all

    GICR = (1 << IVCE);     /* enable change of interrupt vectors */
    GICR = (0 << IVSEL);    /* move interrupts to application flash section */

in the boot loaders. Together with the defines

Code: Select all

#ifndef GICR
#define GICR    MCUCR
#endif

this should have the desired effect.

honupata
Posts: 14
Joined: Sat Sep 24, 2011 1:53 am

BootloadHID @12.8mhz

Postby honupata » Wed Feb 20, 2013 10:12 pm

Hi,

I could use some advice as I already spent really a lot of time on this. I already posted this in the VUSB Forum but here might be more appropriate. Sorry for the double posting.

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/vi ... -bootload/

My Makefile
# 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
HFUSE = 0x90
LFUSE = 0x84


Can you help me :D

Thank you

honupata
Posts: 14
Joined: Sat Sep 24, 2011 1:53 am

BootloadHID @12.8mhz

Postby honupata » Tue Feb 26, 2013 5:39 pm

Here Is the Solution to my issue, Thank you again Bob:

BootloadHid with atmega8 @12.8Mhz by Bob » Mon Feb 25, 2013 4:08 pm

You can't just recompile BootloadHid firmware for 12.8MHz, it will not work.
You must also make sure that D- and INT0 are the same pin or connnect D- to int0 so that the internal oscillator will self calibrate using the host's USB 1ms frame on the D- signal.
See bootloaderconfig.h

Try this:

Code: Select all#define USB_CFG_IOPORTNAME D
#define USB_CFG_DPLUS_BIT 1 // or any bit in port D that's not used
#define USB_CFG_DMINUS_BIT 2 // 12.8Mhz must use D- and INT0 on the same pin or 2 pins

Connect D+ Resistor to Atmega8 D1
Connect D- Resistor to Atmega8 D2

am2008
Posts: 2
Joined: Tue Mar 24, 2015 10:06 am

Re: BootloadHID

Postby am2008 » Wed Mar 25, 2015 10:19 am

I have a problem with BootloadHID(Mega32A write error at 0x7000). Topic created here: viewtopic.php?f=8&t=9725


Return to “V-USB Project Ratings”

Who is online

Users browsing this forum: No registered users and 1 guest

cron