
SPI reader-writer
-----------------

  web-page : http://www.pluc.fr/2010/03/how-to-remove-date-and-timestamp-from-gumpack-camera/

  Author : Philippe LUC <philfifi at free fr>

  Copyright (C) 2010


This program is a reader-write of SPI flash memory. It contains
the firmware to be programmed into the ATMEL AVR.
It connects to your PC with the serial port.


The source code to flash in the AVR is in src/.
The PC tool is in tools/

HISTORY
-------
v0.2.1 hack_firmware.py also output the full hacked firmware file.
v0.2   Bug fix in python
       Make the firmware compatible with atmega8/16
v0.1   First release

CONFIGURATION
-------------

Configure and tweak the Makefile to set your own AVR
Configure src/hardware.h to select the correct pins.

After configuring the Makefile found in src/, you
should execute:

  make
  make prog_fuse
  make prog

to flash completely the AVR.

USAGE
-----

The tool spi_reader_writer.py is used to communicate with the AVR board.
Launch:
 $ tools/spi_reader_writer.py check_size
to do a self test and let the tool try to figure out the size.

Adjust the UART speed and port with --port and --speed options.

Launch
 $ tools/spi_reader_writer.py read my_camera_firmware.raw
to extract the firmware and write it to the given file name.

Patch it with:
 $ tools/hack_firmware.py my_camera_firmware.raw
This command produces a file called [0x138000-0x13d000_no_font.raw].
It contains only a part of the firmware at the given addresses.

Reprogram this part to the flash memory:
 $ tools/spi_reader_writer.py write_at 0x138000 0x138000-0x13d000_no_font.raw

It should work !

