avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] stk500v2: Wave good-bye to the SPI_MULTI command!


From: Joerg Wunsch
Subject: [avrdude-dev] stk500v2: Wave good-bye to the SPI_MULTI command!
Date: Tue, 7 Oct 2014 00:35:29 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

I just committed a change that finally obsoletes the historic
SPI_MULTI command for the stk500v2 implementation.

The byte-wide read and write functions have been switched to
stk500isp_read_byte() and stk500isp_write_byte(), respectively.  These
functions have already been around in the code since the JTAGICE3 no
longer implemented the historic SPI_MULTI command anyway.  I now
extended them to be usable outside the JTAGICE3/ATMEL-ICE.

As a side-effect, I believe I have fixed all bugs that prevented a
successful true byte-wide access to flash and EEPROM.  This means, in
terminal mode, it's now possible (again) to modify single bytes in
flash and EEPROM memory areas, albeit now based on a full page
read/modify/write cycle per each byte to be written, contributing to
some wear-out.

This is quite a major change.  The stk500v2 backend is used as the ISP
backend in all more recent Atmel tools (AVRISPmkII, JTAGICEmkII,
STK600, AVR Dragon, JTAGICE3, Atmel-ICE, all in ISP mode).
Consequently, *please test* this change as much as possible before we
are going to roll a new release.

As a historic note: AVRDUDE started out supporting simple bit-bang
programmers attached to the computer's printer (parallel) port.  For
that purpose, it had to implement its own ISP protocol implementation
straight from the beginning.  Later, when extending it to support the
STK500 serial communication protocol, this was done by wrapping
everything around the "universal command" in the STK500 firmware,
which provided a simple pass-through of AVRDUDE's already proven own
ISP logic to the STK.  That way, only the actual STK500 communication
protocol had to be added, without changing the heart of the ISP
engine.  While all the page-based stuff has been added later on, the
basic simple byte-wide access functions used to stick with the
original implementation until the advent of the JTAGICE3, which
eventually dropped support for the SPI passthrough command.
-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]