Bladeren bron

Avoid startup section overflow with pure-core or no optimize compile

teensy4-core
PaulStoffregen 7 jaren geleden
bovenliggende
commit
24a7e39a8d
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. +6
    -0
      teensy3/mk20dx128.c

+ 6
- 0
teensy3/mk20dx128.c Bestand weergeven

@@ -690,8 +690,14 @@ void startup_late_hook(void) __attribute__ ((weak, alias("startup_default_late_
// Clang seems to generate slightly larger code with Os than gcc
__attribute__ ((optimize("-Os")))
#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")))
#endif
#endif
void ResetHandler(void)
{
uint32_t *src = &_etext;

Laden…
Annuleren
Opslaan