Commit Graph

16 Commits

Author SHA1 Message Date
Doug Brown
2e4e303c0c Change license to GPLv3
I can't use GPLv2 as soon as I need to start using the Nuvoton sample
code which is licensed with an Apache 2.0 license.
2023-06-25 11:41:18 -07:00
Doug Brown
8f3c74a14e Update copyright date 2023-06-25 11:38:41 -07:00
Doug Brown
8aec8807c9 Fix line endings
A whole bunch of files in this project had DOS line endings. This is due
to how I started working on it on a Windows machine with little Git
experience. Now it's inconsistent so I'm fixing it.
2023-05-28 19:34:02 -07:00
Doug Brown
3df4c40f38 Add/update copyright
This just makes sure everything is up to date with copyrights.
2020-11-27 00:16:35 -08:00
Doug Brown
7425af761a Break out code into a HAL, optimize flash operations
This makes the code pretty easily portable to other architectures if someone
wants to make a more modern SIMM programmer. I also was pretty careful to split
responsibilities of the different components and give the existing components
better names. I'm pretty happy with the organization of the code now.

As part of this change I have also heavily optimized the code. In particular,
the read and write cycle routines are very important to the overall performance
of the programmer. In these routines I had to make some tradeoffs of code
performance versus prettiness, but the overall result is much faster
programming.

Some of these performance changes are the result of what I discovered when
I upgraded my AVR compiler. I discovered that it is smarter at looking at 32-bit
variables when I use a union instead of bitwise operations.

I also shaved off more CPU cycles by carefully making a few small tweaks. I
added a bypass for the "program only some chips" mask, because it was adding
unnecessary CPU cycles for a feature that is rarely used. I removed the
verification feature from the write routine, because we can always verify the
data after the write chunk is complete, which is more efficient. I also added
assumptions about the initial/final state of the CS/OE/WE pins, which allowed me
to remove more valuable CPU cycles from the read/write cycle routines.

There are also a few enormous performance optimizations I should have done a
long time ago:

1) The code was only handling one received byte per main loop iteration. Reading
   every byte available cut nearly a minute off of the 8 MB programming time.
2) The code wasn't taking advantage of the faster programming command available
   in the chips used on the 8 MB SIMM.

The end result of all of these optimizations is I have programming time of the
8 MB SIMM down to 3:31 (it used to be 8:43).

Another minor issue I fixed: the Micron SIMM chip identification wasn't working
properly. It was outputting the manufacturer ID again instead of the device ID.
2020-11-27 00:16:35 -08:00
Doug Brown
e2963070bc Added ability to tell programmer firmware to selectively unlock chips. 2013-07-04 12:10:18 -07:00
Doug Brown
0ebb9d2281 Finished implementing protocols for reading/writing portions of the SIMM 2012-10-17 21:31:00 -07:00
Doug Brown
69f644e5ce Fixing programmer protocol enum I left out 2012-10-16 18:52:59 -07:00
Doug Brown
3252f66749 Added untested support for erasing a specific portion of the SIMM
(in 256 KB increments). Won't be able to test it until I implement it in
the control software as well, but I think it should work.
2012-10-16 18:36:55 -07:00
Doug Brown
7bbfc23c1a Added untested support for erasing a specific portion of the SIMM
(in 256 KB increments). Won't be able to test it until I implement it in
the control software as well, but I think it should work.
2012-10-15 22:00:29 -07:00
Doug Brown
667c2c5a2d Added verify during write. It seems to mostly work except when the chip
is completely removed from the SIMM -- in that case, the verification
still passes for some reason. I'm still debugging this one. Maybe the
data I had just written is still essentially on the bus because of the
floating pins and it reads it too fast? Maybe turning on pull-ups would
help with that?
2012-09-30 14:41:22 -07:00
Doug Brown
7acb3ffcc3 Added support for (untested yet) 8 MB ROM SIMM with chips that expect a
slightly different programming protocol.
2012-09-02 15:56:49 -07:00
Doug Brown
145487d388 Added GPL header to all of my source files. 2012-05-25 20:21:04 -07:00
Doug Brown
7d1888dab8 Added provisions to communication protocol for specifying readback size. 2012-05-19 22:58:17 -07:00
Doug Brown
7f69cb476d Tried to do some better commenting in usb_serial.c, also tried to do a better job of documenting the protocol in programmer_protocol.h 2012-01-26 20:42:42 -08:00
Doug Brown
e8999cfc54 Moved the programmer protocol to a different file in preparation for sharing it across all the various programs (bootloader, programmer, control program) 2011-12-26 11:31:45 -08:00