EEVblog Electronics Community Forum

Electronics => FPGA => Topic started by: CaptDon on May 10, 2020, 09:36:56 pm

Title: need help to understand a .py script
Post by: CaptDon on May 10, 2020, 09:36:56 pm
I have a 4meg x 8 flash device in an oscilloscope. In another forum
from a thread over 2 years old a fellow posted a .py script to update
the flash device. The script is only 1.82k. I own several different
programming units that can handle the flash device, but don't understand
how to get the script to interface to the programmer and flash device.
I have posted the script. Any help would be appreciated!! Sorry this
is new to me, I have not worked with PyThon before. Thanks!!
Title: Re: need help to understand a .py script
Post by: FenTiger on May 10, 2020, 09:44:04 pm
From a quick look, the script doesn't interface to the programmer at all - you have to do that manually.

The sequence looks like
That is, the script only modifies a dump file; you need to get it out of, and back into, the hardware another way.
Title: Re: need help to understand a .py script
Post by: CaptDon on May 10, 2020, 10:21:37 pm
Thanks!!! That clears it up for me. I can download the flash device to a file
such as dump.bin, then run the script in python on the file (after having
backed up the unmodified file in case this all comes crashing down) and
then burn the newly modified dump.bin back into the flash device.
Sounds good and now I understand. What a bugger that the flash device
is a 48 pin SMT!!! Wow, I hate fine pitched SMD devices!! Too many ways
to mess up!
Again, many thanks!!