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

0 Members and 1 Guest are viewing this topic.

Offline CaptDon

  • Regular Contributor
  • *
  • Posts: 116
  • Country: us
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!!
Senior Master Captain for Victorian Princess
Private Pilot S.E.L. / CDL Class A / Motorcoach
Land, Sea or Air, I'll be there for you.
 

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 54
  • 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 CaptDon

  • Regular Contributor
  • *
  • Posts: 116
  • Country: us
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!!
Senior Master Captain for Victorian Princess
Private Pilot S.E.L. / CDL Class A / Motorcoach
Land, Sea or Air, I'll be there for you.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf