/* Reset interrupt service routine. Configures the stack, initializes RAM and jumps to function main.  */
void reset_handler(void)
/* Reset interrupt service routine. Configures the stack, initializes RAM and jumps to function main.  */
void reset_handler(void)
{
  blt_int32u *pSrc, *pDest;
  __asm("    ldr r1, =_estack\n"
        "    mov sp, r1");
  pSrc = &_etext;
  for (pDest = &_data; pDest < &_edata;)
  {
    *pDest++ = *pSrc++;
  }
  __asm("    ldr     r0, =_bss\n"
        "    ldr     r1, =_ebss\n"
        "    mov     r2, #0\n"
        "    .thumb_func\n"
        "zero_loop:\n"
        "        cmp     r0, r1\n"
        "        it      lt\n"
        "        strlt   r2, [r0], #4\n"
        "        blt     zero_loop");
  main();
}