Author Topic: need help to understand a .py script  (Read 770 times)

0 Members and 1 Guest are viewing this topic.

Offline CaptDonTopic starter

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: is
need help to understand a .py script
« 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!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 88
  • Country: gb
Re: need help to understand a .py script
« Reply #1 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
  • Read the contents of the Flash somehow, into a file on your computer.
  • Run the script, giving it the name of the Flash dump file.
  • Write the newly-modified Flash dump file back into the memory somehow.
That is, the script only modifies a dump file; you need to get it out of, and back into, the hardware another way.
 

Offline CaptDonTopic starter

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: is
Re: need help to understand a .py script
« Reply #2 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!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf