Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Implement TPI mode for AVRISPmkII/STK600.
Browse files Browse the repository at this point in the history
Add ATtiny4/5/9/10 to avrdude.conf.in.
Document TPI and new device support.




git-svn-id: svn://svn.sv.gnu.org/avrdude/trunk/avrdude@916 81a1dc3b-b13d-400b-aceb-764788c761c2
  • Loading branch information
joerg_wunsch committed Jan 15, 2010
1 parent 9a5d2b8 commit 1e92180
Show file tree
Hide file tree
Showing 11 changed files with 430 additions and 62 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2010-01-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>

* stk500v2_private.h: Implement TPI mode for AVRISPmkII/STK600
* config_gram.y: (Dito.)
* avrpart.h: (Dito.)
* stk500v2.c: (Dito.)
* main.c: (Dito.)
* lexer.l: (Dito.)
* avrdude.conf.in: Add ATtiny4/5/9/10
* avrdude.1: Document TPI and new device support.
* doc/avrdude.texi: (Dito.)

2010-01-14 Joerg Wunsch <j.gnu@uriah.heep.sax.de>

Submitted by clint fisher:
Expand Down
5 changes: 5 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ Current:

- AVR32A0512 (JTAGMKII only)
- ATmega32U4
- ATtiny4
- ATtiny5
- ATtiny9
- ATtiny10

* New programmers supported:

- BusPirate
- Arduino
- JTAGICEmkII and AVR Dragon in PDI mode (ATxmega devices)
- STK600 and AVRISP mkII in TPI mode (ATtiny4/5/9/10)

* Bugfixes

Expand Down
10 changes: 9 additions & 1 deletion avrdude.1
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ below for details.
Atmel's STK600 programmer is supported in ISP and high-voltage
programming modes, and connects through the USB.
For ATxmega devices, the STK600 is supported in PDI mode.
For ATtiny4/5/9/10 devices, the STK600 and AVRISP mkII are supported in TPI mode.
.Pp
The simple serial programmer described in Atmel's application note
AVR910, and the bootloader described in Atmel's application note
Expand Down Expand Up @@ -256,20 +257,24 @@ pwm2 AT90PWM2
pwm2b AT90PWM2B
pwm3 AT90PWM3
pwm3b AT90PWM3B
t12 ATtiny12
t10 ATtiny10
t12 ATtiny12 (***)
t13 ATtiny13
t15 ATtiny15
t2313 ATtiny2313
t25 ATtiny25
t26 ATtiny26
t261 ATtiny261
t4 ATtiny4
t44 ATtiny44
t45 ATtiny45
t461 ATtiny461
t5 ATtiny5
t84 ATtiny84
t85 ATtiny85
t861 ATtiny861
t88 ATtiny88
t9 ATtiny9
ucr2 AT32uca0512
usb1286 ATmega1286
usb1287 ATmega1287
Expand Down Expand Up @@ -299,6 +304,9 @@ The AT90S2323 and ATtiny22 use the same algorithm.
Flash addressing above 128 KB is not supported by all
programming hardware. Known to work are jtag2, stk500v2,
and bit-bang programmers.
.It "(***)"
The ATtiny11 uses the same algorithm, but can only be
programmed in high-voltage serial mode.
.El
.It Fl b Ar baudrate
Override the RS-232 connection baud rate specified in the respective
Expand Down
164 changes: 163 additions & 1 deletion avrdude.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
# desc = <description> ; # quoted string
# has_jtag = <yes/no> ; # part has JTAG i/f
# has_debugwire = <yes/no> ; # part has debugWire i/f
# has_pdi = <yes/no> ; # part has PDI i/f
# has_tpi = <yes/no> ; # part has TPI i/f
# devicecode = <num> ; # deprecated, use stk500_devcode
# stk500_devcode = <num> ; # numeric
# avr910_devcode = <num> ; # numeric
Expand Down Expand Up @@ -185,7 +187,7 @@
# http://www.atmel.com/atmel/acrobat/doc2525.pdf
#

#define ATTINY10 0x10
#define ATTINY10 0x10 /* the _old_ one that never existed! */
#define ATTINY11 0x11
#define ATTINY12 0x12
#define ATTINY15 0x13
Expand Down Expand Up @@ -15316,3 +15318,163 @@ part
;
;

#------------------------------------------------------------
# ATtiny4
#------------------------------------------------------------

part
id = "t4";
desc = "ATtiny4";
signature = 0x1e 0x8f 0x0a;
has_tpi = yes;

memory "flash"
size = 512;
offset = 0x4000;
page_size = 16;
blocksize = 128;
;

memory "signature"
size = 3;
offset = 0x3fc0;
;

memory "fuse"
size = 1;
offset = 0x3f40;
blocksize = 4;
;

memory "calibration"
size = 1;
offset = 0x3f80;
;

memory "lockbits"
size = 1;
offset = 0x3f00;
;
;


#------------------------------------------------------------
# ATtiny5
#------------------------------------------------------------

part
id = "t5";
desc = "ATtiny5";
signature = 0x1e 0x8f 0x09;
has_tpi = yes;

memory "flash"
size = 512;
offset = 0x4000;
page_size = 16;
blocksize = 128;
;

memory "signature"
size = 3;
offset = 0x3fc0;
;

memory "fuse"
size = 1;
offset = 0x3f40;
blocksize = 4;
;

memory "calibration"
size = 1;
offset = 0x3f80;
;

memory "lockbits"
size = 1;
offset = 0x3f00;
;
;


#------------------------------------------------------------
# ATtiny9
#------------------------------------------------------------

part
id = "t8";
desc = "ATtiny9";
signature = 0x1e 0x90 0x08;
has_tpi = yes;

memory "flash"
size = 1024;
offset = 0x4000;
page_size = 16;
blocksize = 128;
;

memory "signature"
size = 3;
offset = 0x3fc0;
;

memory "fuse"
size = 1;
offset = 0x3f40;
blocksize = 4;
;

memory "calibration"
size = 1;
offset = 0x3f80;
;

memory "lockbits"
size = 1;
offset = 0x3f00;
;
;


#------------------------------------------------------------
# ATtiny10
#------------------------------------------------------------

part
id = "t10";
desc = "ATtiny10";
signature = 0x1e 0x90 0x03;
has_tpi = yes;

memory "flash"
size = 1024;
offset = 0x4000;
page_size = 16;
blocksize = 128;
;

memory "signature"
size = 3;
offset = 0x3fc0;
;

memory "fuse"
size = 1;
offset = 0x3f40;
blocksize = 4;
;

memory "calibration"
size = 1;
offset = 0x3f80;
;

memory "lockbits"
size = 1;
offset = 0x3f00;
;
;


1 change: 1 addition & 0 deletions avrpart.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ typedef struct opcode {
#define AVRPART_AVR32 0x0100 /* part is in AVR32 family */
#define AVRPART_INIT_SMC 0x0200 /* part will undergo chip erase */
#define AVRPART_WRITE 0x0400 /* at least one write operation specified */
#define AVRPART_HAS_TPI 0x0800 /* part has TPI i/f rather than ISP (ATtiny4/5/9/10) */

#define AVR_DESCLEN 64
#define AVR_IDLEN 32
Expand Down
11 changes: 11 additions & 0 deletions config_gram.y
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ static int parse_cmdbits(OPCODE * op);
%token K_HAS_JTAG /* MCU has JTAG i/f. */
%token K_HAS_DW /* MCU has debugWire i/f. */
%token K_HAS_PDI /* MCU has PDI i/f rather than ISP (ATxmega). */
%token K_HAS_TPI /* MCU has TPI i/f rather than ISP (ATtiny4/5/9/10). */
%token K_IDR /* address of OCD register in IO space */
%token K_IS_AVR32 /* chip is in the avr32 family */
%token K_RAMPZ /* address of RAMPZ reg. in IO space */
Expand Down Expand Up @@ -1078,6 +1079,16 @@ part_parm :
free_token($3);
} |

K_HAS_TPI TKN_EQUAL yesno
{
if ($3->primary == K_YES)
current_part->flags |= AVRPART_HAS_TPI;
else if ($3->primary == K_NO)
current_part->flags &= ~AVRPART_HAS_TPI;

free_token($3);
} |

K_IS_AVR32 TKN_EQUAL yesno
{
if ($3->primary == K_YES)
Expand Down
Loading

0 comments on commit 1e92180

Please sign in to comment.