From d994e48c5565a0c7aea54384a1b15a19623fe209 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 19 Sep 2012 16:23:39 +0200 Subject: [PATCH] Delayed static object construction after hardware setup --- .../ATMEL/sam3xa/source/gcc/startup_sam3xa.c | 7 +++++-- .../arduino_due_x/libsam_sam3x8e_gcc_rel.a | Bin 86354 -> 86302 bytes .../libsam_sam3x8e_gcc_rel.a.txt | 1 - .../sam/variants/arduino_due_x/variant.cpp | 7 ++++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/source/gcc/startup_sam3xa.c b/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/source/gcc/startup_sam3xa.c index 55e9e8b50..224edaef3 100644 --- a/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/source/gcc/startup_sam3xa.c +++ b/hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/source/gcc/startup_sam3xa.c @@ -44,7 +44,8 @@ extern uint32_t _estack; int main(void); /** \endcond */ -void __libc_init_array(void); +// Arduino: we must setup hardware before doing this +// void __libc_init_array(void); /* Default empty handler */ void Dummy_Handler(void); @@ -272,7 +273,9 @@ void Reset_Handler(void) } /* Initialize the C library */ - __libc_init_array(); + + // Arduino: we must setup hardware before doing this + //__libc_init_array(); /* Branch to main function */ main(); diff --git a/hardware/arduino/sam/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a b/hardware/arduino/sam/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a index a8f27438f547a868fc9aa6f040b888e1f3d1bd1f..822990651270eb1ce2ed99bfa977cfe85551ed13 100644 GIT binary patch delta 2358 zcmc(hZD?Cn7{~wTwn@9%rpcPMsp)K&)^;G1YK_?-Vq z725ywm3UeYA(H%%(G?2`uFGC5@!Ek^Ii7L!pM8}B6H}o8_OMU zp~=h4FDCXDSykywsk#2*0qZ5AdZxiMm!GtLCzC1535TPH18YUE?3`K^ENL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