Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Conv TTL Blocking
Commits
2886afb2
Commit
2886afb2
authored
Sep 24, 2018
by
Denia Bouhired-Ferrag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes version numbers from code. adds board name to log file name
parent
0f6d213f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
15 deletions
+5
-15
gw-upgrade.py
software/gwupdate/gw-upgrade.py
+2
-2
remote-mass-gw-upgrade.py
software/gwupdate/remote-mass-gw-upgrade.py
+3
-13
No files found.
software/gwupdate/gw-upgrade.py
View file @
2886afb2
...
...
@@ -82,8 +82,8 @@ CSR_GWVERS_OFS = 0
CSR_HWVERS_OFS
=
22
# Target version
gwvers_target
=
4.1
gwvers_gold_target
=
0.
3
gwvers_target
=
0.0
# Add release version here Eg: gwvers_target = 1.0
gwvers_gold_target
=
0.
0
# Add golden version here Eg: gwvers_gold_target = 0.2
##-------------------------------------------------------------------------------------------------
## Method to check hardware and gateware version
...
...
software/gwupdate/remote-mass-gw-upgrade.py
View file @
2886afb2
...
...
@@ -84,8 +84,8 @@ CSR_GWVERS_OFS = 0
CSR_HWVERS_OFS
=
22
# Target version
gwvers_target
=
4.1
gwvers_gold_target
=
0.
3
gwvers_target
=
0.0
# Add release version here Eg: gwvers_target = 1.0
gwvers_gold_target
=
0.
0
# Add golden version here Eg: gwvers_gold_target = 0.2
#gateware to write
#gw_file="golden-v"+str(gwvers_gold_target)+".bin"
...
...
@@ -141,11 +141,6 @@ if __name__ == "__main__":
gw_path
=
"./gw-blo/"
elif
(
bid
==
"T485"
):
gw_path
=
"./gw-rs485/"
# if (gwvers == 0xff):
# baseaddr = 0x300
# elif ((gwvers >= 0x10) and (gwvers <= 0x22)) or \
# (((gwvers & 0xf0) == 0x00) and (gwvers < 0x02)):
# baseaddr = 0x040
if
upgrade
==
True
:
print
(
"Upgrade file is
%
s
\n
"
%
gw_path
+
gw_file
)
mb
=
XilMultiboot
(
ELMA_I2C_MULTIBOOT
,
elma
,
slot
,
baseaddr
,
""
)
...
...
@@ -156,11 +151,6 @@ if __name__ == "__main__":
mb
.
iprog
(
multiboot_addr
)
# Turn off the VME crate
#ret = subprocess.call("snmpset -v2c -c "+ pwd +" "+ ip +" 1.3.6.1.4.1.37968.1.1.7.2.1.3.1 i 1", shell=True, stdout=None, stderr=None)
# Turn on the VME crate
#ret = subprocess.call("snmpset -v2c -c "+ pwd +" "+ ip +" 1.3.6.1.4.1.37968.1.1.7.2.1.3.1 i 0", shell=True, stdout=None, stderr=None)
time
.
sleep
(
10
)
(
hwvers_new
,
gwvers_new
)
=
gw_hw_version
()
...
...
@@ -190,7 +180,7 @@ if __name__ == "__main__":
#Generate log file
# Generate output file named according to current time
fname
=
time
.
strftime
(
"remote-gw
-upgrade-
%
Y-
%
m-
%
d"
,
time
.
localtime
())
+
".txt"
fname
=
time
.
strftime
(
"remote-gw
upgrade-
%
s-
%
Y-
%
m-
%
d"
,
bid
,
time
.
localtime
())
+
".txt"
ret
=
subprocess
.
call
([
"ls ./log | grep "
+
fname
],
shell
=
True
,
stdout
=
None
,
stderr
=
None
)
print
(
"
%
d"
%
ret
)
if
(
ret
!=
0
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment