diff --git a/m1/tools/m1nor b/m1/tools/m1nor index 0d8c866..5ff23d9 100755 --- a/m1/tools/m1nor +++ b/m1/tools/m1nor @@ -100,9 +100,20 @@ EOF classify "$n" echo flashmem "$off" "$n" noverify done + echo lockflash 0 55 + echo detectflash 0 echo pld reconfigure ) | jtag -q || exit +# +# Fun fact: a direct flashmem-lockflash-pld reconfigure sequence leaves +# the FPGA in a weird state from which it can't boot out of standby, neither +# via JTAG (pld load ...) or by pressing the middle button. +# +# The only thing that seems to help is to run "detectflash" after the locking. +# (Tried "peek", "usleep", "pld readreg", ... without success.) +# + # # FIXME: the exit code of "jtag" doesn't indicate whether the session was # successful.