Драйвер для usbasp linux

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

USB programmer for Atmel AVR controllers

stv0g/usbasp

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

Readme.txt

This is the README file for USBasp. USBasp is a USB in-circuit programmer for Atmel AVR controllers. It simply consists of an ATMega88 or an ATMega8 and a couple of passive components. The programmer uses a firmware-only USB driver, no special USB controller is needed. Features: - Works under multiple platforms. Linux, Mac OS X and Windows are tested. - No special controllers or smd components are needed. - Programming speed is up to 5kBytes/sec. - SCK option to support targets with low clock speed (< 1,5MHz). - Planned: serial interface to target (e.g. for debugging). LICENSE USBasp is distributed under the terms and conditions of the GNU GPL version 2 (see "firmware/usbdrv/License.txt" for details). USBasp is built with V-USB driver by OBJECTIVE DEVELOPMENT GmbH. See "firmware/usbdrv/" for further information. LIMITATIONS Hardware: This package includes a circuit diagram. This circuit can only be used for programming 5V target systems. For other systems a level converter is needed. Firmware: The firmware dosn't support USB Suspend Mode. A bidirectional serial interface to slave exists in hardware but the firmware doesn't support it yet. USE PRECOMPILED VERSION Firmware: Flash "bin/firmware/usbasp.atmega88.xxxx-xx-xx.hex" or "bin/firmware/usbasp.atmega8.xxxx-xx-xx.hex" to the used controller with a working programmer (e.g. with avrdude, uisp, . ). Set jumper J2 to activate USBasp firmware update function. You have to change the fuse bits for external crystal (see "make fuses"). # TARGET=atmega8 HFUSE=0xc9 LFUSE=0xef # TARGET=atmega48 HFUSE=0xdd LFUSE=0xff # TARGET=atmega88 HFUSE=0xdd LFUSE=0xff Windows: Start Windows and connect USBasp to the system. When Windows asks for a driver, choose "bin/win-driver". On Win2k and WinXP systems, Windows will warn that the driver is is not 'digitally signed'. Ignore this message and continue with the installation. Now you can run avrdude. Examples: 1. Enter terminal mode with an AT90S2313 connected to the programmer: avrdude -c usbasp -p at90s2313 -t 2. Write main.hex to the flash of an ATmega8: avrdude -c usbasp -p atmega8 -U flash:w:main.hex Setting jumpers: J1 Power target Supply target with 5V (USB voltage). Be careful with this option, the circuit isn't protected against short circuit! J2 Jumper for firmware upgrade (not self-upgradable) Set this jumper for flashing the ATMega(4)8 of USBasp with another working programmer. J3 SCK option If the target clock is lower than 1,5 MHz, you have to set this jumper. Then SCK is scaled down from 375 kHz to about 8 kHz. BUILDING AND INSTALLING FROM SOURCE CODE Firmware: To compile the firmware 1. install the GNU toolchain for AVR microcontrollers (avr-gcc, avr-libc), 2. change directory to firmware/ 3. run "make main.hex" 4. flash "main.hex" to the ATMega(4)8. E.g. with uisp or avrdude (check the Makefile option "make flash"). To flash the firmware you have to set jumper J2 and connect USBasp to a working programmer. You have to change the fuse bits for external crystal, (check the Makefile option "make fuses"). Software (avrdude): AVRDUDE supports USBasp since version 5.2. 1. install libusb: http://libusb.sourceforge.net/ 2. get latest avrdude release: http://download.savannah.gnu.org/releases/avrdude/ 3. cd avrdude-X.X.X 5. configure to your environment: ./bootstrap (I had to comment out the two if-blocks which verify the installed versions of autoconf and automake) ./configure 6. compile and install it: make make install Notes on Windows (Cygwin): Download libusb-win32-device-bin-x.x.x.x.tar.gz from http://libusb-win32.sourceforge.net/ and unpack it. -> copy lib/gcc/libusb.a to lib-path -> copy include/usb.h to include-path cd avrdude ./configure LDFLAGS="-static" --enable-versioned-doc=no make Notes on Darwin/MacOS X: after "./configure" I had to edit Makefile: change "avrdude_CPPFLAGS" to "AM_CPPFLAGS" (why is this needed only on mac? bug in configure.ac?) Notes on Linux: To use USBasp as non-root, you have to define some device rules. See bin/linux-nonroot for an example. FILES IN THE DISTRIBUTION Readme.txt . The file you are currently reading firmware . Source code of the controller firmware firmware/usbdrv . AVR USB driver by Objective Development firmware/usbdrv/License.txt . Public license for AVR USB driver and USBasp circuit . Circuit diagram in PDF and EAGLE format bin . Precompiled programs bin/win-driver . Windows driver bin/firmware . Precompiled firmware bin/linux-nonroot . Linux device rule file MORE INFORMATION For more information on USBasp and it's components please visit the following URLs: USBasp . http://www.fischl.de/usbasp/ Firmware-only V-USB driver . http://www.obdev.at/products/vusb/ avrdude . http://www.nongnu.org/avrdude/ libusb . http://libusb.sourceforge.net/ libusb-win32 . http://libusb-win32.sourceforge.net/ 2011-05-28 Thomas Fischl http://www.fischl.de 

About

USB programmer for Atmel AVR controllers

Читайте также:  Настройка времени линукс консоль

Источник

Geting USBasp v2.0 to work with Linuxmint

I recently bricked by Arduino Uno board and any attempt to upload new sketch will produce and error. I had tried to reflash the firmware multiple times using my serial programmer that I build a while back but no luck getting it to work. I end up purchasing a USBasp v2.0 programmer from eBay.

USBasp v2.0 should work right out of the box on Linux in most cases. On Arduino IDE, you only need to sett the following:

Board: Arduino/Genuino Uno Programmer: USBasp

The Port setting is not used and the menu item should be grayed out. You should be able to burn bootloader or upload Sketch using the USBasp programmer with the above settings.

Or reflash the boot loader from command line.

/path/to/arduino-1.8.2/hardware/arduino/avr/bin/avrdude -C/path/to/arduino-1.8.2/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cusbasp -Uflash:w:/path/to/arduino-1.8.2/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex:i -Ulock:w:0x0F:m

On some system. A tty device is created when USBasp is connected. In my case /dev/ttyS0. However when Port is set to /dev/ttyS0 in Arduino IDE. You will see the following errors:

avrdude: Warning: cannot open USB device: Permission denied
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor=’www.fischl.de’ product=’USBasp’

To Fix Permission denied error. As root edit “/etc/udev/rules.d/99-USBasp.rules” with the following:

SUBSYSTEM=="usb", ATTRS=="16c0", ATTRS=="05dc", GROUP="dialout"

Add self to dialout user group.

sudo usermod -aG dialout $USER

Then logoff and login again.

Unplug USBasp device then restart udev.

sudo /etc/init.d/udev restart

To reflash the Arduino Uno boot loader

In the Arduino IDE Tool menu. Set the following:

Board: Arduino/Genuino Uno
Programmer: USBasp

Then select Tools/Burn Bootloader.

Источник

Читайте также:  Close open file linux

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

License

dioannidis/usbasp

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

WCID compliant, HID UART support

This USBasp firmware is based on a fork by Ralph Doncaster. Original fork readme can be found at README_nerdralph.md.

  • From version 1.07 a default SCK clock of 1.5Mhz and automatic SCK slowing if target does not respond. PORTD is left as input, so this firmware also works with USBISP modules. ( nerdralph )
  • From version 1.08 the firmware is WCID compliant, meaning it should work on Windows without any driver or .inf install.
  • From version 1.09 a ( reliable at 9600 Baud, with 120ms — 160ms intervals for higher speeds see note at UART HID protocol ) UART HID implementation is added for debugging purposes. USBasp will appear as a composite device with a WINUSB interface and a HID interface.
  • From version 1.10 USBasp WCID switch to Microsoft OS 2.0 Descriptors. It seems that it play better with USB 3.0 ports.
  • From version 1.11 USBasp supports updating it’s serial number ( see USBaspHIDUART utility ) and also adds support for the AT89S51/2 ICs.

Avrdude v7+ official windows binary from avrdudes/avrdude uses libwinusb instead of libusb, which doesn’t support composite devices as this firmware implements. Please use the unofficial build using mingw64 ( avrdude-v7.1-mingw64 ) from mcuee repo.

Читайте также:  Удалить папку через консоль linux

From release v0.7.0, the libUSBUARTTerminal supports this firmware’s HID UART implementation.

Note: There is a small 128 byte ring buffer for both Tx and Rx. That means you can use higher baud rates ( i.e. 115200 ) if the message length is smaller than 128 bytes and the transmit / receive interval is 160 ms or higher.

V-USB implementation uses 8 byte size input and output interrupt reports.

The last byte ( 8th ) has special meaning. Its serial data or its the serial bytes count. If its value is greater than 7 then its serial data. If the value is 7 or smaller then its the serial data count and the remaining bytes are ignored.

Input Reports ( USBasp -> USB PC ) or Output Reports ( USB PC -> USBasp)

0x55,0x34,0x00,0x00,0x00,0x00,0x00,0x02 -> Actual serial bytes 2 : 0x55,0x34 0x00,0x34,0x00,0x66,0x32,0x36,0x00,0x04 -> Actual serial bytes 4 : 0x00,0x34,0x00,0x66 0x00,0xC3,0x34,0x55,0x32,0xF3,0x00,0xAB -> Actual serial bytes 8 ( 8th byte > 7 ) : 0x00,0xC3,0x34,0x55,0x32,0xF3,0x00,0xAB

The USBasp’s UART configuration uses an 8 byte size feature report, with the following format.

Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 — 7 RO
Prescaler Low Byte Prescaler High Byte See UART Flags Unused USBasp Capabilities

To setup and enable the UART, send a feature set report, with the prescaler in the first two bytes and the parity, data bit, stop bit flags at the third byte ( see UART Flags ). The fourth byte is ignored.

To disable the UART, send a feature set report, with the prescaler bytes as zero.

Note: The UART is disabled by default, if read or write is detected for do to not interfere with those functions.

The USBaspHIDUART is a simple console utility, used for testing the HID UART implementation.

This is the help page ( USBaspHIDUART.exe -h ) :

USBaspHIDUART -h USBasp HIDUART Test App -l List USBasp HID devices -i Select USBasp index ( default 0 ) -b Set Baud ( default 9600 ) -c Set USBasp Crystal Hz ( default 12 MHz or 12000000 Hz ) -s Select USBasp with serial number. 4 Digits numeric only i.e. 3456, 2222, etc ). -u Serial Number to update ( 4 Digits numeric only i.e. 3456, 2222, etc ). Use with index -i when more than one USBasp are connected. -r Continuous read input -w Interactive send output examples Read from USBasp at index 0 with 4800 baud USBaspHIDUART -b 4800 -r Interactive write to USBasp at index 1 with 9600 baud USBaspHIDUART -i 1 -w Interactive write to USBasp with serial number 1111 with 9600 baud USBaspHIDUART -s 1111 -w Read from USBasp with 20 MHz crystal at index 1 with 19200 baud USBaspHIDUART -i 1 -b 19200 -c 20000000 -r Read from USBasp with 20 MHz crystal and with serial number 2345 with 19200 baud USBaspHIDUART -s 2345 -b 19200 -c 20000000 -r Update the first found USBasp's serial number with 3456 USBaspHIDUART -u 3456 Update the USBasp's at index 3 serial number with 3456 USBaspHIDUART -i 3 -u 3456

Building USBaspHIDUART from source is very straightforward :

Note: You’ll need FreePascal 3.0.4 and higher installed.

( it’s always better to build in another directory )

\utility\USBaspHIDUART>mkdir build \utility\USBaspHIDUART>cd build \utility\USBaspHIDUART\build>fpc.exe -MObjFPC -FU. -Fu..\hidapi.pas ..\USBaspHIDUART.pas -o.\USBaspHIDUART.exe 
\utility\USBaspHIDUART>mkdir build \utility\USBaspHIDUART>cd build \utility\USBaspHIDUART\build>fpc.exe -MObjFPC -FU. -Fu../ -Fu../hidapi.pas -dUseCThreads ../USBaspHIDUART.pas -o./USBaspHIDUART 

About

Источник

Оцените статью
Adblock
detector