gblargg / usbasploader Goto Github PK
View Code? Open in Web Editor NEWExperimental version of USBasp bootloader for AVR
License: GNU General Public License v2.0
Experimental version of USBasp bootloader for AVR
License: GNU General Public License v2.0
I cannot seem to enter the bootloader on a 328p device.
I'd like to use this project to take advantage of the lovely bootloader entry/exit options as my project does not have a user accessible button which seems to be required by most other V-USB based projects.
I'm confident that my hardware implementation is sound as I can successfully enter the bootloader and upload application firmware using similar projects such as USnooBie's bootloader which is essentially the same hardware setup I'm using but with no jumpers or buttons.
bootloaderconfig.inc includes the following to match my setup:
F_CPU = 12000000
DEVICE = atmega328p
PROGRAMMER = -c usbtiny
The following directives are set in bootloaderconfig.h
#define USB_CFG_IOPORTNAME D
#define USB_CFG_DMINUS_BIT 7
#define USB_CFG_DPLUS_BIT 2
I have tried defining each of these three options independently in bootloaderconfig.h but the result is the same inability to enter the bootloader upon USB connection, power, or reset:
#define BOOTLOADER_ON_POWER 1
#define BOOTLOADER_ON_USB 1
#define BOOTLOADER_ON_RESET 1
The project builds fine except for the warning:
In file included from main.c:25:0:
usbdrv/usbdrv.h:223:24: warning: ‘usbFunctionDescriptor’ used but never defined
USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq);
but this seems fairly common to USBasp projects.
make fuse
runs fine but seems to fail on the extended byte fuse for some reason:
avrdude -c usbtiny -p atmega328p -U lfuse:w:0xd7:m -U hfuse:w:0xd0:m -U efuse:w:0x04:m
[...successful writes omitted...]
avrdude: reading input file "0x04"
avrdude: writing efuse (1 bytes):
Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.03s
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x04:
avrdude: load data efuse data from input file 0x04:
avrdude: input file 0x04 contains 1 bytes
avrdude: reading on-chip efuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xfc != 0x04
avrdude: verification error; content mismatch
avrdude: safemode: efuse changed! Was 4, and is now fc
Would you like this fuse to be changed back? [y/n]
Regardless of the input here, flashing runs without issue but results in safemode setting the fuses to:
E:04, H:D0, L:D7
I can then flash my application code without issue but regardless of what I do, the device, when connected via USB, fails to enumerate.
user@host:$dmesg
[ 4566.665389] usb usb7-port1: unable to enumerate USB device
[ 4566.877361] usb 7-1: new low-speed USB device number 92 using ohci-pci
[ 4567.017365] usb 7-1: device descriptor read/64, error -62
[ 4567.261384] usb 7-1: device descriptor read/64, error -62
[ 4567.501384] usb 7-1: new low-speed USB device number 93 using ohci-pci
[ 4567.641377] usb 7-1: device descriptor read/64, error -62
[ 4567.885382] usb 7-1: device descriptor read/64, error -62
[ 4568.125387] usb 7-1: new low-speed USB device number 94 using ohci-pci
[ 4568.533421] usb 7-1: device not accepting address 94, error -62
[ 4568.669407] usb 7-1: new low-speed USB device number 95 using ohci-pci
[ 4569.077406] usb 7-1: device not accepting address 95, error -62
[ 4569.077438] usb usb7-port1: unable to enumerate USB device
Hi me trying get the led to flash on bootloader,i see there is an option for it and ive configured it to PB5 but it doesnt work,how do i enable it to work? does it work as standard? do i have to copy the define anywhere?thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.