Alright, it turns out I still had the JTAG Chain Debugger open, preventing it from accessing the JTAG Chain. That's why I got that error.
So, jtag_open works now, and the read_idcode works (returns 0x000000, which is what I expect).
I added this to the sourced .tcl file:
proc send_factory {} {
device_lock -timeout 10000
# Shift-IR: = USERCODE = 281
device_ir_shift -ir_value 281
device_unlock
return
}
281 is the hex value of FACTORY (10 1000 0001)
However, this does not reset the FPGA it appears, the IDCODE is still all zero's and I am unable to reprogram.
Perhaps I need to hold nCONFIG low...