Giter Site home page Giter Site logo

gblargg / usbasploader Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 5.0 120 KB

Experimental version of USBasp bootloader for AVR

License: GNU General Public License v2.0

C++ 1.02% C 41.49% Objective-C 0.39% Assembly 31.25% Makefile 0.63% Pascal 0.97% SourcePawn 14.19% PHP 10.06%

usbasploader's People

Contributors

gblargg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

usbasploader's Issues

Device not enumerating on 328p

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.