Commit 5facf345 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

software: Update readflash.py and add gitignore of ei2cdefine.py

Signed-off-by: Theodor-Adrian Stana's avatarTheodor Stana <t.stana@cern.ch>
parent a19debc5
#===============================================================================
# CERN (BE-CO-HT)
# EI2C global definitions file
#===============================================================================
# author: Theodor Stana (t.stana@cern.ch)
#
# date of creation: 2014-03-05
#
# version: 1.0
#
# description:
#
# This module defines some global constants that are used by other scripts in
# the software suite. The constants and their definitions are in the code
# below.
#
#===============================================================================
# GNU LESSER GENERAL PUBLIC LICENSE
#===============================================================================
# This source file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version. This source is distributed in the hope that it
# will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with this
# source; if not, download it from http://www.gnu.org/licenses/lgpl-2.1.html
#===============================================================================
# last changes:
# 2014-03-05 Theodor Stana File created
#===============================================================================
# TODO: -
#===============================================================================
# Hostname, username and password
HNAME = ""
USER = ""
PWD = ""
# Boolean to tell the ei2c.py module whether to create a dump file for the ELMA
# command replies
DUMP = False
......@@ -138,6 +138,7 @@ if __name__ == "__main__":
dat = []
for i in range(sa, ea, 256):
dat += flash_read(i, 256)
print("0x%06x" % i)
dat = ''.join(map(chr,dat))
f = open("flash.bin", "wb")
f.write(dat)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment