__attribute__((naked)) void Reset_Handler(void) { for (uint32_t i = __bss_start__; i < __bss_end__; i++) { *(uint32_t*) i = 0; } uint32_t i = _etext; for (uint32_t dest = _sdata; dest < _edata; dest++) { *(uint32_t*) dest = *(uint32_t*) i; i++; } main(); }