Program only runs when debugging in GDB - using Open OCD and Olimex arm-usb-ocd-h jtag to program at91sam3su
$ telnet localhost 4444
&gt; halt
target state: halted
target halted due to debug-request, current mod
xPSR: 0x81000000 pc: 0x00080107 msp: 0x20000598
&gt; flash write_image blinky/blinky.elf


You usually need reset init before a flash erase/write, halt may not be enough. In gdb it is monitor reset init. 

The flash also needs to be erased before writing: flash write_image erase unlock blinky/blinky.elf