Browse Source

Fix initialization of local static vars from non-const data

http://forum.pjrc.com/threads/25385-static-local-variables-aren-t-static
main
PaulStoffregen 10 years ago
parent
commit
0dd51eacc5
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      teensy3/mk20dx128.c

+ 4
- 3
teensy3/mk20dx128.c View File

@@ -538,14 +538,15 @@ void __cxa_pure_virtual()
}

__attribute__((weak))
int __cxa_guard_acquire (int *g)
int __cxa_guard_acquire (char *g)
{
return 1;
return !(*g);
}

__attribute__((weak))
void __cxa_guard_release(int *g)
void __cxa_guard_release(char *g)
{
*g = 1;
}

int nvic_execution_priority(void)

Loading…
Cancel
Save