Pārlūkot izejas kodu

Do not put ResetHandler in .startup with clang

Clang seems to generate slightly larger code with Os than gcc, and
ResetHandler doesn't fit into the .startup section.
teensy4-core
Joe Hermaszewski pirms 8 gadiem
vecāks
revīzija
cd59946847
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. +5
    -0
      teensy3/mk20dx128.c

+ 5
- 0
teensy3/mk20dx128.c Parādīt failu

@@ -577,7 +577,12 @@ void startup_early_hook(void) __attribute__ ((weak, alias("startup_default_earl
void startup_late_hook(void) __attribute__ ((weak, alias("startup_default_late_hook")));


#ifdef __clang__
// Clang seems to generate slightly larger code with Os than gcc
__attribute__ ((optimize("-Os")))
#else
__attribute__ ((section(".startup"),optimize("-Os")))
#endif
void ResetHandler(void)
{
uint32_t *src = &_etext;

Notiek ielāde…
Atcelt
Saglabāt