Kaynağa Gözat

DoxyGen: Added documentation for new Core(M) provisions for C startup code.

Change-Id: I7824070cb1ff1619fd36f90b15ad23d30007b811
Jonatan Antoni 6 yıl önce
ebeveyn
işleme
84bb5a8150

+ 121 - 15
CMSIS/DoxyGen/Core/src/Ref_CompilerControl.txt

@@ -92,7 +92,7 @@ Inline functions offer a trade-off between code size and performance. By default
 inline code or not. The \b __INLINE attribute gives the compiler an hint to inline this function. Still, the compiler may decide not to inline
 the function.  As the function is global an callable function is also generated. 
 
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 const uint32_t led_mask[] = {1U << 4, 1U << 5, 1U << 6, 1U << 7};
  
@@ -116,7 +116,7 @@ __INLINE static void LED_On (uint32_t led) {
 Defines a static function that may be inlined by the compiler. If the compiler generates inline code for 
 all calls to this functions, no additional function implementation is generated which may further optimize space.
 
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 \\ Get Interrupt Vector
 __STATIC_INLINE uint32_t NVIC_GetVector(IRQn_Type IRQn)
@@ -139,7 +139,7 @@ Defines a static function that should be always inlined by the compiler.
 \note
 For compilers that do not allow to force function inlining, the macro maps to \ref __STATIC_INLINE.
 
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 \\ Get Interrupt Vector
 __STATIC_FORCEINLINE uint32_t NVIC_GetVector(IRQn_Type IRQn)
@@ -160,7 +160,7 @@ __STATIC_FORCEINLINE uint32_t NVIC_GetVector(IRQn_Type IRQn)
 Informs the compiler that the function does not return. The compiler can then perform optimizations by
 removing code that is never reached.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 // OS idle demon (running when no other thread is ready to run).
  
@@ -183,7 +183,7 @@ the object. The compiler may therefore ignore potential pointer aliasing effects
 \note
 For compilers that do not support the restrict keyword, __RESTRICT is defined as an empty macro and a warning is issued.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 __STATIC_INLINE void ARM_MPU_OrderedMemcpy (volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len)
 {
@@ -205,7 +205,7 @@ __STATIC_INLINE void ARM_MPU_OrderedMemcpy (volatile uint32_t* dst, const uint32
 \details
 Definitions tagged with \b __USED in the source code should be not removed by the linker when detected as unused.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 /* Export following variables for debugging */
 __USED uint32_t const CMSIS_RTOS_API_Version = osCMSIS;
@@ -229,7 +229,7 @@ function.
 
 Functions declared with \b __WEAK and then defined without \b __WEAK behave as non-weak functions.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 __WEAK void SystemInit(void)
 {
@@ -248,7 +248,7 @@ __WEAK void SystemInit(void)
 \details
 Specifies that a type must have the smallest possible alignment.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 struct foo {
   uint8_t  u8;
@@ -266,7 +266,7 @@ struct foo {
 \details
 Specifies that a structure must have the smallest possible alignment.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 __PACKED_STRUCT foo {
   uint8_t   u8;
@@ -290,7 +290,7 @@ Defines a pointer to a uint32_t from an address that does not need to be aligned
 operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm
 processor core and compiler settings.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 uint32_t val32;
  
@@ -311,7 +311,7 @@ Defines a pointer to a uint16_t from an address that does not need to be aligned
 operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm
 processor core and compiler settings.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 uint16_t val16;
  
@@ -332,7 +332,7 @@ Defines a pointer to a uint16_t from an address that does not need to be aligned
 operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm
 processor core and compiler settings.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 uint16_t val16 = 0U;
  
@@ -353,7 +353,7 @@ Defines a pointer to a uint32_t from an address that does not need to be aligned
 operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm
 processor core and compiler settings.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 uint32_t val32;
  
@@ -374,7 +374,7 @@ Defines a pointer to a uint32_t from an address that does not need to be aligned
 operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm
 processor core and compiler settings.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 uint32_t val32 = 0U;
  
@@ -393,7 +393,7 @@ void test (uint8_t *ptr) {
 \details
 Specifies a minimum alignment for a variable or structure field, measured in bytes.
  
-<b> Code Example:</b>
+<b>Code Example:</b>
 \code
 uint32_t stack_space[0x100] __ALIGNED(8);   // 8-byte alignment required
 \endcode
@@ -401,4 +401,110 @@ uint32_t stack_space[0x100] __ALIGNED(8);   // 8-byte alignment required
 */
 #define __ALIGNED
 
+/**************************************************************************************************/
+/**
+\def __COMPILER_BARRIER
+\brief Barrier to prevent compiler from reordering instructions.
+\details
+This barrier limits the compilers reordering optimizations. It prevents the compiler from swapping
+instructions resulting from code before and after the barrier.
+ 
+<b>Code Example:</b>
+The assignments in the example are independent. Hence the compiler could choose a different order of
+execution, e.g. for a better pipeline utilization. Using the barrier in between prevents this type
+of reordering.
+
+\code
+void test (uint8_t *ptr) {
+  var1 = 1;
+  __COMPILE_BARRIER();
+  var2 = var3 + 1;
+}
+\endcode
+
+*/
+#define __COMPILER_BARRIER
+
+/**************************************************************************************************/
+/**
+\def __PROGRAM_START
+\brief Entry function into the user application or library startup.
+\details
+Gives the function to be jumped into right after low level initialization, i.e. SystemInit. This
+is compiler and library specific. CMSIS specifies common default for supported compilers. 
+
+\note This define is only intended to be used by the \ref startup_c_pg.
+
+<b>Code Example:</b>
+\code
+void Reset_Handler(void)
+{
+  SystemInit();                             /* CMSIS System Initialization */
+  __PROGRAM_START();                        /* Enter PreMain (C library entry point) */
+}
+\endcode
+*/
+#define __PROGRAM_START
+
+/**************************************************************************************************/
+/**
+\def __INITIAL_SP
+\brief Compiler/linker symbol specifiying the location of the main stack (MSP).
+\details
+The address of the specified symbol is used to initialize the main stack pointer (MSP) during low
+level init. This is compiler/linker specific. CMSIS specifies common default for supported compilers. 
+
+\note This define is only intended to be used by the \ref startup_c_pg.
+*/
+#define __INITIAL_SP
+
+/**************************************************************************************************/
+/**
+\def __STACK_LIMIT
+\brief Compiler/linker symbol specifiying the limit of the main stack (MSP).
+\details
+The address of the specified symbol is used to initialize the main stack pointer limit (MSPLIM on Armv8-M)
+during low level init. This is compiler/linker specific. CMSIS specifies common default for supported
+compilers. 
+
+\note This define is only intended to be used by the \ref startup_c_pg.
+
+<b>Code Example:</b>
+\code
+void Reset_Handler(void)
+{
+  __set_MSPLIM((uint32_t)(&__STACK_LIMIT));
+  // :
+  // :
+}
+\endcode
+*/
+#define __STACK_LIMIT
+
+/**************************************************************************************************/
+/**
+\def __VECTOR_TABLE
+\brief Symbol name used for the (static) interrupt vector table.
+\details
+The given name is used for defining the static (compiler time) interrupt vector table. The name
+must comply with any compiler/linker conventions, e.g. if used for vector table relocation or debugger
+awareness. CMSIS specifies common default for supported compilers. 
+
+\note This define is only intended to be used by the \ref startup_c_pg.
+*/
+#define __VECTOR_TABLE
+
+/**************************************************************************************************/
+/**
+\def __VECTOR_TABLE_ATTRIBUTE
+\brief Additional decl specs to be used when defining the (static) interrupt vector table.
+\details
+The given decl specs are used for defining the static (compiler time) interrupt vector table, e.g.
+to mark the table as used and force it into a specific linker section. CMSIS specifies common default
+for supported compilers. 
+
+\note This define is only intended to be used by the \ref startup_c_pg.
+*/
+#define __VECTOR_TABLE_ATTRIBUTE
+
 /** @} */ /** end of compiler_conntrol_gr **/

+ 131 - 46
CMSIS/DoxyGen/Core/src/Template.txt

@@ -159,7 +159,8 @@ The template files contain place holders:
 
 
 The device configuration of the template files is described in detail on the following pages:
-  - \subpage startup_s_pg
+  - \subpage startup_c_pg
+  - \subpage startup_s_pg (deprecated)
   - \subpage system_c_pg
   - \subpage device_h_pg
 \if ARMv8M
@@ -169,7 +170,91 @@ The device configuration of the template files is described in detail on the fol
 
 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
 /**
-\page startup_s_pg Startup File startup_<device>.s
+\page startup_c_pg Startup File startup_<device>.c
+
+The \ref startup_c_pg contains:
+ - The reset handler which is executed after CPU reset and typically calls the \ref SystemInit function.
+ - The setup values for the Main Stack Pointer (MSP).
+ - Exception vectors of the Cortex-M Processor with weak functions that implement default routines.
+ - Interrupt vectors that are device specific with weak functions that implement default routines.
+
+The file exists for each supported toolchain and is the only tool-chain specific CMSIS file.
+
+To adapt the file to a new device only the interrupt vector table needs to be extended with
+the device-specific interrupt handlers. The naming convention for the interrupt handler names are
+&lt;interrupt_name&gt;_IRQHandler.  This table needs to be consistent with \ref IRQn_Type that defines all the
+IRQ numbers for each interrupt.
+
+\b Example:
+
+The following example shows the extension of the interrupt vector table for the LPC1100 device family.
+
+\code
+/*----------------------------------------------------------------------------
+  Exception / Interrupt Handler
+ *----------------------------------------------------------------------------*/
+/* Exceptions */
+void WAKEUP0_IRQHandler     (void) __attribute__ ((weak, alias("Default_Handler")));
+void WAKEUP1_IRQHandler     (void) __attribute__ ((weak, alias("Default_Handler")));
+void WAKEUP2_IRQHandler     (void) __attribute__ ((weak, alias("Default_Handler")));
+// :
+// :
+void EINT1_IRQHandler       (void) __attribute__ ((weak, alias("Default_Handler")));
+void EINT2_IRQHandler       (void) __attribute__ ((weak, alias("Default_Handler")));
+// :
+// :
+
+/*----------------------------------------------------------------------------
+  Exception / Interrupt Vector table
+ *----------------------------------------------------------------------------*/
+extern const pFunc __VECTOR_TABLE[240];
+       const pFunc __VECTOR_TABLE[240] __VECTOR_TABLE_ATTRIBUTE = {
+  (pFunc)(&__INITIAL_SP),                   /*     Initial Stack Pointer */
+  Reset_Handler,                            /*     Reset Handler */
+  NMI_Handler,                              /* -14 NMI Handler */
+  HardFault_Handler,                        /* -13 Hard Fault Handler */
+  MemManage_Handler,                        /* -12 MPU Fault Handler */
+  BusFault_Handler,                         /* -11 Bus Fault Handler */
+  UsageFault_Handler,                       /* -10 Usage Fault Handler */
+  0,                                        /*     Reserved */
+  0,                                        /*     Reserved */
+  0,                                        /*     Reserved */
+  0,                                        /*     Reserved */
+  SVC_Handler,                              /*  -5 SVCall Handler */
+  DebugMon_Handler,                         /*  -4 Debug Monitor Handler */
+  0,                                        /*     Reserved */
+  PendSV_Handler,                           /*  -2 PendSV Handler */
+  SysTick_Handler,                          /*  -1 SysTick Handler */
+
+  /* Interrupts */
+  WAKEUP0_IRQHandler,                       /*   0 Wakeup PIO0.0 */
+  WAKEUP1_IRQHandler,                       /*   1 Wakeup PIO0.1 */
+  WAKEUP2_IRQHandler,                       /*   2 Wakeup PIO0.2 */
+  // :
+  // :
+  EINT1_IRQHandler,                         /*  30 PIO INT1 */
+  EINT2_IRQHandler,                         /*  31 PIO INT2 */
+  // :
+  // :
+};
+\endcode
+
+\section startup_c_sec startup_Device.c Template File
+
+A compiler agnostic \ref startup_c_sec for an Armv7-M processor like Cortex-M3 is shown below.
+The C startup file relys on certain compiler specific preprocessor defines specified in CMSIS compiler headers:
+ - \ref __INITIAL_SP
+ - \ref __STACK_LIMIT
+ - \ref __PROGRAM_START
+ - \ref __VECTOR_TABLE
+ - \ref __VECTOR_TABLE_ATTRIBUTE
+ 
+\verbinclude "Source\startup_Device.c"
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page startup_s_pg Startup File startup_<device>.s (deprecated)
 
 The \ref startup_s_pg contains:
  - The reset handler which is executed after CPU reset and typically calls the \ref SystemInit function.
@@ -197,15 +282,15 @@ The following example shows the extension of the interrupt vector table for the
                  :       :
                 DCD     EINT1_IRQHandler         ; 16+30: PIO INT1
                 DCD     EINT0_IRQHandler         ; 16+31: PIO INT0
-	 :
-	 :
+   :
+   :
                 EXPORT  WAKEUP0_IRQHandler       [WEAK]
                 EXPORT  WAKEUP1_IRQHandler       [WEAK]
                 EXPORT  WAKEUP2_IRQHandler       [WEAK]
                  :       :
                  :       :
-                EXPORT	EINT1_IRQHandler         [WEAK]
-                EXPORT	EINT0_IRQHandler         [WEAK]
+                EXPORT  EINT1_IRQHandler         [WEAK]
+                EXPORT  EINT0_IRQHandler         [WEAK]
 
 WAKEUP0_IRQHandler
 WAKEUP1_IRQHandler
@@ -332,8 +417,8 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0 .. 1</td>
       <td>0</td>
       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
-		is excluded. In this case, the file <i><b>device.h</b></i>
-		must contain a vendor specific implementation of this function.</td>
+    is excluded. In this case, the file <i><b>device.h</b></i>
+    must contain a vendor specific implementation of this function.</td>
     </tr>
 </table>
 
@@ -362,8 +447,8 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0 .. 1</td>
       <td>0</td>
       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
-		is excluded. In this case, the file <i><b>device.h</b></i>
-		must contain a vendor specific implementation of this function.</td>
+    is excluded. In this case, the file <i><b>device.h</b></i>
+    must contain a vendor specific implementation of this function.</td>
     </tr>
 </table>
 
@@ -398,8 +483,8 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0 .. 1</td>
       <td>0</td>
       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
-		is excluded. In this case, the file <i><b>device.h</b></i>
-		must contain a vendor specific implementation of this function.</td>
+    is excluded. In this case, the file <i><b>device.h</b></i>
+    must contain a vendor specific implementation of this function.</td>
     </tr>
 </table>
 
@@ -440,8 +525,8 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0 .. 1</td>
       <td>0</td>
       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
-		is excluded. In this case, the file <i><b>device.h</b></i>
-		must contain a vendor specific implementation of this function.</td>
+    is excluded. In this case, the file <i><b>device.h</b></i>
+    must contain a vendor specific implementation of this function.</td>
     </tr>
 </table>
 
@@ -476,8 +561,8 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0 .. 1</td>
       <td>0</td>
       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
-		is excluded. In this case, the file <i><b>device.h</b></i>
-		must contain a vendor specific implementation of this function.</td>
+    is excluded. In this case, the file <i><b>device.h</b></i>
+    must contain a vendor specific implementation of this function.</td>
     </tr>
     <tr>
       <td>__FPU_PRESENT</td>
@@ -491,30 +576,30 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0</td>
       <td>The combination of the defines <b>__FPU_PRESENT</b> and <b>__FPU_DP</b>
          determine the whether the FPU is with single or double precision as shown in the table below.
-	     \n\n
-	     <table class="cmtable" summary="">
-		 <tr  bgcolor="cyan">
+       \n\n
+       <table class="cmtable" summary="">
+     <tr  bgcolor="cyan">
            <td><b>__FPU_PRESENT</b></td>
-		   <td><b>__FPU_DP</b></td>
-		   <td><b>Description</b></td>
-		 </tr>
-		 <tr>
-		   <td align="center">0</td>
-		   <td align="center"><i>ignored</i></td>
-		   <td>Processor has no FPU. The value set for <b>__FPU_DP</b> has no influence. </td>
-		 </tr>
-		 <tr>
-		   <td align="center">1</td>
-		   <td align="center">0</td>
-		   <td>Processor with FPU with single precision. The file <b>ARMCM7_SP.h</b> has preconfigured settings for this combination.</td>
-		 </tr>
-		 <tr>
-		   <td align="center">1</td>
-		   <td align="center">1</td>
+       <td><b>__FPU_DP</b></td>
+       <td><b>Description</b></td>
+     </tr>
+     <tr>
+       <td align="center">0</td>
+       <td align="center"><i>ignored</i></td>
+       <td>Processor has no FPU. The value set for <b>__FPU_DP</b> has no influence. </td>
+     </tr>
+     <tr>
+       <td align="center">1</td>
+       <td align="center">0</td>
+       <td>Processor with FPU with single precision. The file <b>ARMCM7_SP.h</b> has preconfigured settings for this combination.</td>
+     </tr>
+     <tr>
+       <td align="center">1</td>
+       <td align="center">1</td>
            <td>Processor with FPU with double precision. The file <b>ARMCM7_DP.h</b> has preconfigured settings for this combination.</td>
-		 </tr>
-		 </table>
-	  </td>
+     </tr>
+     </table>
+    </td>
     </tr>
     <tr>
       <td>__ICACHE_PRESENT</td>
@@ -568,8 +653,8 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0 .. 1</td>
       <td>0</td>
       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
-		is excluded. In this case, the file <i><b>device.h</b></i>
-		must contain a vendor specific implementation of this function.</td>
+    is excluded. In this case, the file <i><b>device.h</b></i>
+    must contain a vendor specific implementation of this function.</td>
     </tr>
 </table>
 \endif 
@@ -606,8 +691,8 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0 .. 1</td>
       <td>0</td>
       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
-		is excluded. In this case, the file <i><b>device.h</b></i>
-		must contain a vendor specific implementation of this function.</td>
+    is excluded. In this case, the file <i><b>device.h</b></i>
+    must contain a vendor specific implementation of this function.</td>
     </tr>
 </table>
 \endif 
@@ -656,8 +741,8 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0 .. 1</td>
       <td>0</td>
       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
-		is excluded. In this case, the file <i><b>device.h</b></i>
-		must contain a vendor specific implementation of this function.</td>
+    is excluded. In this case, the file <i><b>device.h</b></i>
+    must contain a vendor specific implementation of this function.</td>
     </tr>
 </table>
 \endif
@@ -706,8 +791,8 @@ If these <i>\#defines</i> are missing default values are used.
       <td>0 .. 1</td>
       <td>0</td>
       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
-		is excluded. In this case, the file <i><b>device.h</b></i>
-		must contain a vendor specific implementation of this function.</td>
+    is excluded. In this case, the file <i><b>device.h</b></i>
+    must contain a vendor specific implementation of this function.</td>
     </tr>
 </table>
 \endif

+ 37 - 38
CMSIS/DoxyGen/Core/src/Using.txt

@@ -1,20 +1,19 @@
 /** 
 \page using_pg  Using CMSIS in Embedded Applications
 
-
-\details 
+\details
 
 To use the CMSIS-Core (Cortex-M) the following files are added to the embedded application:
- - \ref startup_s_pg with reset handler and exception vectors.
+ - \ref startup_c_pg (formerly \ref startup_s_pg) with reset handler and exception vectors.
  - \ref system_c_pg with general device configuration (i.e. for clock and BUS setup).
  - \ref device_h_pg gives access to processor core and all peripherals.
 
-\note The files \ref startup_s_pg and \ref system_c_pg may require application specific adaptations and therefore should be copied 
-      into the application project folder prior configuration. The \ref device_h_pg is included in all source files that need device access 
-	  and can be stored on a central include folder that is generic for all projects.
+\note The files \ref startup_c_pg (or \ref startup_s_pg) and \ref system_c_pg may require application specific adaptations and therefore should be copied 
+  into the application project folder prior configuration. The \ref device_h_pg is included in all source files that need device access 
+  and can be stored on a central include folder that is generic for all projects.
 
-The \ref startup_s_pg is executed after reset and calls \ref SystemInit. After the system initialization control is transferred to the C/C++ run-time
-library which performs initialization and calls the \b main function in the user code. In addition the \ref startup_s_pg contains all exception and
+The \ref startup_c_pg (or \ref startup_s_pg) is executed after reset and calls \ref SystemInit. After the system initialization control is transferred to the C/C++ run-time
+library which performs initialization and calls the \b main function in the user code. In addition the \ref startup_c_pg (or \ref startup_s_pg) contains all exception and
 interrupt vectors and implements a default function for every interrupt. It may also contain stack and heap configurations for the user application.
 
 The \ref system_c_pg performs the setup for the processor clock. The variable \ref SystemCoreClock indicates the CPU clock speed.
@@ -32,11 +31,11 @@ CMSIS-Pack provides the <b>\#define CMSIS_header_file</b> in <a href="../../Pack
 
 \image html "CMSIS_CORE_Files_user.png" "CMSIS-Core (Cortex-M) User Files"
 
-The CMSIS-Core (Cortex-M) are device specific. In addition, the \ref startup_s_pg is also compiler vendor specific. 
-The various compiler vendor tool chains may provide folders that contain the CMSIS files for each supported device.
-  
+The CMSIS-Core (Cortex-M) system files are device specific. In addition, the deprecated \ref startup_s_pg is also compiler vendor specific.
+The versions provided by CMSIS are only generic templates. The adopted versions for a concrete device are typically provided by the device
+vendor through the according device familiy pack (DFP).
 
-For example, the following files are provided in MDK to support the STM32F10x Connectivity Line device variants:
+For example, the following files are provided by the STM32F10x device family pack:
 
 <table class="cmtable">
     <tr>
@@ -44,19 +43,19 @@ For example, the following files are provided in MDK to support the STM32F10x Co
       <th>Description</th>
     </tr>
     <tr>
-      <td>".\ARM\Startup\ST\STM32F10x\startup_stm32f10x_cl.s"</td>
+      <td>".\Device\Source\ARM\startup_stm32f10x_cl.s"</td>
       <td>\ref startup_s_pg for the STM32F10x Connectivity Line device variants.</td>
     </tr>
     <tr>
-      <td>".\ARM\Startup\ST\STM32F10x\system_stmf10x.c"</td>
+      <td>".\Device\Source\system_stmf10x.c"</td>
       <td>\ref system_c_pg for the STM32F10x device families.</td>
     </tr>
     <tr>
-      <td>".\ARM\INC\ST\STM32F10x\stm32f10x.h"</td>
+      <td>".\Device\Include\stm32f10x.h"</td>
       <td>\ref device_h_pg for the STM32F10x device families.</td>
     </tr>
     <tr>
-      <td>".\ARM\INC\ST\STM32F10x\system_stm32f10x.h"</td>
+      <td>".\Device\Include\system_stm32f10x.h"</td>
       <td>\ref system_Device_h_sec for the STM32F10x device families.</td>
     </tr>
 </table>
@@ -113,7 +112,7 @@ void Device_Initialization (void)  {             // Configure & Initialize MCU
  
  
 // The processor clock is initialized by CMSIS startup + system file
-void main (void) {	                             // user application starts here
+void main (void) {                               // user application starts here
   Device_Initialization ();                      // Configure & Initialize MCU
   while (1)  {                                   // Endless Loop (the Super-Loop)
     __disable_irq ();                            // Disable all interrupts
@@ -143,9 +142,9 @@ a typical use case where the interrupt vectors are copied to RAM and the SysTick
 #include "ARMCM3.h"                     // Device header
  
 /* externals from startup_ARMCM3.s */
-extern uint32_t __Vectors[];                             /* vector table ROM  */
+extern uint32_t __Vectors[];              /* vector table ROM  */
  
-#define VECTORTABLE_SIZE        (256)          /* size Cortex-M3 vector table */
+#define VECTORTABLE_SIZE        (256)     /* size Cortex-M3 vector table      */
 #define VECTORTABLE_ALIGNMENT   (0x100ul) /* 16 Cortex + 32 ARMCM3 = 48 words */
                                           /* next power of 2 = 256            */
  
@@ -157,7 +156,7 @@ uint32_t vectorTable_RAM[VECTORTABLE_SIZE] __attribute__(( aligned (VECTORTABLE_
  *----------------------------------------------------------------------------*/
 volatile uint32_t msTicks = 0;                        /* counts 1ms timeTicks */
 void SysTick_Handler(void) {
-  msTicks++;                                             /* increment counter */
+  msTicks++;                                          /* increment counter */
 }
  
 /*----------------------------------------------------------------------------
@@ -165,7 +164,7 @@ void SysTick_Handler(void) {
  *----------------------------------------------------------------------------*/
 volatile uint32_t msTicks_RAM = 0;                    /* counts 1ms timeTicks */
 void SysTick_Handler_RAM(void) {
-  msTicks_RAM++;                                         /* increment counter */
+  msTicks_RAM++;                                      /* increment counter */
 }
  
 /*----------------------------------------------------------------------------
@@ -179,7 +178,7 @@ int main (void) {
   }
                                                    /* replace SysTick Handler */
   vectorTable_RAM[SysTick_IRQn + 16] = (uint32_t)SysTick_Handler_RAM;
-	
+  
   /* relocate vector table */ 
   __disable_irq();
     SCB->VTOR = (uint32_t)&vectorTable_RAM;
@@ -210,53 +209,53 @@ The table below lists the folder and device names of the Arm processors.
       <td>".\Device\ARM\ARMCM0"</td>
       <td>Cortex-M0</td>
       <td>Contains \b Include and \b Source template files configured for the Cortex-M0 processor.
-	      The device name is ARMCM0 and the name of the \ref device_h_pg is <ARMCM0.h>.
-	  </td>
+        The device name is ARMCM0 and the name of the \ref device_h_pg is <ARMCM0.h>.
+    </td>
     </tr>
     <tr>
       <td>".\Device\ARM\ARMCM0plus"</td>
       <td>Cortex-M0+</td>
       <td>Contains \b Include and \b Source template files configured for the Cortex-M0+ processor.
-	      The device name is ARMCM0plus and the name of the \ref device_h_pg is <ARMCM0plus.h>.
-	  </td>
+        The device name is ARMCM0plus and the name of the \ref device_h_pg is <ARMCM0plus.h>.
+    </td>
     </tr>
     <tr>
       <td>".\Device\ARM\ARMCM3"</td>
       <td>Cortex-M3</td>
       <td>Contains \b Include and \b Source template files configured for the Cortex-M3 processor.
-	      The device name is ARMCM3 and the name of the \ref device_h_pg is <ARMCM3.h>.
-	  </td>
+        The device name is ARMCM3 and the name of the \ref device_h_pg is <ARMCM3.h>.
+    </td>
     </tr>
     <tr>
       <td>".\Device\ARM\ARMCM4"</td>
       <td>Cortex-M4</td>
       <td>Contains \b Include and \b Source template files configured for the Cortex-M4 processor.
-	      The device name is ARMCM4 and the name of the \ref device_h_pg is <ARMCM4.h>.
-	  </td>
+        The device name is ARMCM4 and the name of the \ref device_h_pg is <ARMCM4.h>.
+    </td>
     </tr>
     <tr>
       <td>".\Device\ARM\ARMCM7"</td>
       <td>Cortex-M7</td>
       <td>Contains \b Include and \b Source template files configured for the Cortex-M7 processor.
-	      The device name is ARMCM7 and the name of the \ref device_h_pg is <ARMCM7.h>.
-	  </td>
+        The device name is ARMCM7 and the name of the \ref device_h_pg is <ARMCM7.h>.
+    </td>
     </tr>
-\if ARMSC	
+\if ARMSC 
     <tr>
       <td>".\Device\ARM\ARMSC000"</td>
       <td>SecurCore SC000</td>
       <td>Contains \b Include and \b Source template files configured for the SecurCore SC000 processor.
-	      The device name is ARMSC000 and the name of the \ref device_h_pg is <ARMSC000.h>.
-	  </td>
+        The device name is ARMSC000 and the name of the \ref device_h_pg is <ARMSC000.h>.
+    </td>
     </tr>
     <tr>
       <td>".\Device\ARM\ARMSC300"</td>
       <td>SecurCore SC300</td>
       <td>Contains \b Include and \b Source template files configured for the SecurCore SC300 processor.
-	      The device name is ARMSC300 and the name of the \ref device_h_pg is <ARMSC300.h>.
-	  </td>
+        The device name is ARMSC300 and the name of the \ref device_h_pg is <ARMSC300.h>.
+    </td>
     </tr>
-\endif	
+\endif  
 </table>
 
 \note