This will happen if OpenOCD is connected when you press the reset button or try to execute the
bootstrap program by starting execution with EIP = 0.
0x00001259 is the halt after bootstrap failure address and the reason for the failure is given at address 0x600001000.
Failure code 4 indicates that the EC pin is high. This pin is driven high by OpenOCD and forces bootstrap to fail and open JTAG.
Other easons for failure are listed in the Intel® Quark™ microcontroller User Guide chapter 6.1.
There are hree ways to recover:
(1) (re)load your program and run it using the GDB load and continue commands;
(2) quit OpenOCD by pressing control-c, unplug the USB cable, wait a few seconds, then reconnect it; or
(3) run from 0x20000000 using the GDB set and continue commands.
Your program should now be running.
For more complete information about compiler optimizations, see our Optimization Notice.