Getting started, E2129 and flash.

I’m having a bit of a struggle getting started with something that runs from flash on my Olimex E2129 board. How can I debug code in flash?

Depends on your development environment. I use a Linux-based toolchain, and had good luck putting an infinite loop at the beginning of my program. Do something like this:

volatile int debug_flag = 0;
int main( ) {
  while (!debug_flag) ;
  /* ... rest of program */
}

Then when you get connected with the debugger, change debug_flag from 0 to 1. Viola, you’re good to go.