| // Clang seems to generate slightly larger code with Os than gcc | // Clang seems to generate slightly larger code with Os than gcc | ||||
| __attribute__ ((optimize("-Os"))) | __attribute__ ((optimize("-Os"))) | ||||
| #else | #else | ||||
| #if defined(__PURE_CODE__) || !defined(__OPTIMIZE__) | |||||
| // cases known to compile too large for 0-0x400 memory region | |||||
| __attribute__ ((optimize("-Os"))) | |||||
| #else | |||||
| // hopefully all others fit into startup section (below 0x400) | |||||
| __attribute__ ((section(".startup"),optimize("-Os"))) | __attribute__ ((section(".startup"),optimize("-Os"))) | ||||
| #endif | #endif | ||||
| #endif | |||||
| void ResetHandler(void) | void ResetHandler(void) | ||||
| { | { | ||||
| uint32_t *src = &_etext; | uint32_t *src = &_etext; |