From 74b47dcc450890bf1cc1af756dddddfeb48a5396 Mon Sep 17 00:00:00 2001 From: Roger Clark Date: Sat, 9 May 2015 20:13:41 +1000 Subject: [PATCH] Changed __attribute__(( constructor in main.cpp, with update provided by Victor_PV, so fix issue with premain not being called first in the init seequence --- STM32F1/cores/maple/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STM32F1/cores/maple/main.cpp b/STM32F1/cores/maple/main.cpp index 7305100..ab9bf0f 100644 --- a/STM32F1/cores/maple/main.cpp +++ b/STM32F1/cores/maple/main.cpp @@ -30,7 +30,7 @@ extern void init(void); // Force init to be called *first*, i.e. before static object allocation. // Otherwise, statically allocated objects that need libmaple may fail. - __attribute__(( constructor )) void premain() { + __attribute__(( constructor (0) )) void premain() { init(); }