diff startup_stm32f10x_md_mthomas.c @ 3:74e9b3baac1e

Jumbo commit to make things work. Note I have t
author Daniel O'Connor <darius@dons.net.au>
date Sun, 01 Jan 2012 11:01:13 +1030
parents c59513fd84fb
children
line wrap: on
line diff
--- a/startup_stm32f10x_md_mthomas.c	Sat Oct 08 20:35:34 2011 +1030
+++ b/startup_stm32f10x_md_mthomas.c	Sun Jan 01 11:01:13 2012 +1030
@@ -161,7 +161,7 @@
 void (* const g_pfnVectorsStartup[])(void) =
 {
     (intfunc)((unsigned long)&_estack), /* The initial stack pointer during startup */
-    Reset_Handler,             /* The reset handler during startup */
+    Reset_Handler,              /* The reset handler during startup */
     HardFault_Handler,          /* Hard Fault Handler */
     MemManage_Handler,          /* MPU Fault Handler */
     BusFault_Handler,           /* Bus Fault Handler */
@@ -262,10 +262,7 @@
 
   /* Call CTORS of static objects, not needed for "pure C": */
   /* __libc_init_array(); */
-  /* if ( __libc_init_array )
-    __libc_init_array()
-  } */
-  
+
   /* Setup the microcontroller system. Initialize the Embedded Flash Interface,
      initialize the PLL and update the SystemFrequency variable. */
   SystemInit();
@@ -273,7 +270,8 @@
   /* Call the application's entry point.*/
   main();
 
-  while(1) { ; }
+  while(1) {
+  }
 }
 
 /**
@@ -282,25 +280,22 @@
  * @retval : None
 */
 
-void __Init_Data_and_BSS(void)
-{
-  unsigned long *pulSrc, *pulDest;
+void
+__Init_Data_and_BSS(void) {
+    unsigned long	*pulSrc, *pulDest;
 
-  /* Copy the data segment initializers from flash to SRAM */
-  pulSrc  = &_sidata;
-  pulDest = &_sdata;
-  if ( pulSrc != pulDest )
-  {
-    for(; pulDest < &_edata; )
-    {
-      *(pulDest++) = *(pulSrc++);
+    /* Copy the data segment initializers from flash to SRAM */
+    pulSrc = &_sidata;
+    pulDest = &_sdata;
+    if (pulSrc != pulDest) {
+	for(; pulDest < &_edata; ) {
+	    *(pulDest++) = *(pulSrc++);
+	}
     }
-  }
-  /* Zero fill the bss segment. */
-  for(pulDest = &_sbss; pulDest < &_ebss; )
-  {
-    *(pulDest++) = 0;
-  }
+    /* Zero fill the bss segment. */
+    for(pulDest = &_sbss; pulDest < &_ebss; ) {
+	*(pulDest++) = 0;
+    }
 }
 
 /*******************************************************************************
@@ -371,11 +366,10 @@
  * @retval : None
 */
 
-void Default_Handler(void)
-{
+void
+Default_Handler(void) {
   /* Go into an infinite loop. */
-  while (1)
-  {
+  while (1) {
   }
 }