Commit f590b56c authored by unknown's avatar unknown

Merge remote-tracking branch 'origin/origin/DB-dev' into DB-dev

parents 7719c07b 125b688b
......@@ -33,10 +33,9 @@ all:
mkdir -p ubuntu/$(BOARD)/boot
mv ubuntu/$(BOARD)/shell/program ubuntu/$(BOARD)/boot
mv ubuntu/$(BOARD)/shell/flash ubuntu/$(BOARD)/boot
wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3738/pts.bit
wget -P ubuntu/$(BOARD)/boot https://www.ohwr.org/attachments/5782/pts-v2.1.bit
wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3710/flash_load.bit
wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3733/golden-v0.0_release-v1.0.bin
wget -P ubuntu/$(BOARD)/boot https://www.ohwr.org/attachments/5781/golden-v0.0_release-v2.0.bin
chmod a+x ubuntu/$(BOARD)/shell/*
chmod a+x ubuntu/$(BOARD)/boot/*
chmod a+x ubuntu/$(BOARD)/jpts
......
......@@ -63,7 +63,7 @@ def main(bus,tname,inf,log):
uses : pts.bit and hwvertest.py
"""
HWVERS = 4.0
HWVERS_target = 4.0
pel = PTS_ERROR_LOGGER(inf,log)
......@@ -73,19 +73,18 @@ def main(bus,tname,inf,log):
# 4 MSB represent HW version number (major)
# 2 LSB represent number of execution (minor)
# Eg: value 010010 represents PCB version 4.2
hwvers = (bus.vv_read(HWVERS)
hwvers = bus.vv_read(HWVERS_reg)
maj = int(hwvers >> HWVERS_VERS_OFS)
min = float(hwvers & 0x03)
min /= 10
hwvers = maj + min
# and now check if appropriate
if (hwvers == HWVERS):
if (hwvers == HWVERS_target):
msg = "HW/PCB version correct: %2.1f\n" % (hwvers)
inf.write(msg)
else:
msg = "ERROR: HW/PCBe version (%2.1f) incorrect - expected %2.1f" % (hwvers, HWVERS)
msg = "ERROR: HW/PCBe version (%2.1f) incorrect - expected %2.1f" % (hwvers, HWVERS_target)
pel.set(msg)
print "-->%s" % msg
......
......@@ -82,7 +82,7 @@ TER_ITERM_OFS = 0
TER_OTERM_OFS = 6
# HW version register
HWVERS = 0x10
HWVERS_reg = 0x10
HWVERS_EXEC_OFS = 0
HWVERS_VERS_OFS = 2
......
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