Current Version: Public Release 3.0 IN PUBLIC RELEASE 3.0: ======================================= * Added in audio feedback for several situations * Removed direct dataflash programming code to save space (nobody used it anyway) * "Store" replaced with "Flash" in DATASTORE STATS now that confusion with PRGM DATAFLASH MODE is not possible * Fixed Fusebyte/Lockbyte bug in PROGRAM AVR mode * Fixed EEPROM storage bug * Fixed incorrect message size on CMD_UNKNOWN return in ProgramManager * Fixed SPI_MULTI bounds error (off by one) * Changed strings to use char rather than uint8_t, allowing for a generic makefile without GCC4.x specific flags * PROGRAM AVR mode now allows for arbitrary combinations of programming options * Added in new startup mode settings option * Programming a data type in STORAGE MODE now automatically enables that data type for programming in PROGRAM AVR mode * Fixed EEPROM programming very slow in all modes * Returned firmware version can now be set up to V2.20 * Target busy-wait loops now have timeouts of 100 milliseconds, moved busy-wait to its own routine for size * 921600Hz programming speed is now correct (was actually double that due to a mis-calculation) * New programming speeds (accessable via settings menu only) added - 115200Hz and 1843200Hz options * RingBuffer access is now protected against race-conditions (atomic access) * Added support for non-consecutive HEX file storage * Write Flash/EEPROM command now only stored once per program to save on EEPROM lifespan * PROG DONE/FAIL message is supressed when statup mode is set to PRODUCTION * Made module-internal functions static project wide * Status LED now blinks red when an error occurs * Changes to the RESET MODE option now take effect immediatly after the option is exited * CPU now enters power save mode when awaiting user input, and idle mode when awaiting PC/user input, saving power * Added in ATTR_WARN_UNUSED_RESULT for applicable functions, to reduce coding errors * Fixed logic error in the extended address checking that was preventing >128KB devices from being programmed correctly * Slimmed down LCD driver routines, eliminated unneeded segment buffering * LOGIC level reset now hard drives, rather than uses the AVR's internal pullup * Address loaded in from computer via a union to save space (non-portable, but smaller/faster) * Fixed incorrect buffer size in MAIN_ShowProgType, preventing possible overflows and RAM corruption * Fixed delays while scrolling a LCD message changed over a loop to wait until the LCD message has finished scrolling * Delay header changed over to a custom one written by Hans-Juergen Heinrichs for more accuracy and flexibility * Added in function descriptions to increase code maintainability * Program from storage now uses the new Virtual AVR Memory Manager layer to manage reading back the bytes from the dataflash * Progressbar while programming from dataflash now gives full range while programming * Moved individual settings functions to new Settings.c source file * Added recovery ISP speed mode to repair mis-configured AVR fuses by providing an external clock to the target * Fixed SET FIRM VERSION error that would cause ButtLoad to send the incorrect version back to the PC if changed * Added in Dataflash page to buffer compare, so that the dataflash pages are only updated if the new data differs * Changed LCD refresh rate from 32Hz to 64Hz, to work with the newer Butterflies * Moved dataflash busywait loops to before each datflash operation, allowing for other code to be executed until dataflash is needed again * Added support to calibrate a target's OSCCAL value via the AICB_CMD_READ_OSCCAL_ISP command * Fixed sleep timeout too short due to power down sleep mode exposing a chip bug (miscounts) * ButtTags with lowercase characters are now supported * Red status LED now flashes (indicating error state) when programming fails in PROGRAM AVR mode * SYNC ERROR message now displayed when programming both lock and fuse bytes from PROGRAM AVR mode, and the re-sync fails * Most of the comments removed, leaving only the important ones to clean up the code a bit * VirtualAVRMemMamager now saves the Erase Chip command bytes without wasting EEPROM saving the V2Protocol command * ButtLoad busy "*WAIT*" message is now "*BUSY*" * DATAFLASH STATS mode now checks the dataflash before displaying data, to guard against faulty readings from a damaged/missing chip * Removed redundant extended address checking code from AICB_CMD_READ_FLASH_ISP handler in AVRISP mode * USI word transmit and BUFF_GetBuffByte functions converterted to static inline for speed * Removed unused SPI_TransmitWord function * Added in ERASE NEEDED error for STORAGE MODE, which allowed for the use of the faster Buffer to Flash Without Erase Dataflash command * PROGRAM AVR now checks EEPROM flags to determine if Flash/EEPROM data has been stored rather than calling SM_GetStoredDataSize * Clearing memory now clears the Virtual AVR as well, including inside the startup conditional clearing * SPI speed reduced again to about 114KHz - greater noise immunity, and most of the delay is due to the Dataflash write times * More bounds error fixes to AICB_CMD_SPI_MULTI command IN PUBLIC RELEASE 2.0: ======================================= * OSCCAL is now calibrated before any function involving the USART * Removed the now unnessesary manual and auto calibration settings menu items * Removed unused USART_TxString function * EEPROM handling changed over to the (now M169 compatible) AVRLibC routines * USART Rx interrupt moved to RingBuff.c and changed to the contents of the ringbuffer store routine for size/speed * Fixed a few more dataflash programming-related glitches * Moved the timeout setup function code to the TIMEOUT_TIMER_ON() macro * Timeout system now uses Timer2, freeing up Timer1 for auto sleep * Function parameters changed to const (where possible) for robustness * Dataflash busy checking moved to a seperate routine for speed * Added auto-powerdown with user settable timeout * Correct command timeout error is now returned via the packet state machine instead of a command error * Dataflash routines now make local copies of the SPI send routine pointer to save codespace and time * EEPROM erasing changed so that only the used memory locations are cleared to minimise wear * Added a ARRAY_UPPERBOUND macro to provide automatic code adjustment to increased array sizes * Fixed include files capitolisation so that ButtLoad can be compiled on Unix systems (thanks to Bernd Trog) * Added extra ISR attributes for smaller codesize/deletion protection on GCC4.x (also thanks to Bernd Trog) * Status LED now turns orange while a target sync is attempted * Timeout before checksum check no longer returns a bad checksum error * Added an "PRGM ALL" option for PROGRAM AVR mode * Obscure BUTTAG reading fault fixed where a tag preceeded by the first two or more tag header characters would not be recognized * Fixed JPG schematics (thanks to C@PPER of AVRFreaks.net) * Status LED is now turned off while in sleep mode to conserve power * RingBuffer code changed to use uint8_t indexes rather than pointers * Added in RESET MODE settings option * SPI speed massivly reduced to prevent noise errors - this has no impact on storage time since it is the write delay that takes the longest time * Fixed STORAGE MODE erase command saving routine * LCD Driver now uses a forced inlined LCD_WriteChar routine (only called once) to allow for better optimisation * Fixed main menu double push required on startup to change current item bug * Changed my small but slow large integer division code over to the standard library code, should be faster with the expense of increased flash consumption * Display now shows the wait message while searching for tags in stored memory * ButtLoad now gives dummy responses to STK500-only parameter GET/SET commands, which the latest AVRStudio seems to like to send for some reason * Turned off the USART U2X bit as it was not needed and reduced the reliability of the serial connection * TagManager now uses a single uint32_t variable to decrease code size and tag scanning time * System clock prescaling removed; buggy and wouldn't reduce power consumption anyway * USI transfer routine re-written in ASM for maximum transfer speed * OSCCAL routine changed over to a polled method rather than an interrupt method for optimal calibration * Removed excess "DataflashInfo.CurrBuffByte++;" statement from ProgDataflash.c * LCD is now shut down and powered off correctly when Butterfly enters sleep mode * LCD and USART subsystems are now powered off (in addition to previous SPI and ADC) when not in use, via the Power Reduction Register * Reduced LCD driver RAM and ISR time requirements * Added in a progress bar when programming program or EEPROM data in PROGRAM AVR mode IN PUBLIC RELEASE 1.3: ======================================= * PROGRAMMING DONE/FAIL messaged display code altered for smaller codesize * Fixed EEPROM poll bug - now uses wait poll if last byte in page is the same as the poll value * USI Timer0 compare match routine rewritten in optimised ASM for speed, increased USI max speed value * USI Speed/Compare Value table reordered and blank EEPROM check removed for code size (due to table reorder code still defaults to fastest setting if the EEPROM is blank) * Removed the WriteCollision flag from the USI driver, since the routine waits for completion before exiting anyway * Re-added main menu option for storage info (accidentally removed in 1.2) * Changed dataflash erase (external) method to the faster block erase, slow erase now performed after computer reply to prevent a timeout * Fixed typo in CMD_READ_OSCCAL_ISP section of the ProgramManager.c packet interpretation routine * External dataflash total pages table corrected * Dataflash access speed increased to 4MHz (up from ~150KHz) * System clock is now prescaled down to 1MHz inside the main menu to save power * Removed unnessesary CopyFlashToBuffer command in ProgramManager.c * Added code to exit OSCCAL faster if a value within the tollerace cannot be found (closest value used) IN PUBLIC RELEASE 1.2: ======================================= * PROGRAMMING DONE and PROGRAMMING FAIL messages are now shown for a longer time so they can be fully read * DATAFLASH ERROR now also shown in PRGM DATAFLASH MODE if no attached dataflash is found * ISP short detection routines removed for technical reasons * Atmel LCD driver rewritten for size and speed IN PUBLIC RELEASE 1.1: ======================================= * PROGRAMMING DONE message changed so that it will show PROGRAMMING FAIL after an error * Unnessesary clearing of invalid JoyStatus values removed * Seperate external dataflash /CS pin removed, function integrated into slave AVR /RESET pin IN PUBLIC RELEASE 1.0: ======================================= * Fixed ISP short detection bug (always returning ISP short) * ISP Short detection system now checks for Dataflash /CS short correctly * Added SLEEP MODE option * Fixed verify fail on large flash micros bug * Added ButtTag functionality * Added Storage sizes function * Fixed dataflash mask address bug * Fixed /RESET line not being released from hi-impeedance bug * MAIN_IntToStr now forces null-termination of strings * Extended address checking moved to a new subroutine; flag now cleared after command * Interrupts now re-enabled while writing to EEPROM rather than after operation complete * Packet timeout increased to slightly more than the computer timeout * Added function to jump to the bootloader * Programming of the data will not commence if no erase commands are in memory