This section details the use off the firmware tools for both reading and writing the debugger firmware
Note the above firmware images are not usable in homebuilt debuggers as they require the silicon labs bootloader. Since the goal of this project is to provide ec2 / 3 support to linux and not to support black market debuggers the bootloader is not available.
Please note that these images were read directly out of the debuggers by asking the bootloader for them. There was no deompiling of the windows IDE. All understanding required to get these came from watching the RS232 communications with an EC2.
I have seen discussion on the net about people wanting to copy EC2 and EC3 devices but they are so cheap and are packaged nicely why would you bother. Thre reason that ec2drv was written is to allow the use of these nice tidy devices from within linux for those of us with alergic reactions to windows.
Writing new firmware Images into the Debugger
From now on all firmware images provides on this site will be raw unobsured images and will have the extention .raw. The older images were miced up in page order and xored with 0x55 and ended in .bin.
Writing a .raw image
./ec2-update-firmware --port=USB --image=file.raw --xor or ./ec2-update-firmware --port=/dev/ttyS0 --image=file.raw --xor
The xor is needed because ec2drv must xor raw imaged with 0x55 before the debugger will accept them.
Writing a .bin image
This method is depreciated and should not normally be used
./ec2-update-firmware --port=USB --image=file.bin --blocks=blocks.txt or ./ec2-update-firmware --port=/dev/ttyS0 --image=file.bin --blocks=blocks.txt
The file blocks.txt must contain decimal numbers of the blocks of firmware to load, one per line. The image file has a stream of pages (blocks) and Silicon labs mixes the order up for no reason other than confusing things.
Reading Firmware images from a debugger
./ec2readfw --port=USB --firmware --out=image.raw or ./ec2readfw --port=/dev/ttyS0 --firmware --out=image.raw