#!/bin/csh -f
date
hostname
echo "unlocking flash"
/usr/sbin/flash_unlock /dev/mtd2
echo "done"

# Acquisition firmware FEE_GF_Feb16_24.bin (2016_09_01)
#echo "loading mtd2 with /MIDAS/Aida/FEE_GF_Feb16_24.bin"
#/usr/sbin/flashcp /MIDAS/Aida/FEE_GF_Feb16_24.bin /dev/mtd2

# Firmware to test ADC calibration clock issues: FEE_GF_Nov16_2.bin (2017_05_23)
echo "loading mtd2 with /MIDAS/Aida/FEE_GF_Nov16_2.bin"
/usr/sbin/flashcp /MIDAS/Aida/FEE_GF_Nov16_2.bin /dev/mtd2

echo "done"
flash_lock /dev/mtd2 0 -1
echo "Flash /dev/mtd2 locked"
#echo "error reading file"
echo "finished"

