File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
system/CMSIS/Device/ATMEL/sam3xa/source/gcc Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ extern uint32_t _estack;
4444int main (void );
4545/** \endcond */
4646
47- void __libc_init_array (void );
47+ // Arduino: we must setup hardware before doing this
48+ // void __libc_init_array(void);
4849
4950/* Default empty handler */
5051void Dummy_Handler (void );
@@ -272,7 +273,9 @@ void Reset_Handler(void)
272273 }
273274
274275 /* Initialize the C library */
275- __libc_init_array ();
276+
277+ // Arduino: we must setup hardware before doing this
278+ //__libc_init_array();
276279
277280 /* Branch to main function */
278281 main ();
Original file line number Diff line number Diff line change @@ -288,7 +288,6 @@ startup_sam3xa.o:
28828800000000 W USART3_Handler
28928900000000 W UsageFault_Handler
29029000000000 W WDT_Handler
291- U __libc_init_array
292291 U _erelocate
293292 U _estack
294293 U _etext
Original file line number Diff line number Diff line change @@ -338,7 +338,9 @@ void USART3_Handler( void )
338338extern " C" {
339339#endif
340340
341- extern void init ( void )
341+ void __libc_init_array (void );
342+
343+ void init ( void )
342344{
343345 SystemInit () ;
344346
@@ -352,6 +354,9 @@ extern void init( void )
352354 // Disable watchdog, common to all SAM variants
353355 WDT_Disable ( WDT ) ;
354356
357+ // Initialize C library
358+ __libc_init_array ();
359+
355360 // Initialize Serial port UART, common to all SAM3 variants
356361 PIO_Configure (
357362 g_APinDescription[PINS_UART].pPort ,
You can’t perform that action at this time.
0 commit comments