12001-12-30 Brian S. Dean <bsd@bsdhome.com> 2 3 * main.c: Update version. 4 5 * avrdude.conf.sample: Clarify a comment. 6 7 * avrdude.conf.sample: fix address bits 8 9 * avrdude.1: Bring up to date. 10 112001-12-29 Brian S. Dean <bsd@bsdhome.com> 12 13 * avrdude.conf.sample: Add the AVR3 progammer. 14 15 * avr.c, avrdude.conf.sample, config_gram.y, main.c, pindefs.h: 16 Fix VCC assertion. 17 18 Make the BUFF pin a mask like VCC to allow multiple pins to be 19 asserted at the same time (STK200 has two buffer enable lines). 20 21 Add the STK200 programmer. 22 23 Fix EEPROM address line selection for several parts. 24 252001-12-15 Brian S. Dean <bsd@bsdhome.com> 26 27 * avrdude.conf.sample: fix spelling error 28 292001-11-24 Brian S. Dean <bsd@bsdhome.com> 30 31 * Makefile: 32 Change "WARNING" to "NOTE" when overwriting the avrprog.conf file. 33 34 * avrdude.1: Add my e-mail address. 35 36 * avrdude.conf.sample: 37 Add comments about instruction formats. Correct an instruction 38 specification (cut&paste error). 39 402001-11-21 Brian S. Dean <bsd@bsdhome.com> 41 42 * avr.c, config_gram.y, lexer.l, term.c: 43 In interactive mode, reset the address and length if we start dumping 44 a memory type different than the previous one. 45 46 * avr.c, avrdude.conf.sample, config_gram.y: 47 Allow instruction data to be specified more flexibly, which can be 48 used to make the instruction input more readable in the config file. 49 50 * main.c: Bump version number. 51 52 * Makefile, avr.c, avr.h, avrdude.conf.sample, config.c, config.h: 53 * config_gram.y, fileio.c, fileio.h, lexer.l, main.c, term.c: 54 This is a major re-write of the programming algorithms. The Atmel 55 serial programming instructions are not very orthoganal, i.e., the 56 "read fuse bits" instruction on an ATMega103 is an entirely different 57 opcode and data format from the _same_ instruction for an ATMega163! 58 Thus, it becomes impossible to have a single instruction encoding 59 (varying the data) across the chip lines. 60 61 This set of changes allows and requires instruction encodings to be 62 defined on a per-part basis within the configuration file. Hopefully 63 I've defined the encoding scheme in a general enough way so it is 64 useful in describing the instruction formats for yet-to-be invented 65 Atmel chips. I've tried hard to make it match very closely with the 66 specification in Atmel's data sheets for their parts. It's a little 67 more verbose than what I initially hoped for, but I've tried to keep 68 it as concise as I could, while still remaining reasonably flexible. 69 702001-11-19 Brian S. Dean <bsd@bsdhome.com> 71 72 * avr.c, avr.h, avrdude.conf.sample, main.c, ppi.c, term.c: 73 Add support for ATMega163. 74 75 Add support for reading/writing ATMega163 lock and fuse bits. 76 Unfortunately, in looking at the specs for other ATMega parts, they 77 use entirely different instruction formats for these commands. Thus, 78 these routines won't work for the ATMega103, for example. 79 80 Add support for sending raw command bytes via the interactive terminal 81 interface. This allows one to execute any programming instruction on 82 the target device, whether or not avrprog supports it explicitly or 83 not. Thus, one can use this feature to program fuse / lock bits, or 84 access any other feature of a current or future device that avrprog 85 does not know how to do. 86 87 Add in comments, an experimental instruction format in the 88 configuration file. If this works out, it would allow supporting new 89 parts and non-orthoganal instructions across existing parts without 90 making avrprog code changes. 91 922001-11-17 Brian S. Dean <bsd@bsdhome.com> 93 94 * avrdude.conf.sample: Add ATMEGA163 part. 95 962001-11-11 Brian S. Dean <bsd@bsdhome.com> 97 98 * main.c: output formatting 99 1002001-11-05 Brian S. Dean <bsd@bsdhome.com> 101 102 * ppi.c: Get ppi.h from /usr/include, not /sys. 103 1042001-10-31 Brian S. Dean <bsd@bsdhome.com> 105 106 * avr.c, avrdude.conf.sample, main.c: Correct version string. 107 Update read/write status more frequently. 108 Prefix ATMega parts with an 'm'. 109 1102001-10-16 Brian S. Dean <bsd@bsdhome.com> 111 112 * avr.c: Change ording for memory display. 113 114 * config_gram.y: comment 115 116 * avr.c, avr.h, avrdude.conf.sample, config_gram.y, lexer.l, term.c: 117 Fix (again, hopefully) page addressing for the ATMega parts. 118 119 Rename the poorly chosen name "bank" to "page" for page addressing. 120 Atmel calls it "page" in their documentation. 121 122 * config_gram.y, main.c: Fix an (non)exit. 123 Silence a couple of compiler warnings. 124 125 * avr.c, avr.h, avrdude.conf.sample, config_gram.y, main.c: 126 Fix ATMega flash addressing. Add an ATMEGA16 part. Perform sanity 127 checking on the memory parameters for parts that do bank addressing. 128 1292001-10-15 Brian S. Dean <bsd@bsdhome.com> 130 131 * config.c, config.h, lists.h: Add copyright. 132 133 * config_gram.y, lexer.l, lists.c: Add copyrights. 134 135 * Makefile: Attempt to install avrprog.conf. 136 137 * avrdude.conf.sample: Correct dt006 pinout. 138 139 * Makefile, lexer.l: 140 Try and detect an old-style config file and print an appropriate error 141 message and a suggestion for correcting it. 142 143 * Makefile, avr.c, avrdude.1, avrdude.conf.sample: Update the man page. 144 145 Miscellaneous minor cleanups. 146 1472001-10-14 Brian S. Dean <bsd@bsdhome.com> 148 149 * Makefile, Makefile.inc, avr.c, avr.h, avrdude.conf.sample: 150 * config.c, config.h, config_gram.y, lexer.l, lists.c, lists.h: 151 * main.c, pindefs.h, term.c: 152 Use lex/yacc for parsing the config file. Re-work the config file 153 format using a more human-readable format. 154 155 Read part descriptions from the config file now instead of hard-coding 156 them. 157 158 Update usage(). 159 160 Cleanup unused code. 161 162 * Makefile, avr.c, avr.h, fileio.c, term.c: 163 First cut at supporting the ATmega 103 which uses bank addressing and 164 has a 128K flash. 165 166 Due to the bank addressing required, interactive update of the flash 167 is not supported, though the eeprom can be updated interactively. 168 Both memories can be programmed via non-interactive mode. 169 170 Intel Hex Record type '04' is now generated as required for outputing 171 memory contents that go beyond 64K. 172 1732001-10-13 Brian S. Dean <bsd@bsdhome.com> 174 175 * avr.c, avr.h, fileio.c, fileio.h, main.c, ppi.c, ppi.h, term.c: 176 * term.h: 177 Style fixes. 178 179 * avr.c, avr.h, fileio.c, fileio.h, main.c, term.c: 180 Commit changes in preparation for support the ATMega line. 181 1822001-10-01 Brian S. Dean <bsd@bsdhome.com> 183 184 * Makefile: Don't override CFLAGS. 185 186 * avrdude.1: Correct default pin assignment. 187 188 * avr.c, fileio.c, main.c, ppi.c, term.c: 189 Remove debugging code - it served its purpose. 190 191 Update copyrights. 192 1932001-09-21 Brian S. Dean <bsd@bsdhome.com> 194 195 * main.c: 196 Be sure to read the exit specs after the pin configuration has been 197 assigned, otherwise, we may apply the exit specs to the wrong pins. 198 199 * main.c: debugging 200 2012001-09-20 Brian S. Dean <bsd@bsdhome.com> 202 203 * avrdude.1, avrdude.conf.sample, main.c: 204 Prefix pin config entries in the config file with a "c:". Later, I 205 might make part descriptions read in this way and we can use a 206 different letter for those (p). This will make the parsing easier to 207 distinguish between the entry types. 208 209 * main.c: Initialize pin configuration description. 210 2112001-09-19 Brian S. Dean <bsd@bsdhome.com> 212 213 * AVRprog.pdf, Makefile, avr.c, avrdude.1, avrdude.conf.sample: 214 * avrdude.pdf, fileio.c, fileio.h, main.c, pindefs.h, term.c: 215 Make the pin definitions configurable based on entries in a config 216 file. This makes supporting other programmers much easier. 217 218 Rename AVRprog.pdf to avrprog.pdf. 219 2202001-04-29 Brian S. Dean <bsd@bsdhome.com> 221 222 * avrprog-programmer.jpg: Remove this image file from the repository. 223 2242001-04-26 Brian S. Dean <bsd@bsdhome.com> 225 226 * avrprog-schematic.jpg: 227 Remove this image, use AVRprog.pdf as the preferred schematic for the 228 programmer. 229 2302001-04-25 Brian S. Dean <bsd@bsdhome.com> 231 232 * AVRprog.pdf, Makefile, avrdude.1: 233 Add a schematic provided by Joerg Wunch and also update the manual 234 page (also updated by Joerg) to reference the schematic. 235 2362001-02-25 Brian S. Dean <bsd@bsdhome.com> 237 238 * Makefile, Makefile.inc: Automate dependency generation. 239 2402001-02-08 Brian S. Dean <bsd@bsdhome.com> 241 242 * main.c: Turn off ready led when finished programming. 243 244 * main.c: update version 245 246 * avr.c, main.c: Correct a few comments. 247 248 * Makefile, avr.c, term.c: Makefile : update dependencies 249 250 avr.c : correct status led updates 251 252 term.c : update status leds on write, make the address and length 253 arguments for dump optional. 254 2552001-01-26 Brian S. Dean <bsd@bsdhome.com> 256 257 * main.c: Version 1.1 258 259 * main.c: 260 Hmmm ... cvs co -D <timestamp> does not work. Change the revision 261 timestamp to a full date/time value. 262 263 * avr.c, fileio.c, main.c, ppi.c, term.c: 264 Add a -V option to display the version information about each 265 component module. This is intended for support purposes, so that I 266 can tell unambiguously what version a binary out in the field is. 267 268 Additionally, display a revision timestamp along with the version 269 number. This also is intended for aiding in support and is the Unix 270 time of the latest component module. Having this, should allow me to 271 do a "cvs co -D timestamp avrprog" and get exactly the source of the 272 version that is being reported. 273 274 * fileio.c: 275 Return the maximum address (+1) written as opposed to the actual 276 number of bytes written. The presence of an Intel Hex address 277 record can cause these two number to be different; but the callers 278 of this routine need the former. 279 280 * main.c: 281 Fix a place where we were exiting without applying the exit-specs. 282 283 Wrap a long line. 284 285 * avr.c, fileio.c: avr.c: Update a comment. 286 287 fileio.c: Properly handle all the Intel Hex record types that I can 288 find information about. 289 2902001-01-25 Brian S. Dean <bsd@bsdhome.com> 291 292 * Usage, avr.h: Get rid of the Usage file. 293 2942001-01-24 Brian S. Dean <bsd@bsdhome.com> 295 296 * Makefile, avr.c, avr.h, main.c, pindefs.h, ppi.c: 297 Move pin definitions to their own file. 298 299 First pass at providing feedback via the optionally connected leds. I 300 don't actually have any of these attached to my programmer, so I can 301 only guess as whether this is toggling them on and off correctly. 302 303 Also, enable and disable the optional 74367 buffer. 304 305 * avr.h, main.c, ppi.c, ppi.h, avr.c: 306 Rearrange the pinout for the programmer to be a little more logical. 307 Provide hooks to support a buffered programmer, pin 6 is now used to 308 enable a buffer that can be used to isolate the target system from the 309 parallel port pins. This is important when programming the target 310 in-system. 311 312 Totally change the way the pin definitions are defined. Actually 313 set/clear pins based on the way more intuitive pin number, instead of 314 PPI data register, bit number combination. A table of pin data is 315 used so that any hardware inversion done by the parallel port is 316 accounted for, what you set is actually what appears at the pin. 317 Retain the old method for handling Vcc, however, because the hold 318 method is much easier to use when setting / retrieving multiple pins 319 simultaneously. 320 3212001-01-22 Brian S. Dean <bsd@bsdhome.com> 322 323 * Makefile: Don't gzip the man page. 324 325 * avrdude.1: .Nm macro fix. Submitted by Joerg. 326 327 * main.c: Cosmetic, don't output a preceding linefeed for usage(). 328 329 * Makefile, avr.c, avr.h, fileio.c, term.c: 330 Makefile : use gzip -f for man page installation so that we don't get 331 prompted. 332 333 avr.c avr.h fileio.c term.c : 334 335 Change the avrpart data structure so that the typedef AVRMEM is 336 used as an index into an array for the sizes of the memory types 337 and also for pointers to buffers that represent the chip data for 338 that memory type. This removes a lot of conditional code of the 339 form: 340 341 switch (memtype) { 342 case AVR_FLASH : 343 ... 344 } 345 346 Also, re-code avr_read_byte() and avr_write_byte() to properly 347 handle the flash memory type without having to tell them whether 348 they should program the high byte or the low byte - figure that 349 out from the address itself. For flash memory type, these 350 routines now take the actual byte address instead of the word 351 address. This _greatly_ simplifies many otherwise simple 352 operations, such a reading or writing a range of memory, by not 353 having to worry about whether the address starts on an odd byte 354 or an even byte. 355 3562001-01-20 Brian S. Dean <bsd@bsdhome.com> 357 358 * avr.c, avr.h, fileio.c, fileio.h, main.c: 359 Return error codes instead of exiting, thus making sure that we exit 360 only via main() so that the exitspecs are properly applied. 361 362 When reading input data from a file, remember how many bytes were read 363 and write and verify only that many bytes. 364 365 Don't complain when an input file size is smaller than the memory size 366 we are programming. This is normal. 367 368 * fileio.c: 369 Correct checksum calculation; failure to account for the value of the 370 record type was causing non-zero record types to be calculated 371 incorrectly. 372 373 * Makefile, main.c: Makefile : install the man page 374 375 main.c : drop the giant usage text now that we have a man page. 376 377 * avrdude.1: 378 Add initial man page graciously contributed by Joerg Wunsch. Thanks 379 Joerg! 380 3812001-01-19 Brian S. Dean <bsd@bsdhome.com> 382 383 * term.c: 384 Accept abbreviations for eeprom and flash for the dump and write 385 commands. 386 387 Fix small bug keeping 1 character command lines from being added to 388 the history. 389 390 * term.c: 391 Implement enough state in cmd_dump so that if it is called with no 392 arguments, it successively dumps the next chunk of data of the same 393 previously specified length. 394 395 * term.c, term.h, fileio.c, fileio.h, main.c, ppi.c, ppi.h: 396 * Makefile, avr.c, avr.h, avrprog.c: 397 The program was getting too large for a single file. Split it up into 398 more modular pieces. 399 400 Also, accept command abbreviations as long as they are not ambiguous. 401 402 * avrprog.c: 403 Add ability to specify the state of the power and reset pins on 404 program exit. Default to leaving the pins in the state they were when 405 we found them. 406 407 Contributed by: Joerg Wunsch 408 4092001-01-18 Brian S. Dean <bsd@bsdhome.com> 410 411 * Makefile, avrprog.c: 412 Switch to using readline() for getting terminal input. I can't seem 413 to get the history capabilities working yet, but even so, it does 414 better handling of the prompt and strips newlines for us, so it's 415 still a win. 416 417 Add a few new commands for terminal mode: help, sig, part, erase. 418 Display rudimentory help using the help command. 419 420 Add some function prototypes. 421 422 * Usage, avrprog.c: 423 Change -c (interactive command mode) to the more intuitive -t 424 (terminal mode). 425 426 Make binary format the default for output. 427 428 Update the parts table with corrections for old values and add some 429 new values. 430 4312001-01-15 Brian S. Dean <bsd@bsdhome.com> 432 433 * avrprog.c: 434 Automatically verify on-chip data with what we just programmed. 435 436 * avrprog.c, Makefile: 437 Prepare the Makefile for integration into the FreeBSD ports tree. 438 439 Fix a few "may be used uninitialized" bugs found by -Wall. 440 4412001-01-14 Brian S. Dean <bsd@bsdhome.com> 442 443 * avrprog.c: Free a buffer. 444 445 * avrprog.c: 446 Use a smarter programming algorithm - read the existing data byte 447 first and only write the new one if it is different. 448 449 Add -n option which is a test mode in which the chip is not actually 450 updated. This option does not affect writes in interactive mode. 451 452 * avrprog.c: Add the "dump" and "write" interactive commands. 453 454 * avrprog.c: 455 Correctly produce and handle "end of record" for intel hex files. 456 4572001-01-13 Brian S. Dean <bsd@bsdhome.com> 458 459 * avrprog.c: 460 Re-enable writing to the chip. I should probably should make this a 461 command-line selectable option so that I don't keep forgetting and 462 committing it with it disabled. 463 464 * avrprog.c: 465 Add a newline before exiting due to command line errors. Perform a 466 bit more option compatibility testing between -c, -i, and -o. 467 468 * avrprog.c: Add input file format auto-detection support. 469 470 * Usage, avrprog.c: Say what the defaults are. 471 472 * avrprog-programmer.jpg, Usage, avrprog-schematic.jpg: New files. 473 474 * avrprog.c: Correct usage text. 475 476 * avrprog.c: 477 Parameterize a few additional items per chip. Print out all per-chip 478 parameters on startup. Use the per-chip parameters in the code 479 instead of hard-coded values for the 2313. 480 481 * avrprog.c: Fix filename assignment error. 482 483 Clean up debugging code a little, utilize fileio() instead of making 484 direct calls to b2ihex(). 485 486 * avrprog.c: A lot of general code cleanup. 487 488 Re-work command line options to be more intuitive. 489 490 Support Intel Hex input and output file formats. Provide hooks to 491 support Motorola S-Record as well. 492 493 Add a few more part-specific parameters to the avrpart structure. 494 495 Only write the flash or eeprom if the data to be written is not 0xff. 496 4972000-12-31 Brian S. Dean <bsd@bsdhome.com> 498 499 * avrprog.c: Update a comment. 500 501 * avrprog.c: 502 Provide the ability to tie additionally tie pins 6-9 of the parallel 503 port to Vcc in order to supply more current. 504 505 Fix a typo on the size of the S1200's Flash. 506 507 Bring RESET low when programming is completed. 508 509 * avrprog.c: 510 Correct pin connection comments. Elaborate a bit on Vcc connection. 511 512 * avrprog.c: 513 Update after receiving some good feedback from Joerg Wunsch. We 514 should now be able to program AT90S1200's. 515 5162000-12-30 Brian S. Dean <bsd@bsdhome.com> 517 518 * avrprog.c: Don't limit eeprom addresses. 519 5202000-12-20 Brian S. Dean <bsd@bsdhome.com> 521 522 * Makefile, avrprog.c: 523 Add support for the 8515. Make the addition for other devices easier. 524 5252000-08-27 Brian S. Dean <bsd@bsdhome.com> 526 527 * avrprog.c: 528 Clear all bits except AVR_RESET when finished reading or programming 529 the Atmel device. 530 5312000-08-07 Brian S. Dean <bsd@bsdhome.com> 532 533 * avrprog.c: update announcement message 534 535 * avrprog.c: Update announcement message. 536 537 * avrprog.c: Return the correct return code from 'main()'. 538 539 * avrprog.c: 540 Add ppi_pulse() function and fix ppi_toggle() to actully toggle 541 instead of pulse. 542 543 Make all abnormal returns after the parallel port has been opened go 544 through a single exit point at the bottom of 'main()'. 545 5462000-08-06 Brian S. Dean <bsd@bsdhome.com> 547 548 * Makefile, avrprog.c: Makefile: add --pedantic compiler option 549 550 avrprog.c: 551 552 Add lots of comments, move getop() variable declarations to 553 the top of the program. 554 555 Add a typedef name to the AVR memory type and use it for 556 function declarations. 557 558 Add a usleep() delay in the sense loop to avoid becoming a cpu 559 hog. 560 561 Print out a version string so that folks know what version of 562 the software they are running. 563 564 Be sure and close the parallel device and the i/o file when 565 terminating abnormally. 566 567 * avrprog.c: Print out version information when invoked. 568 569 * Makefile, avrprog.c: Makefile: Add an install target. 570 571 avrprog.c: 572 573 Add license. 574 575 Document the header a bit better. 576 577 Add capability to read out and display the device signature bytes. 578 579 Add capability to power the device from the parallel port. 580 581 Eliminate debug print facility. 582 583 Provide 'avr_cmd()' function. 584 585 When memory locations don't program, generate a newline so that the 586 information is not overwritten and lost. 587 588 Don't print out the message about needing to specify a file if the 589 user is not requesting an operation that requires the file. 590 5912000-08-05 Brian S. Dean <bsd@bsdhome.com> 592 593 * avrprog.c: Pring usage when no arguments are supplied. 594 595 * Makefile, avrprog.c: Initial check-in 596 597 * Makefile, avrprog.c: New file. 598 599