You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Michał Narajowski <mi...@codecoup.pl> on 2016/11/07 13:15:19 UTC

[PATCH] mcu/nordic/nrf52xxx: Fix for nrf52dk startup crash

With this patch it is possible to start nrf52dk board.
Regression observed after patch:
290c683 MYNEWT-475: BSP Cleanup
---
 .../src/arch/cortex_m4/gcc_startup_nrf52.s         | 289 +++++++++++++++++++++
 .../src/arch/cortex_m4/gcc_startup_nrf52_split.s   | 150 +++++++++++
 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s     | 289 ---------------------
 .../nordic/nrf52xxx/src/gcc_startup_nrf52_split.s  | 150 -----------
 4 files changed, 439 insertions(+), 439 deletions(-)
 create mode 100755 hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
 create mode 100755 hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
 delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
 delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s

diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
new file mode 100755
index 0000000..fb804fd
--- /dev/null
+++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
@@ -0,0 +1,289 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+    .syntax unified
+    .arch armv7-m
+
+    .section .stack
+    .align 3
+    .equ    Stack_Size, 432
+    .globl    __StackTop
+    .globl    __StackLimit
+__StackLimit:
+    .space    Stack_Size
+    .size __StackLimit, . - __StackLimit
+__StackTop:
+    .size __StackTop, . - __StackTop
+
+    .section .heap
+    .align 3
+#ifdef __HEAP_SIZE
+    .equ    Heap_Size, __HEAP_SIZE
+#else
+    .equ    Heap_Size, 0
+#endif
+    .globl    __HeapBase
+    .globl    __HeapLimit
+__HeapBase:
+    .if    Heap_Size
+    .space    Heap_Size
+    .endif
+    .size __HeapBase, . - __HeapBase
+__HeapLimit:
+    .size __HeapLimit, . - __HeapLimit
+
+    .section .isr_vector
+    .align 2
+    .globl __isr_vector
+__isr_vector:
+    .long    __StackTop            /* Top of Stack */
+    .long   Reset_Handler               /* Reset Handler */
+    .long   NMI_Handler                 /* NMI Handler */
+    .long   HardFault_Handler           /* Hard Fault Handler */
+    .long   0                           /* Reserved */
+    .long   0                           /* Reserved */
+    .long   0                           /* Reserved */
+    .long   0                           /* Reserved */
+    .long   0                           /* Reserved */
+    .long   0                           /* Reserved */
+    .long   0                           /* Reserved */
+    .long   SVC_Handler                 /* SVCall Handler */
+    .long   0                           /* Reserved */
+    .long   0                           /* Reserved */
+    .long   PendSV_Handler              /* PendSV Handler */
+    .long   SysTick_Handler             /* SysTick Handler */
+
+  /* External Interrupts */
+    .long   POWER_CLOCK_IRQHandler
+    .long   RADIO_IRQHandler
+    .long   UARTE0_UART0_IRQHandler
+    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+    .long   NFCT_IRQHandler
+    .long   GPIOTE_IRQHandler
+    .long   SAADC_IRQHandler
+    .long   TIMER0_IRQHandler
+    .long   TIMER1_IRQHandler
+    .long   TIMER2_IRQHandler
+    .long   RTC0_IRQHandler
+    .long   TEMP_IRQHandler
+    .long   RNG_IRQHandler
+    .long   ECB_IRQHandler
+    .long   CCM_AAR_IRQHandler
+    .long   WDT_IRQHandler
+    .long   RTC1_IRQHandler
+    .long   QDEC_IRQHandler
+    .long   COMP_LPCOMP_IRQHandler
+    .long   SWI0_EGU0_IRQHandler
+    .long   SWI1_EGU1_IRQHandler
+    .long   SWI2_EGU2_IRQHandler
+    .long   SWI3_EGU3_IRQHandler
+    .long   SWI4_EGU4_IRQHandler
+    .long   SWI5_EGU5_IRQHandler
+    .long   TIMER3_IRQHandler
+    .long   TIMER4_IRQHandler
+    .long   PWM0_IRQHandler
+    .long   PDM_IRQHandler
+    .long   0                         /*Reserved */
+    .long   0                         /*Reserved */
+    .long   MWU_IRQHandler
+    .long   PWM1_IRQHandler
+    .long   PWM2_IRQHandler
+    .long   SPIM2_SPIS2_SPI2_IRQHandler
+    .long   RTC2_IRQHandler
+    .long   I2S_IRQHandler
+
+    .size    __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+    .text
+    .thumb
+    .thumb_func
+    .align 1
+    .globl    Reset_Handler
+    .type    Reset_Handler, %function
+Reset_Handler:
+    .fnstart
+
+/*     Loop to copy data from read only memory to RAM. The ranges
+ *      of copy from/to are specified by following symbols evaluated in
+ *      linker script.
+ *      __etext: End of code section, i.e., begin of data sections to copy from.
+ *      __data_start__/__data_end__: RAM address range that data should be
+ *      copied to. Both must be aligned to 4 bytes boundary.  */
+
+    ldr    r1, =__etext
+    ldr    r2, =__data_start__
+    ldr    r3, =__data_end__
+
+    subs    r3, r2
+    ble     .LC0
+
+.LC1:
+    subs    r3, 4
+    ldr    r0, [r1,r3]
+    str    r0, [r2,r3]
+    bgt    .LC1
+
+.LC0:
+
+    LDR     R0, =__HeapBase
+    LDR     R1, =__HeapLimit
+    BL      _sbrkInit
+
+    LDR     R0, =SystemInit
+    BLX     R0
+
+    LDR     R0, =_start
+    BX      R0
+
+    .pool
+    .cantunwind
+    .fnend
+    .size   Reset_Handler,.-Reset_Handler
+
+    .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+    .weak   NMI_Handler
+    .type   NMI_Handler, %function
+NMI_Handler:
+    B       .
+    .size   NMI_Handler, . - NMI_Handler
+
+
+    .weak   HardFault_Handler
+    .type   HardFault_Handler, %function
+HardFault_Handler:
+    B       .
+    .size   HardFault_Handler, . - HardFault_Handler
+
+
+    .weak   MemoryManagement_Handler
+    .type   MemoryManagement_Handler, %function
+MemoryManagement_Handler:
+    B       .
+    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
+
+
+    .weak   BusFault_Handler
+    .type   BusFault_Handler, %function
+BusFault_Handler:
+    B       .
+    .size   BusFault_Handler, . - BusFault_Handler
+
+
+    .weak   UsageFault_Handler
+    .type   UsageFault_Handler, %function
+UsageFault_Handler:
+    B       .
+    .size   UsageFault_Handler, . - UsageFault_Handler
+
+
+    .weak   SVC_Handler
+    .type   SVC_Handler, %function
+SVC_Handler:
+    B       .
+    .size   SVC_Handler, . - SVC_Handler
+
+
+    .weak   PendSV_Handler
+    .type   PendSV_Handler, %function
+PendSV_Handler:
+    B       .
+    .size   PendSV_Handler, . - PendSV_Handler
+
+
+    .weak   SysTick_Handler
+    .type   SysTick_Handler, %function
+SysTick_Handler:
+    B       .
+    .size   SysTick_Handler, . - SysTick_Handler
+
+
+/* IRQ Handlers */
+
+    .globl  Default_Handler
+    .type   Default_Handler, %function
+Default_Handler:
+    B       .
+    .size   Default_Handler, . - Default_Handler
+
+    .macro  IRQ handler
+    .weak   \handler
+    .set    \handler, Default_Handler
+    .endm
+
+    IRQ  POWER_CLOCK_IRQHandler
+    IRQ  RADIO_IRQHandler
+    IRQ  UARTE0_UART0_IRQHandler
+    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+    IRQ  NFCT_IRQHandler
+    IRQ  GPIOTE_IRQHandler
+    IRQ  SAADC_IRQHandler
+    IRQ  TIMER0_IRQHandler
+    IRQ  TIMER1_IRQHandler
+    IRQ  TIMER2_IRQHandler
+    IRQ  RTC0_IRQHandler
+    IRQ  TEMP_IRQHandler
+    IRQ  RNG_IRQHandler
+    IRQ  ECB_IRQHandler
+    IRQ  CCM_AAR_IRQHandler
+    IRQ  WDT_IRQHandler
+    IRQ  RTC1_IRQHandler
+    IRQ  QDEC_IRQHandler
+    IRQ  COMP_LPCOMP_IRQHandler
+    IRQ  SWI0_EGU0_IRQHandler
+    IRQ  SWI1_EGU1_IRQHandler
+    IRQ  SWI2_EGU2_IRQHandler
+    IRQ  SWI3_EGU3_IRQHandler
+    IRQ  SWI4_EGU4_IRQHandler
+    IRQ  SWI5_EGU5_IRQHandler
+    IRQ  TIMER3_IRQHandler
+    IRQ  TIMER4_IRQHandler
+    IRQ  PWM0_IRQHandler
+    IRQ  PDM_IRQHandler
+    IRQ  MWU_IRQHandler
+    IRQ  PWM1_IRQHandler
+    IRQ  PWM2_IRQHandler
+    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
+    IRQ  RTC2_IRQHandler
+    IRQ  I2S_IRQHandler
+
+  .end
diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
new file mode 100755
index 0000000..7426848
--- /dev/null
+++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
@@ -0,0 +1,150 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+    .syntax unified
+    .arch armv7-m
+    .section .stack
+    .align 3
+    .equ    Stack_Size, 432
+    .globl    __StackTop
+    .globl    __StackLimit
+__StackLimit:
+    .space    Stack_Size
+    .size __StackLimit, . - __StackLimit
+__StackTop:
+    .size __StackTop, . - __StackTop
+
+    .section .heap
+    .align 3
+#ifdef __HEAP_SIZE
+    .equ    Heap_Size, __HEAP_SIZE
+#else
+    .equ    Heap_Size, 0
+#endif
+    .globl    __HeapBase
+    .globl    __HeapLimit
+__HeapBase:
+    .if    Heap_Size
+    .space    Heap_Size
+    .endif
+    .size __HeapBase, . - __HeapBase
+__HeapLimit:
+    .size __HeapLimit, . - __HeapLimit
+
+    .section .isr_vector_split
+    .align 2
+    .globl __isr_vector_split
+__isr_vector_split:
+    .long    __StackTop            /* Top of Stack */
+    .long   Reset_Handler_split               /* Reset Handler */
+
+    .size    __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+    .text
+    .thumb
+    .thumb_func
+    .align 1
+    .globl    Reset_Handler_split
+    .type    Reset_Handler_split, %function
+Reset_Handler_split:
+    .fnstart
+
+
+/*     Loop to copy data from read only memory to RAM. The ranges
+ *      of copy from/to are specified by following symbols evaluated in
+ *      linker script.
+ *      __etext: End of code section, i.e., begin of data sections to copy from.
+ *      __data_start__/__data_end__: RAM address range that data should be
+ *      copied to. Both must be aligned to 4 bytes boundary.  */
+
+    ldr    r1, =__etext
+    ldr    r2, =__data_start__
+    ldr    r3, =__data_end__
+
+    subs    r3, r2
+    ble     .LC0
+
+.LC1:
+    subs    r3, 4
+    ldr    r0, [r1,r3]
+    str    r0, [r2,r3]
+    bgt    .LC1
+
+.LC0:
+    ldr    r1, =__etext_loader
+    ldr    r2, =__data_start___loader
+    ldr    r3, =__data_end___loader
+
+    subs    r3, r2
+    ble     .LC2
+
+.LC3:
+    subs    r3, 4
+    ldr    r0, [r1,r3]
+    str    r0, [r2,r3]
+    bgt    .LC3
+.LC2:
+
+    subs    r0, r0
+    ldr    r2, =__bss_start___loader
+    ldr    r3, =__bss_end___loader
+
+    subs    r3, r2
+    ble     .LC4
+
+.LC5:
+    subs    r3, 4
+    str    r0, [r2,r3]
+    bgt    .LC5
+.LC4:
+
+    LDR     R0, =__HeapBase
+    LDR     R1, =__HeapLimit
+    BL      _sbrkInit
+
+    LDR     R0, =SystemInit
+    BLX     R0
+    LDR     R0, =_start
+    BX      R0
+
+    .pool
+    .cantunwind
+    .fnend
+    .size   Reset_Handler_split,.-Reset_Handler_split
+
+    .section ".text"
+  .end
diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
deleted file mode 100755
index fb804fd..0000000
--- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
-  contributors may be used to endorse or promote products derived from
-  this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
-    .syntax unified
-    .arch armv7-m
-
-    .section .stack
-    .align 3
-    .equ    Stack_Size, 432
-    .globl    __StackTop
-    .globl    __StackLimit
-__StackLimit:
-    .space    Stack_Size
-    .size __StackLimit, . - __StackLimit
-__StackTop:
-    .size __StackTop, . - __StackTop
-
-    .section .heap
-    .align 3
-#ifdef __HEAP_SIZE
-    .equ    Heap_Size, __HEAP_SIZE
-#else
-    .equ    Heap_Size, 0
-#endif
-    .globl    __HeapBase
-    .globl    __HeapLimit
-__HeapBase:
-    .if    Heap_Size
-    .space    Heap_Size
-    .endif
-    .size __HeapBase, . - __HeapBase
-__HeapLimit:
-    .size __HeapLimit, . - __HeapLimit
-
-    .section .isr_vector
-    .align 2
-    .globl __isr_vector
-__isr_vector:
-    .long    __StackTop            /* Top of Stack */
-    .long   Reset_Handler               /* Reset Handler */
-    .long   NMI_Handler                 /* NMI Handler */
-    .long   HardFault_Handler           /* Hard Fault Handler */
-    .long   0                           /* Reserved */
-    .long   0                           /* Reserved */
-    .long   0                           /* Reserved */
-    .long   0                           /* Reserved */
-    .long   0                           /* Reserved */
-    .long   0                           /* Reserved */
-    .long   0                           /* Reserved */
-    .long   SVC_Handler                 /* SVCall Handler */
-    .long   0                           /* Reserved */
-    .long   0                           /* Reserved */
-    .long   PendSV_Handler              /* PendSV Handler */
-    .long   SysTick_Handler             /* SysTick Handler */
-
-  /* External Interrupts */
-    .long   POWER_CLOCK_IRQHandler
-    .long   RADIO_IRQHandler
-    .long   UARTE0_UART0_IRQHandler
-    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
-    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
-    .long   NFCT_IRQHandler
-    .long   GPIOTE_IRQHandler
-    .long   SAADC_IRQHandler
-    .long   TIMER0_IRQHandler
-    .long   TIMER1_IRQHandler
-    .long   TIMER2_IRQHandler
-    .long   RTC0_IRQHandler
-    .long   TEMP_IRQHandler
-    .long   RNG_IRQHandler
-    .long   ECB_IRQHandler
-    .long   CCM_AAR_IRQHandler
-    .long   WDT_IRQHandler
-    .long   RTC1_IRQHandler
-    .long   QDEC_IRQHandler
-    .long   COMP_LPCOMP_IRQHandler
-    .long   SWI0_EGU0_IRQHandler
-    .long   SWI1_EGU1_IRQHandler
-    .long   SWI2_EGU2_IRQHandler
-    .long   SWI3_EGU3_IRQHandler
-    .long   SWI4_EGU4_IRQHandler
-    .long   SWI5_EGU5_IRQHandler
-    .long   TIMER3_IRQHandler
-    .long   TIMER4_IRQHandler
-    .long   PWM0_IRQHandler
-    .long   PDM_IRQHandler
-    .long   0                         /*Reserved */
-    .long   0                         /*Reserved */
-    .long   MWU_IRQHandler
-    .long   PWM1_IRQHandler
-    .long   PWM2_IRQHandler
-    .long   SPIM2_SPIS2_SPI2_IRQHandler
-    .long   RTC2_IRQHandler
-    .long   I2S_IRQHandler
-
-    .size    __isr_vector, . - __isr_vector
-
-/* Reset Handler */
-
-    .text
-    .thumb
-    .thumb_func
-    .align 1
-    .globl    Reset_Handler
-    .type    Reset_Handler, %function
-Reset_Handler:
-    .fnstart
-
-/*     Loop to copy data from read only memory to RAM. The ranges
- *      of copy from/to are specified by following symbols evaluated in
- *      linker script.
- *      __etext: End of code section, i.e., begin of data sections to copy from.
- *      __data_start__/__data_end__: RAM address range that data should be
- *      copied to. Both must be aligned to 4 bytes boundary.  */
-
-    ldr    r1, =__etext
-    ldr    r2, =__data_start__
-    ldr    r3, =__data_end__
-
-    subs    r3, r2
-    ble     .LC0
-
-.LC1:
-    subs    r3, 4
-    ldr    r0, [r1,r3]
-    str    r0, [r2,r3]
-    bgt    .LC1
-
-.LC0:
-
-    LDR     R0, =__HeapBase
-    LDR     R1, =__HeapLimit
-    BL      _sbrkInit
-
-    LDR     R0, =SystemInit
-    BLX     R0
-
-    LDR     R0, =_start
-    BX      R0
-
-    .pool
-    .cantunwind
-    .fnend
-    .size   Reset_Handler,.-Reset_Handler
-
-    .section ".text"
-
-
-/* Dummy Exception Handlers (infinite loops which can be modified) */
-
-    .weak   NMI_Handler
-    .type   NMI_Handler, %function
-NMI_Handler:
-    B       .
-    .size   NMI_Handler, . - NMI_Handler
-
-
-    .weak   HardFault_Handler
-    .type   HardFault_Handler, %function
-HardFault_Handler:
-    B       .
-    .size   HardFault_Handler, . - HardFault_Handler
-
-
-    .weak   MemoryManagement_Handler
-    .type   MemoryManagement_Handler, %function
-MemoryManagement_Handler:
-    B       .
-    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
-
-
-    .weak   BusFault_Handler
-    .type   BusFault_Handler, %function
-BusFault_Handler:
-    B       .
-    .size   BusFault_Handler, . - BusFault_Handler
-
-
-    .weak   UsageFault_Handler
-    .type   UsageFault_Handler, %function
-UsageFault_Handler:
-    B       .
-    .size   UsageFault_Handler, . - UsageFault_Handler
-
-
-    .weak   SVC_Handler
-    .type   SVC_Handler, %function
-SVC_Handler:
-    B       .
-    .size   SVC_Handler, . - SVC_Handler
-
-
-    .weak   PendSV_Handler
-    .type   PendSV_Handler, %function
-PendSV_Handler:
-    B       .
-    .size   PendSV_Handler, . - PendSV_Handler
-
-
-    .weak   SysTick_Handler
-    .type   SysTick_Handler, %function
-SysTick_Handler:
-    B       .
-    .size   SysTick_Handler, . - SysTick_Handler
-
-
-/* IRQ Handlers */
-
-    .globl  Default_Handler
-    .type   Default_Handler, %function
-Default_Handler:
-    B       .
-    .size   Default_Handler, . - Default_Handler
-
-    .macro  IRQ handler
-    .weak   \handler
-    .set    \handler, Default_Handler
-    .endm
-
-    IRQ  POWER_CLOCK_IRQHandler
-    IRQ  RADIO_IRQHandler
-    IRQ  UARTE0_UART0_IRQHandler
-    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
-    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
-    IRQ  NFCT_IRQHandler
-    IRQ  GPIOTE_IRQHandler
-    IRQ  SAADC_IRQHandler
-    IRQ  TIMER0_IRQHandler
-    IRQ  TIMER1_IRQHandler
-    IRQ  TIMER2_IRQHandler
-    IRQ  RTC0_IRQHandler
-    IRQ  TEMP_IRQHandler
-    IRQ  RNG_IRQHandler
-    IRQ  ECB_IRQHandler
-    IRQ  CCM_AAR_IRQHandler
-    IRQ  WDT_IRQHandler
-    IRQ  RTC1_IRQHandler
-    IRQ  QDEC_IRQHandler
-    IRQ  COMP_LPCOMP_IRQHandler
-    IRQ  SWI0_EGU0_IRQHandler
-    IRQ  SWI1_EGU1_IRQHandler
-    IRQ  SWI2_EGU2_IRQHandler
-    IRQ  SWI3_EGU3_IRQHandler
-    IRQ  SWI4_EGU4_IRQHandler
-    IRQ  SWI5_EGU5_IRQHandler
-    IRQ  TIMER3_IRQHandler
-    IRQ  TIMER4_IRQHandler
-    IRQ  PWM0_IRQHandler
-    IRQ  PDM_IRQHandler
-    IRQ  MWU_IRQHandler
-    IRQ  PWM1_IRQHandler
-    IRQ  PWM2_IRQHandler
-    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
-    IRQ  RTC2_IRQHandler
-    IRQ  I2S_IRQHandler
-
-  .end
diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
deleted file mode 100755
index 7426848..0000000
--- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
-  contributors may be used to endorse or promote products derived from
-  this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
-    .syntax unified
-    .arch armv7-m
-    .section .stack
-    .align 3
-    .equ    Stack_Size, 432
-    .globl    __StackTop
-    .globl    __StackLimit
-__StackLimit:
-    .space    Stack_Size
-    .size __StackLimit, . - __StackLimit
-__StackTop:
-    .size __StackTop, . - __StackTop
-
-    .section .heap
-    .align 3
-#ifdef __HEAP_SIZE
-    .equ    Heap_Size, __HEAP_SIZE
-#else
-    .equ    Heap_Size, 0
-#endif
-    .globl    __HeapBase
-    .globl    __HeapLimit
-__HeapBase:
-    .if    Heap_Size
-    .space    Heap_Size
-    .endif
-    .size __HeapBase, . - __HeapBase
-__HeapLimit:
-    .size __HeapLimit, . - __HeapLimit
-
-    .section .isr_vector_split
-    .align 2
-    .globl __isr_vector_split
-__isr_vector_split:
-    .long    __StackTop            /* Top of Stack */
-    .long   Reset_Handler_split               /* Reset Handler */
-
-    .size    __isr_vector_split, . - __isr_vector_split
-
-/* Reset Handler */
-
-    .text
-    .thumb
-    .thumb_func
-    .align 1
-    .globl    Reset_Handler_split
-    .type    Reset_Handler_split, %function
-Reset_Handler_split:
-    .fnstart
-
-
-/*     Loop to copy data from read only memory to RAM. The ranges
- *      of copy from/to are specified by following symbols evaluated in
- *      linker script.
- *      __etext: End of code section, i.e., begin of data sections to copy from.
- *      __data_start__/__data_end__: RAM address range that data should be
- *      copied to. Both must be aligned to 4 bytes boundary.  */
-
-    ldr    r1, =__etext
-    ldr    r2, =__data_start__
-    ldr    r3, =__data_end__
-
-    subs    r3, r2
-    ble     .LC0
-
-.LC1:
-    subs    r3, 4
-    ldr    r0, [r1,r3]
-    str    r0, [r2,r3]
-    bgt    .LC1
-
-.LC0:
-    ldr    r1, =__etext_loader
-    ldr    r2, =__data_start___loader
-    ldr    r3, =__data_end___loader
-
-    subs    r3, r2
-    ble     .LC2
-
-.LC3:
-    subs    r3, 4
-    ldr    r0, [r1,r3]
-    str    r0, [r2,r3]
-    bgt    .LC3
-.LC2:
-
-    subs    r0, r0
-    ldr    r2, =__bss_start___loader
-    ldr    r3, =__bss_end___loader
-
-    subs    r3, r2
-    ble     .LC4
-
-.LC5:
-    subs    r3, 4
-    str    r0, [r2,r3]
-    bgt    .LC5
-.LC4:
-
-    LDR     R0, =__HeapBase
-    LDR     R1, =__HeapLimit
-    BL      _sbrkInit
-
-    LDR     R0, =SystemInit
-    BLX     R0
-    LDR     R0, =_start
-    BX      R0
-
-    .pool
-    .cantunwind
-    .fnend
-    .size   Reset_Handler_split,.-Reset_Handler_split
-
-    .section ".text"
-  .end
-- 
2.7.4


Re: [PATCH] mcu/nordic/nrf52xxx: Fix for nrf52dk startup crash

Posted by will sanfilippo <wi...@runtime.io>.
Yes Lukasz, I know it does not appear when you build only when you try to run it.

We will merge the pull request and all should be good.

Will


> On Nov 7, 2016, at 7:43 AM, Łukasz Rymanowski <lu...@codecoup.pl> wrote:
> 
> Hi Will,
> 
> The issue is not visible during build time but on a platform startup.
> 
> I believe that Michal's patch solves this issue so let's apply this patch
> using git am or accept pull request he has prepared.
> 
> Best regards,
> Lukasz
> 
> On Nov 7, 2016 4:12 PM, "will sanfilippo" <wi...@runtime.io> wrote:
> 
>> Hey all:
>> 
>> Sorry about this. I think my build found the startup file somewhere but
>> what is in develop doesnt. We will address this today.
>> 
>> Thanks, and sorry.
>> 
>> Will
>> 
>>> On Nov 7, 2016, at 6:13 AM, Michał Narajowski <
>> michal.narajowski@codecoup.pl> wrote:
>>> 
>>> Also sent a pull request.
>>> 
>>> 2016-11-07 14:15 GMT+01:00 Michał Narajowski <
>> michal.narajowski@codecoup.pl>
>>> :
>>> 
>>>> With this patch it is possible to start nrf52dk board.
>>>> Regression observed after patch:
>>>> 290c683 MYNEWT-475: BSP Cleanup
>>>> ---
>>>> .../src/arch/cortex_m4/gcc_startup_nrf52.s         | 289
>>>> +++++++++++++++++++++
>>>> .../src/arch/cortex_m4/gcc_startup_nrf52_split.s   | 150 +++++++++++
>>>> hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s     | 289
>>>> ---------------------
>>>> .../nordic/nrf52xxx/src/gcc_startup_nrf52_split.s  | 150 -----------
>>>> 4 files changed, 439 insertions(+), 439 deletions(-)
>>>> create mode 100755 hw/mcu/nordic/nrf52xxx/src/
>> arch/cortex_m4/gcc_startup_
>>>> nrf52.s
>>>> create mode 100755 hw/mcu/nordic/nrf52xxx/src/
>> arch/cortex_m4/gcc_startup_
>>>> nrf52_split.s
>>>> delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
>>>> delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
>>>> 
>>>> diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
>> nrf52.s
>>>> b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
>>>> new file mode 100755
>>>> index 0000000..fb804fd
>>>> --- /dev/null
>>>> +++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
>>>> @@ -0,0 +1,289 @@
>>>> +/*
>>>> +Copyright (c) 2015, Nordic Semiconductor ASA
>>>> +All rights reserved.
>>>> +
>>>> +Redistribution and use in source and binary forms, with or without
>>>> +modification, are permitted provided that the following conditions are
>>>> met:
>>>> +
>>>> +* Redistributions of source code must retain the above copyright
>> notice,
>>>> this
>>>> +  list of conditions and the following disclaimer.
>>>> +
>>>> +* Redistributions in binary form must reproduce the above copyright
>>>> notice,
>>>> +  this list of conditions and the following disclaimer in the
>>>> documentation
>>>> +  and/or other materials provided with the distribution.
>>>> +
>>>> +* Neither the name of Nordic Semiconductor ASA nor the names of its
>>>> +  contributors may be used to endorse or promote products derived from
>>>> +  this software without specific prior written permission.
>>>> +
>>>> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
>>>> IS"
>>>> +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
>> THE
>>>> +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>>>> PURPOSE ARE
>>>> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
>>>> LIABLE
>>>> +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> CONSEQUENTIAL
>>>> +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
>> GOODS OR
>>>> +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
>> HOWEVER
>>>> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
>>>> LIABILITY,
>>>> +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
>> THE
>>>> USE
>>>> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>>>> +*/
>>>> +
>>>> +/*
>>>> +NOTE: Template files (including this one) are application specific and
>>>> therefore
>>>> +expected to be copied into the application project folder prior to its
>>>> use!
>>>> +*/
>>>> +
>>>> +    .syntax unified
>>>> +    .arch armv7-m
>>>> +
>>>> +    .section .stack
>>>> +    .align 3
>>>> +    .equ    Stack_Size, 432
>>>> +    .globl    __StackTop
>>>> +    .globl    __StackLimit
>>>> +__StackLimit:
>>>> +    .space    Stack_Size
>>>> +    .size __StackLimit, . - __StackLimit
>>>> +__StackTop:
>>>> +    .size __StackTop, . - __StackTop
>>>> +
>>>> +    .section .heap
>>>> +    .align 3
>>>> +#ifdef __HEAP_SIZE
>>>> +    .equ    Heap_Size, __HEAP_SIZE
>>>> +#else
>>>> +    .equ    Heap_Size, 0
>>>> +#endif
>>>> +    .globl    __HeapBase
>>>> +    .globl    __HeapLimit
>>>> +__HeapBase:
>>>> +    .if    Heap_Size
>>>> +    .space    Heap_Size
>>>> +    .endif
>>>> +    .size __HeapBase, . - __HeapBase
>>>> +__HeapLimit:
>>>> +    .size __HeapLimit, . - __HeapLimit
>>>> +
>>>> +    .section .isr_vector
>>>> +    .align 2
>>>> +    .globl __isr_vector
>>>> +__isr_vector:
>>>> +    .long    __StackTop            /* Top of Stack */
>>>> +    .long   Reset_Handler               /* Reset Handler */
>>>> +    .long   NMI_Handler                 /* NMI Handler */
>>>> +    .long   HardFault_Handler           /* Hard Fault Handler */
>>>> +    .long   0                           /* Reserved */
>>>> +    .long   0                           /* Reserved */
>>>> +    .long   0                           /* Reserved */
>>>> +    .long   0                           /* Reserved */
>>>> +    .long   0                           /* Reserved */
>>>> +    .long   0                           /* Reserved */
>>>> +    .long   0                           /* Reserved */
>>>> +    .long   SVC_Handler                 /* SVCall Handler */
>>>> +    .long   0                           /* Reserved */
>>>> +    .long   0                           /* Reserved */
>>>> +    .long   PendSV_Handler              /* PendSV Handler */
>>>> +    .long   SysTick_Handler             /* SysTick Handler */
>>>> +
>>>> +  /* External Interrupts */
>>>> +    .long   POWER_CLOCK_IRQHandler
>>>> +    .long   RADIO_IRQHandler
>>>> +    .long   UARTE0_UART0_IRQHandler
>>>> +    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
>>>> +    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
>>>> +    .long   NFCT_IRQHandler
>>>> +    .long   GPIOTE_IRQHandler
>>>> +    .long   SAADC_IRQHandler
>>>> +    .long   TIMER0_IRQHandler
>>>> +    .long   TIMER1_IRQHandler
>>>> +    .long   TIMER2_IRQHandler
>>>> +    .long   RTC0_IRQHandler
>>>> +    .long   TEMP_IRQHandler
>>>> +    .long   RNG_IRQHandler
>>>> +    .long   ECB_IRQHandler
>>>> +    .long   CCM_AAR_IRQHandler
>>>> +    .long   WDT_IRQHandler
>>>> +    .long   RTC1_IRQHandler
>>>> +    .long   QDEC_IRQHandler
>>>> +    .long   COMP_LPCOMP_IRQHandler
>>>> +    .long   SWI0_EGU0_IRQHandler
>>>> +    .long   SWI1_EGU1_IRQHandler
>>>> +    .long   SWI2_EGU2_IRQHandler
>>>> +    .long   SWI3_EGU3_IRQHandler
>>>> +    .long   SWI4_EGU4_IRQHandler
>>>> +    .long   SWI5_EGU5_IRQHandler
>>>> +    .long   TIMER3_IRQHandler
>>>> +    .long   TIMER4_IRQHandler
>>>> +    .long   PWM0_IRQHandler
>>>> +    .long   PDM_IRQHandler
>>>> +    .long   0                         /*Reserved */
>>>> +    .long   0                         /*Reserved */
>>>> +    .long   MWU_IRQHandler
>>>> +    .long   PWM1_IRQHandler
>>>> +    .long   PWM2_IRQHandler
>>>> +    .long   SPIM2_SPIS2_SPI2_IRQHandler
>>>> +    .long   RTC2_IRQHandler
>>>> +    .long   I2S_IRQHandler
>>>> +
>>>> +    .size    __isr_vector, . - __isr_vector
>>>> +
>>>> +/* Reset Handler */
>>>> +
>>>> +    .text
>>>> +    .thumb
>>>> +    .thumb_func
>>>> +    .align 1
>>>> +    .globl    Reset_Handler
>>>> +    .type    Reset_Handler, %function
>>>> +Reset_Handler:
>>>> +    .fnstart
>>>> +
>>>> +/*     Loop to copy data from read only memory to RAM. The ranges
>>>> + *      of copy from/to are specified by following symbols evaluated in
>>>> + *      linker script.
>>>> + *      __etext: End of code section, i.e., begin of data sections to
>>>> copy from.
>>>> + *      __data_start__/__data_end__: RAM address range that data
>> should be
>>>> + *      copied to. Both must be aligned to 4 bytes boundary.  */
>>>> +
>>>> +    ldr    r1, =__etext
>>>> +    ldr    r2, =__data_start__
>>>> +    ldr    r3, =__data_end__
>>>> +
>>>> +    subs    r3, r2
>>>> +    ble     .LC0
>>>> +
>>>> +.LC1:
>>>> +    subs    r3, 4
>>>> +    ldr    r0, [r1,r3]
>>>> +    str    r0, [r2,r3]
>>>> +    bgt    .LC1
>>>> +
>>>> +.LC0:
>>>> +
>>>> +    LDR     R0, =__HeapBase
>>>> +    LDR     R1, =__HeapLimit
>>>> +    BL      _sbrkInit
>>>> +
>>>> +    LDR     R0, =SystemInit
>>>> +    BLX     R0
>>>> +
>>>> +    LDR     R0, =_start
>>>> +    BX      R0
>>>> +
>>>> +    .pool
>>>> +    .cantunwind
>>>> +    .fnend
>>>> +    .size   Reset_Handler,.-Reset_Handler
>>>> +
>>>> +    .section ".text"
>>>> +
>>>> +
>>>> +/* Dummy Exception Handlers (infinite loops which can be modified) */
>>>> +
>>>> +    .weak   NMI_Handler
>>>> +    .type   NMI_Handler, %function
>>>> +NMI_Handler:
>>>> +    B       .
>>>> +    .size   NMI_Handler, . - NMI_Handler
>>>> +
>>>> +
>>>> +    .weak   HardFault_Handler
>>>> +    .type   HardFault_Handler, %function
>>>> +HardFault_Handler:
>>>> +    B       .
>>>> +    .size   HardFault_Handler, . - HardFault_Handler
>>>> +
>>>> +
>>>> +    .weak   MemoryManagement_Handler
>>>> +    .type   MemoryManagement_Handler, %function
>>>> +MemoryManagement_Handler:
>>>> +    B       .
>>>> +    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
>>>> +
>>>> +
>>>> +    .weak   BusFault_Handler
>>>> +    .type   BusFault_Handler, %function
>>>> +BusFault_Handler:
>>>> +    B       .
>>>> +    .size   BusFault_Handler, . - BusFault_Handler
>>>> +
>>>> +
>>>> +    .weak   UsageFault_Handler
>>>> +    .type   UsageFault_Handler, %function
>>>> +UsageFault_Handler:
>>>> +    B       .
>>>> +    .size   UsageFault_Handler, . - UsageFault_Handler
>>>> +
>>>> +
>>>> +    .weak   SVC_Handler
>>>> +    .type   SVC_Handler, %function
>>>> +SVC_Handler:
>>>> +    B       .
>>>> +    .size   SVC_Handler, . - SVC_Handler
>>>> +
>>>> +
>>>> +    .weak   PendSV_Handler
>>>> +    .type   PendSV_Handler, %function
>>>> +PendSV_Handler:
>>>> +    B       .
>>>> +    .size   PendSV_Handler, . - PendSV_Handler
>>>> +
>>>> +
>>>> +    .weak   SysTick_Handler
>>>> +    .type   SysTick_Handler, %function
>>>> +SysTick_Handler:
>>>> +    B       .
>>>> +    .size   SysTick_Handler, . - SysTick_Handler
>>>> +
>>>> +
>>>> +/* IRQ Handlers */
>>>> +
>>>> +    .globl  Default_Handler
>>>> +    .type   Default_Handler, %function
>>>> +Default_Handler:
>>>> +    B       .
>>>> +    .size   Default_Handler, . - Default_Handler
>>>> +
>>>> +    .macro  IRQ handler
>>>> +    .weak   \handler
>>>> +    .set    \handler, Default_Handler
>>>> +    .endm
>>>> +
>>>> +    IRQ  POWER_CLOCK_IRQHandler
>>>> +    IRQ  RADIO_IRQHandler
>>>> +    IRQ  UARTE0_UART0_IRQHandler
>>>> +    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
>>>> +    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
>>>> +    IRQ  NFCT_IRQHandler
>>>> +    IRQ  GPIOTE_IRQHandler
>>>> +    IRQ  SAADC_IRQHandler
>>>> +    IRQ  TIMER0_IRQHandler
>>>> +    IRQ  TIMER1_IRQHandler
>>>> +    IRQ  TIMER2_IRQHandler
>>>> +    IRQ  RTC0_IRQHandler
>>>> +    IRQ  TEMP_IRQHandler
>>>> +    IRQ  RNG_IRQHandler
>>>> +    IRQ  ECB_IRQHandler
>>>> +    IRQ  CCM_AAR_IRQHandler
>>>> +    IRQ  WDT_IRQHandler
>>>> +    IRQ  RTC1_IRQHandler
>>>> +    IRQ  QDEC_IRQHandler
>>>> +    IRQ  COMP_LPCOMP_IRQHandler
>>>> +    IRQ  SWI0_EGU0_IRQHandler
>>>> +    IRQ  SWI1_EGU1_IRQHandler
>>>> +    IRQ  SWI2_EGU2_IRQHandler
>>>> +    IRQ  SWI3_EGU3_IRQHandler
>>>> +    IRQ  SWI4_EGU4_IRQHandler
>>>> +    IRQ  SWI5_EGU5_IRQHandler
>>>> +    IRQ  TIMER3_IRQHandler
>>>> +    IRQ  TIMER4_IRQHandler
>>>> +    IRQ  PWM0_IRQHandler
>>>> +    IRQ  PDM_IRQHandler
>>>> +    IRQ  MWU_IRQHandler
>>>> +    IRQ  PWM1_IRQHandler
>>>> +    IRQ  PWM2_IRQHandler
>>>> +    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
>>>> +    IRQ  RTC2_IRQHandler
>>>> +    IRQ  I2S_IRQHandler
>>>> +
>>>> +  .end
>>>> diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
>> nrf52_split.s
>>>> b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
>>>> new file mode 100755
>>>> index 0000000..7426848
>>>> --- /dev/null
>>>> +++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
>> nrf52_split.s
>>>> @@ -0,0 +1,150 @@
>>>> +/*
>>>> +Copyright (c) 2015, Nordic Semiconductor ASA
>>>> +All rights reserved.
>>>> +
>>>> +Redistribution and use in source and binary forms, with or without
>>>> +modification, are permitted provided that the following conditions are
>>>> met:
>>>> +
>>>> +* Redistributions of source code must retain the above copyright
>> notice,
>>>> this
>>>> +  list of conditions and the following disclaimer.
>>>> +
>>>> +* Redistributions in binary form must reproduce the above copyright
>>>> notice,
>>>> +  this list of conditions and the following disclaimer in the
>>>> documentation
>>>> +  and/or other materials provided with the distribution.
>>>> +
>>>> +* Neither the name of Nordic Semiconductor ASA nor the names of its
>>>> +  contributors may be used to endorse or promote products derived from
>>>> +  this software without specific prior written permission.
>>>> +
>>>> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
>>>> IS"
>>>> +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
>> THE
>>>> +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>>>> PURPOSE ARE
>>>> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
>>>> LIABLE
>>>> +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> CONSEQUENTIAL
>>>> +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
>> GOODS OR
>>>> +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
>> HOWEVER
>>>> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
>>>> LIABILITY,
>>>> +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
>> THE
>>>> USE
>>>> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>>>> +*/
>>>> +
>>>> +/*
>>>> +NOTE: Template files (including this one) are application specific and
>>>> therefore
>>>> +expected to be copied into the application project folder prior to its
>>>> use!
>>>> +*/
>>>> +
>>>> +    .syntax unified
>>>> +    .arch armv7-m
>>>> +    .section .stack
>>>> +    .align 3
>>>> +    .equ    Stack_Size, 432
>>>> +    .globl    __StackTop
>>>> +    .globl    __StackLimit
>>>> +__StackLimit:
>>>> +    .space    Stack_Size
>>>> +    .size __StackLimit, . - __StackLimit
>>>> +__StackTop:
>>>> +    .size __StackTop, . - __StackTop
>>>> +
>>>> +    .section .heap
>>>> +    .align 3
>>>> +#ifdef __HEAP_SIZE
>>>> +    .equ    Heap_Size, __HEAP_SIZE
>>>> +#else
>>>> +    .equ    Heap_Size, 0
>>>> +#endif
>>>> +    .globl    __HeapBase
>>>> +    .globl    __HeapLimit
>>>> +__HeapBase:
>>>> +    .if    Heap_Size
>>>> +    .space    Heap_Size
>>>> +    .endif
>>>> +    .size __HeapBase, . - __HeapBase
>>>> +__HeapLimit:
>>>> +    .size __HeapLimit, . - __HeapLimit
>>>> +
>>>> +    .section .isr_vector_split
>>>> +    .align 2
>>>> +    .globl __isr_vector_split
>>>> +__isr_vector_split:
>>>> +    .long    __StackTop            /* Top of Stack */
>>>> +    .long   Reset_Handler_split               /* Reset Handler */
>>>> +
>>>> +    .size    __isr_vector_split, . - __isr_vector_split
>>>> +
>>>> +/* Reset Handler */
>>>> +
>>>> +    .text
>>>> +    .thumb
>>>> +    .thumb_func
>>>> +    .align 1
>>>> +    .globl    Reset_Handler_split
>>>> +    .type    Reset_Handler_split, %function
>>>> +Reset_Handler_split:
>>>> +    .fnstart
>>>> +
>>>> +
>>>> +/*     Loop to copy data from read only memory to RAM. The ranges
>>>> + *      of copy from/to are specified by following symbols evaluated in
>>>> + *      linker script.
>>>> + *      __etext: End of code section, i.e., begin of data sections to
>>>> copy from.
>>>> + *      __data_start__/__data_end__: RAM address range that data
>> should be
>>>> + *      copied to. Both must be aligned to 4 bytes boundary.  */
>>>> +
>>>> +    ldr    r1, =__etext
>>>> +    ldr    r2, =__data_start__
>>>> +    ldr    r3, =__data_end__
>>>> +
>>>> +    subs    r3, r2
>>>> +    ble     .LC0
>>>> +
>>>> +.LC1:
>>>> +    subs    r3, 4
>>>> +    ldr    r0, [r1,r3]
>>>> +    str    r0, [r2,r3]
>>>> +    bgt    .LC1
>>>> +
>>>> +.LC0:
>>>> +    ldr    r1, =__etext_loader
>>>> +    ldr    r2, =__data_start___loader
>>>> +    ldr    r3, =__data_end___loader
>>>> +
>>>> +    subs    r3, r2
>>>> +    ble     .LC2
>>>> +
>>>> +.LC3:
>>>> +    subs    r3, 4
>>>> +    ldr    r0, [r1,r3]
>>>> +    str    r0, [r2,r3]
>>>> +    bgt    .LC3
>>>> +.LC2:
>>>> +
>>>> +    subs    r0, r0
>>>> +    ldr    r2, =__bss_start___loader
>>>> +    ldr    r3, =__bss_end___loader
>>>> +
>>>> +    subs    r3, r2
>>>> +    ble     .LC4
>>>> +
>>>> +.LC5:
>>>> +    subs    r3, 4
>>>> +    str    r0, [r2,r3]
>>>> +    bgt    .LC5
>>>> +.LC4:
>>>> +
>>>> +    LDR     R0, =__HeapBase
>>>> +    LDR     R1, =__HeapLimit
>>>> +    BL      _sbrkInit
>>>> +
>>>> +    LDR     R0, =SystemInit
>>>> +    BLX     R0
>>>> +    LDR     R0, =_start
>>>> +    BX      R0
>>>> +
>>>> +    .pool
>>>> +    .cantunwind
>>>> +    .fnend
>>>> +    .size   Reset_Handler_split,.-Reset_Handler_split
>>>> +
>>>> +    .section ".text"
>>>> +  .end
>>>> diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
>>>> b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
>>>> deleted file mode 100755
>>>> index fb804fd..0000000
>>>> --- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
>>>> +++ /dev/null
>>>> @@ -1,289 +0,0 @@
>>>> -/*
>>>> -Copyright (c) 2015, Nordic Semiconductor ASA
>>>> -All rights reserved.
>>>> -
>>>> -Redistribution and use in source and binary forms, with or without
>>>> -modification, are permitted provided that the following conditions are
>>>> met:
>>>> -
>>>> -* Redistributions of source code must retain the above copyright
>> notice,
>>>> this
>>>> -  list of conditions and the following disclaimer.
>>>> -
>>>> -* Redistributions in binary form must reproduce the above copyright
>>>> notice,
>>>> -  this list of conditions and the following disclaimer in the
>>>> documentation
>>>> -  and/or other materials provided with the distribution.
>>>> -
>>>> -* Neither the name of Nordic Semiconductor ASA nor the names of its
>>>> -  contributors may be used to endorse or promote products derived from
>>>> -  this software without specific prior written permission.
>>>> -
>>>> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
>>>> IS"
>>>> -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
>> THE
>>>> -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>>>> PURPOSE ARE
>>>> -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
>>>> LIABLE
>>>> -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> CONSEQUENTIAL
>>>> -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
>> GOODS OR
>>>> -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
>> HOWEVER
>>>> -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
>>>> LIABILITY,
>>>> -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
>> THE
>>>> USE
>>>> -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>>>> -*/
>>>> -
>>>> -/*
>>>> -NOTE: Template files (including this one) are application specific and
>>>> therefore
>>>> -expected to be copied into the application project folder prior to its
>>>> use!
>>>> -*/
>>>> -
>>>> -    .syntax unified
>>>> -    .arch armv7-m
>>>> -
>>>> -    .section .stack
>>>> -    .align 3
>>>> -    .equ    Stack_Size, 432
>>>> -    .globl    __StackTop
>>>> -    .globl    __StackLimit
>>>> -__StackLimit:
>>>> -    .space    Stack_Size
>>>> -    .size __StackLimit, . - __StackLimit
>>>> -__StackTop:
>>>> -    .size __StackTop, . - __StackTop
>>>> -
>>>> -    .section .heap
>>>> -    .align 3
>>>> -#ifdef __HEAP_SIZE
>>>> -    .equ    Heap_Size, __HEAP_SIZE
>>>> -#else
>>>> -    .equ    Heap_Size, 0
>>>> -#endif
>>>> -    .globl    __HeapBase
>>>> -    .globl    __HeapLimit
>>>> -__HeapBase:
>>>> -    .if    Heap_Size
>>>> -    .space    Heap_Size
>>>> -    .endif
>>>> -    .size __HeapBase, . - __HeapBase
>>>> -__HeapLimit:
>>>> -    .size __HeapLimit, . - __HeapLimit
>>>> -
>>>> -    .section .isr_vector
>>>> -    .align 2
>>>> -    .globl __isr_vector
>>>> -__isr_vector:
>>>> -    .long    __StackTop            /* Top of Stack */
>>>> -    .long   Reset_Handler               /* Reset Handler */
>>>> -    .long   NMI_Handler                 /* NMI Handler */
>>>> -    .long   HardFault_Handler           /* Hard Fault Handler */
>>>> -    .long   0                           /* Reserved */
>>>> -    .long   0                           /* Reserved */
>>>> -    .long   0                           /* Reserved */
>>>> -    .long   0                           /* Reserved */
>>>> -    .long   0                           /* Reserved */
>>>> -    .long   0                           /* Reserved */
>>>> -    .long   0                           /* Reserved */
>>>> -    .long   SVC_Handler                 /* SVCall Handler */
>>>> -    .long   0                           /* Reserved */
>>>> -    .long   0                           /* Reserved */
>>>> -    .long   PendSV_Handler              /* PendSV Handler */
>>>> -    .long   SysTick_Handler             /* SysTick Handler */
>>>> -
>>>> -  /* External Interrupts */
>>>> -    .long   POWER_CLOCK_IRQHandler
>>>> -    .long   RADIO_IRQHandler
>>>> -    .long   UARTE0_UART0_IRQHandler
>>>> -    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
>>>> -    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
>>>> -    .long   NFCT_IRQHandler
>>>> -    .long   GPIOTE_IRQHandler
>>>> -    .long   SAADC_IRQHandler
>>>> -    .long   TIMER0_IRQHandler
>>>> -    .long   TIMER1_IRQHandler
>>>> -    .long   TIMER2_IRQHandler
>>>> -    .long   RTC0_IRQHandler
>>>> -    .long   TEMP_IRQHandler
>>>> -    .long   RNG_IRQHandler
>>>> -    .long   ECB_IRQHandler
>>>> -    .long   CCM_AAR_IRQHandler
>>>> -    .long   WDT_IRQHandler
>>>> -    .long   RTC1_IRQHandler
>>>> -    .long   QDEC_IRQHandler
>>>> -    .long   COMP_LPCOMP_IRQHandler
>>>> -    .long   SWI0_EGU0_IRQHandler
>>>> -    .long   SWI1_EGU1_IRQHandler
>>>> -    .long   SWI2_EGU2_IRQHandler
>>>> -    .long   SWI3_EGU3_IRQHandler
>>>> -    .long   SWI4_EGU4_IRQHandler
>>>> -    .long   SWI5_EGU5_IRQHandler
>>>> -    .long   TIMER3_IRQHandler
>>>> -    .long   TIMER4_IRQHandler
>>>> -    .long   PWM0_IRQHandler
>>>> -    .long   PDM_IRQHandler
>>>> -    .long   0                         /*Reserved */
>>>> -    .long   0                         /*Reserved */
>>>> -    .long   MWU_IRQHandler
>>>> -    .long   PWM1_IRQHandler
>>>> -    .long   PWM2_IRQHandler
>>>> -    .long   SPIM2_SPIS2_SPI2_IRQHandler
>>>> -    .long   RTC2_IRQHandler
>>>> -    .long   I2S_IRQHandler
>>>> -
>>>> -    .size    __isr_vector, . - __isr_vector
>>>> -
>>>> -/* Reset Handler */
>>>> -
>>>> -    .text
>>>> -    .thumb
>>>> -    .thumb_func
>>>> -    .align 1
>>>> -    .globl    Reset_Handler
>>>> -    .type    Reset_Handler, %function
>>>> -Reset_Handler:
>>>> -    .fnstart
>>>> -
>>>> -/*     Loop to copy data from read only memory to RAM. The ranges
>>>> - *      of copy from/to are specified by following symbols evaluated in
>>>> - *      linker script.
>>>> - *      __etext: End of code section, i.e., begin of data sections to
>>>> copy from.
>>>> - *      __data_start__/__data_end__: RAM address range that data
>> should be
>>>> - *      copied to. Both must be aligned to 4 bytes boundary.  */
>>>> -
>>>> -    ldr    r1, =__etext
>>>> -    ldr    r2, =__data_start__
>>>> -    ldr    r3, =__data_end__
>>>> -
>>>> -    subs    r3, r2
>>>> -    ble     .LC0
>>>> -
>>>> -.LC1:
>>>> -    subs    r3, 4
>>>> -    ldr    r0, [r1,r3]
>>>> -    str    r0, [r2,r3]
>>>> -    bgt    .LC1
>>>> -
>>>> -.LC0:
>>>> -
>>>> -    LDR     R0, =__HeapBase
>>>> -    LDR     R1, =__HeapLimit
>>>> -    BL      _sbrkInit
>>>> -
>>>> -    LDR     R0, =SystemInit
>>>> -    BLX     R0
>>>> -
>>>> -    LDR     R0, =_start
>>>> -    BX      R0
>>>> -
>>>> -    .pool
>>>> -    .cantunwind
>>>> -    .fnend
>>>> -    .size   Reset_Handler,.-Reset_Handler
>>>> -
>>>> -    .section ".text"
>>>> -
>>>> -
>>>> -/* Dummy Exception Handlers (infinite loops which can be modified) */
>>>> -
>>>> -    .weak   NMI_Handler
>>>> -    .type   NMI_Handler, %function
>>>> -NMI_Handler:
>>>> -    B       .
>>>> -    .size   NMI_Handler, . - NMI_Handler
>>>> -
>>>> -
>>>> -    .weak   HardFault_Handler
>>>> -    .type   HardFault_Handler, %function
>>>> -HardFault_Handler:
>>>> -    B       .
>>>> -    .size   HardFault_Handler, . - HardFault_Handler
>>>> -
>>>> -
>>>> -    .weak   MemoryManagement_Handler
>>>> -    .type   MemoryManagement_Handler, %function
>>>> -MemoryManagement_Handler:
>>>> -    B       .
>>>> -    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
>>>> -
>>>> -
>>>> -    .weak   BusFault_Handler
>>>> -    .type   BusFault_Handler, %function
>>>> -BusFault_Handler:
>>>> -    B       .
>>>> -    .size   BusFault_Handler, . - BusFault_Handler
>>>> -
>>>> -
>>>> -    .weak   UsageFault_Handler
>>>> -    .type   UsageFault_Handler, %function
>>>> -UsageFault_Handler:
>>>> -    B       .
>>>> -    .size   UsageFault_Handler, . - UsageFault_Handler
>>>> -
>>>> -
>>>> -    .weak   SVC_Handler
>>>> -    .type   SVC_Handler, %function
>>>> -SVC_Handler:
>>>> -    B       .
>>>> -    .size   SVC_Handler, . - SVC_Handler
>>>> -
>>>> -
>>>> -    .weak   PendSV_Handler
>>>> -    .type   PendSV_Handler, %function
>>>> -PendSV_Handler:
>>>> -    B       .
>>>> -    .size   PendSV_Handler, . - PendSV_Handler
>>>> -
>>>> -
>>>> -    .weak   SysTick_Handler
>>>> -    .type   SysTick_Handler, %function
>>>> -SysTick_Handler:
>>>> -    B       .
>>>> -    .size   SysTick_Handler, . - SysTick_Handler
>>>> -
>>>> -
>>>> -/* IRQ Handlers */
>>>> -
>>>> -    .globl  Default_Handler
>>>> -    .type   Default_Handler, %function
>>>> -Default_Handler:
>>>> -    B       .
>>>> -    .size   Default_Handler, . - Default_Handler
>>>> -
>>>> -    .macro  IRQ handler
>>>> -    .weak   \handler
>>>> -    .set    \handler, Default_Handler
>>>> -    .endm
>>>> -
>>>> -    IRQ  POWER_CLOCK_IRQHandler
>>>> -    IRQ  RADIO_IRQHandler
>>>> -    IRQ  UARTE0_UART0_IRQHandler
>>>> -    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
>>>> -    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
>>>> -    IRQ  NFCT_IRQHandler
>>>> -    IRQ  GPIOTE_IRQHandler
>>>> -    IRQ  SAADC_IRQHandler
>>>> -    IRQ  TIMER0_IRQHandler
>>>> -    IRQ  TIMER1_IRQHandler
>>>> -    IRQ  TIMER2_IRQHandler
>>>> -    IRQ  RTC0_IRQHandler
>>>> -    IRQ  TEMP_IRQHandler
>>>> -    IRQ  RNG_IRQHandler
>>>> -    IRQ  ECB_IRQHandler
>>>> -    IRQ  CCM_AAR_IRQHandler
>>>> -    IRQ  WDT_IRQHandler
>>>> -    IRQ  RTC1_IRQHandler
>>>> -    IRQ  QDEC_IRQHandler
>>>> -    IRQ  COMP_LPCOMP_IRQHandler
>>>> -    IRQ  SWI0_EGU0_IRQHandler
>>>> -    IRQ  SWI1_EGU1_IRQHandler
>>>> -    IRQ  SWI2_EGU2_IRQHandler
>>>> -    IRQ  SWI3_EGU3_IRQHandler
>>>> -    IRQ  SWI4_EGU4_IRQHandler
>>>> -    IRQ  SWI5_EGU5_IRQHandler
>>>> -    IRQ  TIMER3_IRQHandler
>>>> -    IRQ  TIMER4_IRQHandler
>>>> -    IRQ  PWM0_IRQHandler
>>>> -    IRQ  PDM_IRQHandler
>>>> -    IRQ  MWU_IRQHandler
>>>> -    IRQ  PWM1_IRQHandler
>>>> -    IRQ  PWM2_IRQHandler
>>>> -    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
>>>> -    IRQ  RTC2_IRQHandler
>>>> -    IRQ  I2S_IRQHandler
>>>> -
>>>> -  .end
>>>> diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
>>>> b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
>>>> deleted file mode 100755
>>>> index 7426848..0000000
>>>> --- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
>>>> +++ /dev/null
>>>> @@ -1,150 +0,0 @@
>>>> -/*
>>>> -Copyright (c) 2015, Nordic Semiconductor ASA
>>>> -All rights reserved.
>>>> -
>>>> -Redistribution and use in source and binary forms, with or without
>>>> -modification, are permitted provided that the following conditions are
>>>> met:
>>>> -
>>>> -* Redistributions of source code must retain the above copyright
>> notice,
>>>> this
>>>> -  list of conditions and the following disclaimer.
>>>> -
>>>> -* Redistributions in binary form must reproduce the above copyright
>>>> notice,
>>>> -  this list of conditions and the following disclaimer in the
>>>> documentation
>>>> -  and/or other materials provided with the distribution.
>>>> -
>>>> -* Neither the name of Nordic Semiconductor ASA nor the names of its
>>>> -  contributors may be used to endorse or promote products derived from
>>>> -  this software without specific prior written permission.
>>>> -
>>>> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
>>>> IS"
>>>> -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
>> THE
>>>> -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>>>> PURPOSE ARE
>>>> -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
>>>> LIABLE
>>>> -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> CONSEQUENTIAL
>>>> -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
>> GOODS OR
>>>> -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
>> HOWEVER
>>>> -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
>>>> LIABILITY,
>>>> -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
>> THE
>>>> USE
>>>> -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>>>> -*/
>>>> -
>>>> -/*
>>>> -NOTE: Template files (including this one) are application specific and
>>>> therefore
>>>> -expected to be copied into the application project folder prior to its
>>>> use!
>>>> -*/
>>>> -
>>>> -    .syntax unified
>>>> -    .arch armv7-m
>>>> -    .section .stack
>>>> -    .align 3
>>>> -    .equ    Stack_Size, 432
>>>> -    .globl    __StackTop
>>>> -    .globl    __StackLimit
>>>> -__StackLimit:
>>>> -    .space    Stack_Size
>>>> -    .size __StackLimit, . - __StackLimit
>>>> -__StackTop:
>>>> -    .size __StackTop, . - __StackTop
>>>> -
>>>> -    .section .heap
>>>> -    .align 3
>>>> -#ifdef __HEAP_SIZE
>>>> -    .equ    Heap_Size, __HEAP_SIZE
>>>> -#else
>>>> -    .equ    Heap_Size, 0
>>>> -#endif
>>>> -    .globl    __HeapBase
>>>> -    .globl    __HeapLimit
>>>> -__HeapBase:
>>>> -    .if    Heap_Size
>>>> -    .space    Heap_Size
>>>> -    .endif
>>>> -    .size __HeapBase, . - __HeapBase
>>>> -__HeapLimit:
>>>> -    .size __HeapLimit, . - __HeapLimit
>>>> -
>>>> -    .section .isr_vector_split
>>>> -    .align 2
>>>> -    .globl __isr_vector_split
>>>> -__isr_vector_split:
>>>> -    .long    __StackTop            /* Top of Stack */
>>>> -    .long   Reset_Handler_split               /* Reset Handler */
>>>> -
>>>> -    .size    __isr_vector_split, . - __isr_vector_split
>>>> -
>>>> -/* Reset Handler */
>>>> -
>>>> -    .text
>>>> -    .thumb
>>>> -    .thumb_func
>>>> -    .align 1
>>>> -    .globl    Reset_Handler_split
>>>> -    .type    Reset_Handler_split, %function
>>>> -Reset_Handler_split:
>>>> -    .fnstart
>>>> -
>>>> -
>>>> -/*     Loop to copy data from read only memory to RAM. The ranges
>>>> - *      of copy from/to are specified by following symbols evaluated in
>>>> - *      linker script.
>>>> - *      __etext: End of code section, i.e., begin of data sections to
>>>> copy from.
>>>> - *      __data_start__/__data_end__: RAM address range that data
>> should be
>>>> - *      copied to. Both must be aligned to 4 bytes boundary.  */
>>>> -
>>>> -    ldr    r1, =__etext
>>>> -    ldr    r2, =__data_start__
>>>> -    ldr    r3, =__data_end__
>>>> -
>>>> -    subs    r3, r2
>>>> -    ble     .LC0
>>>> -
>>>> -.LC1:
>>>> -    subs    r3, 4
>>>> -    ldr    r0, [r1,r3]
>>>> -    str    r0, [r2,r3]
>>>> -    bgt    .LC1
>>>> -
>>>> -.LC0:
>>>> -    ldr    r1, =__etext_loader
>>>> -    ldr    r2, =__data_start___loader
>>>> -    ldr    r3, =__data_end___loader
>>>> -
>>>> -    subs    r3, r2
>>>> -    ble     .LC2
>>>> -
>>>> -.LC3:
>>>> -    subs    r3, 4
>>>> -    ldr    r0, [r1,r3]
>>>> -    str    r0, [r2,r3]
>>>> -    bgt    .LC3
>>>> -.LC2:
>>>> -
>>>> -    subs    r0, r0
>>>> -    ldr    r2, =__bss_start___loader
>>>> -    ldr    r3, =__bss_end___loader
>>>> -
>>>> -    subs    r3, r2
>>>> -    ble     .LC4
>>>> -
>>>> -.LC5:
>>>> -    subs    r3, 4
>>>> -    str    r0, [r2,r3]
>>>> -    bgt    .LC5
>>>> -.LC4:
>>>> -
>>>> -    LDR     R0, =__HeapBase
>>>> -    LDR     R1, =__HeapLimit
>>>> -    BL      _sbrkInit
>>>> -
>>>> -    LDR     R0, =SystemInit
>>>> -    BLX     R0
>>>> -    LDR     R0, =_start
>>>> -    BX      R0
>>>> -
>>>> -    .pool
>>>> -    .cantunwind
>>>> -    .fnend
>>>> -    .size   Reset_Handler_split,.-Reset_Handler_split
>>>> -
>>>> -    .section ".text"
>>>> -  .end
>>>> --
>>>> 2.7.4
>>>> 
>>>> 
>> 
>> 


Re: [PATCH] mcu/nordic/nrf52xxx: Fix for nrf52dk startup crash

Posted by Łukasz Rymanowski <lu...@codecoup.pl>.
Hi Will,

The issue is not visible during build time but on a platform startup.

I believe that Michal's patch solves this issue so let's apply this patch
using git am or accept pull request he has prepared.

Best regards,
Lukasz

On Nov 7, 2016 4:12 PM, "will sanfilippo" <wi...@runtime.io> wrote:

> Hey all:
>
> Sorry about this. I think my build found the startup file somewhere but
> what is in develop doesnt. We will address this today.
>
> Thanks, and sorry.
>
> Will
>
> > On Nov 7, 2016, at 6:13 AM, Michał Narajowski <
> michal.narajowski@codecoup.pl> wrote:
> >
> > Also sent a pull request.
> >
> > 2016-11-07 14:15 GMT+01:00 Michał Narajowski <
> michal.narajowski@codecoup.pl>
> > :
> >
> >> With this patch it is possible to start nrf52dk board.
> >> Regression observed after patch:
> >> 290c683 MYNEWT-475: BSP Cleanup
> >> ---
> >> .../src/arch/cortex_m4/gcc_startup_nrf52.s         | 289
> >> +++++++++++++++++++++
> >> .../src/arch/cortex_m4/gcc_startup_nrf52_split.s   | 150 +++++++++++
> >> hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s     | 289
> >> ---------------------
> >> .../nordic/nrf52xxx/src/gcc_startup_nrf52_split.s  | 150 -----------
> >> 4 files changed, 439 insertions(+), 439 deletions(-)
> >> create mode 100755 hw/mcu/nordic/nrf52xxx/src/
> arch/cortex_m4/gcc_startup_
> >> nrf52.s
> >> create mode 100755 hw/mcu/nordic/nrf52xxx/src/
> arch/cortex_m4/gcc_startup_
> >> nrf52_split.s
> >> delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
> >> delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
> >>
> >> diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
> nrf52.s
> >> b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
> >> new file mode 100755
> >> index 0000000..fb804fd
> >> --- /dev/null
> >> +++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
> >> @@ -0,0 +1,289 @@
> >> +/*
> >> +Copyright (c) 2015, Nordic Semiconductor ASA
> >> +All rights reserved.
> >> +
> >> +Redistribution and use in source and binary forms, with or without
> >> +modification, are permitted provided that the following conditions are
> >> met:
> >> +
> >> +* Redistributions of source code must retain the above copyright
> notice,
> >> this
> >> +  list of conditions and the following disclaimer.
> >> +
> >> +* Redistributions in binary form must reproduce the above copyright
> >> notice,
> >> +  this list of conditions and the following disclaimer in the
> >> documentation
> >> +  and/or other materials provided with the distribution.
> >> +
> >> +* Neither the name of Nordic Semiconductor ASA nor the names of its
> >> +  contributors may be used to endorse or promote products derived from
> >> +  this software without specific prior written permission.
> >> +
> >> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
> >> IS"
> >> +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE
> >> +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> >> PURPOSE ARE
> >> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> >> LIABLE
> >> +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL
> >> +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
> GOODS OR
> >> +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> HOWEVER
> >> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> >> LIABILITY,
> >> +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
> THE
> >> USE
> >> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> >> +*/
> >> +
> >> +/*
> >> +NOTE: Template files (including this one) are application specific and
> >> therefore
> >> +expected to be copied into the application project folder prior to its
> >> use!
> >> +*/
> >> +
> >> +    .syntax unified
> >> +    .arch armv7-m
> >> +
> >> +    .section .stack
> >> +    .align 3
> >> +    .equ    Stack_Size, 432
> >> +    .globl    __StackTop
> >> +    .globl    __StackLimit
> >> +__StackLimit:
> >> +    .space    Stack_Size
> >> +    .size __StackLimit, . - __StackLimit
> >> +__StackTop:
> >> +    .size __StackTop, . - __StackTop
> >> +
> >> +    .section .heap
> >> +    .align 3
> >> +#ifdef __HEAP_SIZE
> >> +    .equ    Heap_Size, __HEAP_SIZE
> >> +#else
> >> +    .equ    Heap_Size, 0
> >> +#endif
> >> +    .globl    __HeapBase
> >> +    .globl    __HeapLimit
> >> +__HeapBase:
> >> +    .if    Heap_Size
> >> +    .space    Heap_Size
> >> +    .endif
> >> +    .size __HeapBase, . - __HeapBase
> >> +__HeapLimit:
> >> +    .size __HeapLimit, . - __HeapLimit
> >> +
> >> +    .section .isr_vector
> >> +    .align 2
> >> +    .globl __isr_vector
> >> +__isr_vector:
> >> +    .long    __StackTop            /* Top of Stack */
> >> +    .long   Reset_Handler               /* Reset Handler */
> >> +    .long   NMI_Handler                 /* NMI Handler */
> >> +    .long   HardFault_Handler           /* Hard Fault Handler */
> >> +    .long   0                           /* Reserved */
> >> +    .long   0                           /* Reserved */
> >> +    .long   0                           /* Reserved */
> >> +    .long   0                           /* Reserved */
> >> +    .long   0                           /* Reserved */
> >> +    .long   0                           /* Reserved */
> >> +    .long   0                           /* Reserved */
> >> +    .long   SVC_Handler                 /* SVCall Handler */
> >> +    .long   0                           /* Reserved */
> >> +    .long   0                           /* Reserved */
> >> +    .long   PendSV_Handler              /* PendSV Handler */
> >> +    .long   SysTick_Handler             /* SysTick Handler */
> >> +
> >> +  /* External Interrupts */
> >> +    .long   POWER_CLOCK_IRQHandler
> >> +    .long   RADIO_IRQHandler
> >> +    .long   UARTE0_UART0_IRQHandler
> >> +    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
> >> +    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
> >> +    .long   NFCT_IRQHandler
> >> +    .long   GPIOTE_IRQHandler
> >> +    .long   SAADC_IRQHandler
> >> +    .long   TIMER0_IRQHandler
> >> +    .long   TIMER1_IRQHandler
> >> +    .long   TIMER2_IRQHandler
> >> +    .long   RTC0_IRQHandler
> >> +    .long   TEMP_IRQHandler
> >> +    .long   RNG_IRQHandler
> >> +    .long   ECB_IRQHandler
> >> +    .long   CCM_AAR_IRQHandler
> >> +    .long   WDT_IRQHandler
> >> +    .long   RTC1_IRQHandler
> >> +    .long   QDEC_IRQHandler
> >> +    .long   COMP_LPCOMP_IRQHandler
> >> +    .long   SWI0_EGU0_IRQHandler
> >> +    .long   SWI1_EGU1_IRQHandler
> >> +    .long   SWI2_EGU2_IRQHandler
> >> +    .long   SWI3_EGU3_IRQHandler
> >> +    .long   SWI4_EGU4_IRQHandler
> >> +    .long   SWI5_EGU5_IRQHandler
> >> +    .long   TIMER3_IRQHandler
> >> +    .long   TIMER4_IRQHandler
> >> +    .long   PWM0_IRQHandler
> >> +    .long   PDM_IRQHandler
> >> +    .long   0                         /*Reserved */
> >> +    .long   0                         /*Reserved */
> >> +    .long   MWU_IRQHandler
> >> +    .long   PWM1_IRQHandler
> >> +    .long   PWM2_IRQHandler
> >> +    .long   SPIM2_SPIS2_SPI2_IRQHandler
> >> +    .long   RTC2_IRQHandler
> >> +    .long   I2S_IRQHandler
> >> +
> >> +    .size    __isr_vector, . - __isr_vector
> >> +
> >> +/* Reset Handler */
> >> +
> >> +    .text
> >> +    .thumb
> >> +    .thumb_func
> >> +    .align 1
> >> +    .globl    Reset_Handler
> >> +    .type    Reset_Handler, %function
> >> +Reset_Handler:
> >> +    .fnstart
> >> +
> >> +/*     Loop to copy data from read only memory to RAM. The ranges
> >> + *      of copy from/to are specified by following symbols evaluated in
> >> + *      linker script.
> >> + *      __etext: End of code section, i.e., begin of data sections to
> >> copy from.
> >> + *      __data_start__/__data_end__: RAM address range that data
> should be
> >> + *      copied to. Both must be aligned to 4 bytes boundary.  */
> >> +
> >> +    ldr    r1, =__etext
> >> +    ldr    r2, =__data_start__
> >> +    ldr    r3, =__data_end__
> >> +
> >> +    subs    r3, r2
> >> +    ble     .LC0
> >> +
> >> +.LC1:
> >> +    subs    r3, 4
> >> +    ldr    r0, [r1,r3]
> >> +    str    r0, [r2,r3]
> >> +    bgt    .LC1
> >> +
> >> +.LC0:
> >> +
> >> +    LDR     R0, =__HeapBase
> >> +    LDR     R1, =__HeapLimit
> >> +    BL      _sbrkInit
> >> +
> >> +    LDR     R0, =SystemInit
> >> +    BLX     R0
> >> +
> >> +    LDR     R0, =_start
> >> +    BX      R0
> >> +
> >> +    .pool
> >> +    .cantunwind
> >> +    .fnend
> >> +    .size   Reset_Handler,.-Reset_Handler
> >> +
> >> +    .section ".text"
> >> +
> >> +
> >> +/* Dummy Exception Handlers (infinite loops which can be modified) */
> >> +
> >> +    .weak   NMI_Handler
> >> +    .type   NMI_Handler, %function
> >> +NMI_Handler:
> >> +    B       .
> >> +    .size   NMI_Handler, . - NMI_Handler
> >> +
> >> +
> >> +    .weak   HardFault_Handler
> >> +    .type   HardFault_Handler, %function
> >> +HardFault_Handler:
> >> +    B       .
> >> +    .size   HardFault_Handler, . - HardFault_Handler
> >> +
> >> +
> >> +    .weak   MemoryManagement_Handler
> >> +    .type   MemoryManagement_Handler, %function
> >> +MemoryManagement_Handler:
> >> +    B       .
> >> +    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
> >> +
> >> +
> >> +    .weak   BusFault_Handler
> >> +    .type   BusFault_Handler, %function
> >> +BusFault_Handler:
> >> +    B       .
> >> +    .size   BusFault_Handler, . - BusFault_Handler
> >> +
> >> +
> >> +    .weak   UsageFault_Handler
> >> +    .type   UsageFault_Handler, %function
> >> +UsageFault_Handler:
> >> +    B       .
> >> +    .size   UsageFault_Handler, . - UsageFault_Handler
> >> +
> >> +
> >> +    .weak   SVC_Handler
> >> +    .type   SVC_Handler, %function
> >> +SVC_Handler:
> >> +    B       .
> >> +    .size   SVC_Handler, . - SVC_Handler
> >> +
> >> +
> >> +    .weak   PendSV_Handler
> >> +    .type   PendSV_Handler, %function
> >> +PendSV_Handler:
> >> +    B       .
> >> +    .size   PendSV_Handler, . - PendSV_Handler
> >> +
> >> +
> >> +    .weak   SysTick_Handler
> >> +    .type   SysTick_Handler, %function
> >> +SysTick_Handler:
> >> +    B       .
> >> +    .size   SysTick_Handler, . - SysTick_Handler
> >> +
> >> +
> >> +/* IRQ Handlers */
> >> +
> >> +    .globl  Default_Handler
> >> +    .type   Default_Handler, %function
> >> +Default_Handler:
> >> +    B       .
> >> +    .size   Default_Handler, . - Default_Handler
> >> +
> >> +    .macro  IRQ handler
> >> +    .weak   \handler
> >> +    .set    \handler, Default_Handler
> >> +    .endm
> >> +
> >> +    IRQ  POWER_CLOCK_IRQHandler
> >> +    IRQ  RADIO_IRQHandler
> >> +    IRQ  UARTE0_UART0_IRQHandler
> >> +    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
> >> +    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
> >> +    IRQ  NFCT_IRQHandler
> >> +    IRQ  GPIOTE_IRQHandler
> >> +    IRQ  SAADC_IRQHandler
> >> +    IRQ  TIMER0_IRQHandler
> >> +    IRQ  TIMER1_IRQHandler
> >> +    IRQ  TIMER2_IRQHandler
> >> +    IRQ  RTC0_IRQHandler
> >> +    IRQ  TEMP_IRQHandler
> >> +    IRQ  RNG_IRQHandler
> >> +    IRQ  ECB_IRQHandler
> >> +    IRQ  CCM_AAR_IRQHandler
> >> +    IRQ  WDT_IRQHandler
> >> +    IRQ  RTC1_IRQHandler
> >> +    IRQ  QDEC_IRQHandler
> >> +    IRQ  COMP_LPCOMP_IRQHandler
> >> +    IRQ  SWI0_EGU0_IRQHandler
> >> +    IRQ  SWI1_EGU1_IRQHandler
> >> +    IRQ  SWI2_EGU2_IRQHandler
> >> +    IRQ  SWI3_EGU3_IRQHandler
> >> +    IRQ  SWI4_EGU4_IRQHandler
> >> +    IRQ  SWI5_EGU5_IRQHandler
> >> +    IRQ  TIMER3_IRQHandler
> >> +    IRQ  TIMER4_IRQHandler
> >> +    IRQ  PWM0_IRQHandler
> >> +    IRQ  PDM_IRQHandler
> >> +    IRQ  MWU_IRQHandler
> >> +    IRQ  PWM1_IRQHandler
> >> +    IRQ  PWM2_IRQHandler
> >> +    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
> >> +    IRQ  RTC2_IRQHandler
> >> +    IRQ  I2S_IRQHandler
> >> +
> >> +  .end
> >> diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
> nrf52_split.s
> >> b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
> >> new file mode 100755
> >> index 0000000..7426848
> >> --- /dev/null
> >> +++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
> nrf52_split.s
> >> @@ -0,0 +1,150 @@
> >> +/*
> >> +Copyright (c) 2015, Nordic Semiconductor ASA
> >> +All rights reserved.
> >> +
> >> +Redistribution and use in source and binary forms, with or without
> >> +modification, are permitted provided that the following conditions are
> >> met:
> >> +
> >> +* Redistributions of source code must retain the above copyright
> notice,
> >> this
> >> +  list of conditions and the following disclaimer.
> >> +
> >> +* Redistributions in binary form must reproduce the above copyright
> >> notice,
> >> +  this list of conditions and the following disclaimer in the
> >> documentation
> >> +  and/or other materials provided with the distribution.
> >> +
> >> +* Neither the name of Nordic Semiconductor ASA nor the names of its
> >> +  contributors may be used to endorse or promote products derived from
> >> +  this software without specific prior written permission.
> >> +
> >> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
> >> IS"
> >> +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE
> >> +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> >> PURPOSE ARE
> >> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> >> LIABLE
> >> +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL
> >> +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
> GOODS OR
> >> +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> HOWEVER
> >> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> >> LIABILITY,
> >> +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
> THE
> >> USE
> >> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> >> +*/
> >> +
> >> +/*
> >> +NOTE: Template files (including this one) are application specific and
> >> therefore
> >> +expected to be copied into the application project folder prior to its
> >> use!
> >> +*/
> >> +
> >> +    .syntax unified
> >> +    .arch armv7-m
> >> +    .section .stack
> >> +    .align 3
> >> +    .equ    Stack_Size, 432
> >> +    .globl    __StackTop
> >> +    .globl    __StackLimit
> >> +__StackLimit:
> >> +    .space    Stack_Size
> >> +    .size __StackLimit, . - __StackLimit
> >> +__StackTop:
> >> +    .size __StackTop, . - __StackTop
> >> +
> >> +    .section .heap
> >> +    .align 3
> >> +#ifdef __HEAP_SIZE
> >> +    .equ    Heap_Size, __HEAP_SIZE
> >> +#else
> >> +    .equ    Heap_Size, 0
> >> +#endif
> >> +    .globl    __HeapBase
> >> +    .globl    __HeapLimit
> >> +__HeapBase:
> >> +    .if    Heap_Size
> >> +    .space    Heap_Size
> >> +    .endif
> >> +    .size __HeapBase, . - __HeapBase
> >> +__HeapLimit:
> >> +    .size __HeapLimit, . - __HeapLimit
> >> +
> >> +    .section .isr_vector_split
> >> +    .align 2
> >> +    .globl __isr_vector_split
> >> +__isr_vector_split:
> >> +    .long    __StackTop            /* Top of Stack */
> >> +    .long   Reset_Handler_split               /* Reset Handler */
> >> +
> >> +    .size    __isr_vector_split, . - __isr_vector_split
> >> +
> >> +/* Reset Handler */
> >> +
> >> +    .text
> >> +    .thumb
> >> +    .thumb_func
> >> +    .align 1
> >> +    .globl    Reset_Handler_split
> >> +    .type    Reset_Handler_split, %function
> >> +Reset_Handler_split:
> >> +    .fnstart
> >> +
> >> +
> >> +/*     Loop to copy data from read only memory to RAM. The ranges
> >> + *      of copy from/to are specified by following symbols evaluated in
> >> + *      linker script.
> >> + *      __etext: End of code section, i.e., begin of data sections to
> >> copy from.
> >> + *      __data_start__/__data_end__: RAM address range that data
> should be
> >> + *      copied to. Both must be aligned to 4 bytes boundary.  */
> >> +
> >> +    ldr    r1, =__etext
> >> +    ldr    r2, =__data_start__
> >> +    ldr    r3, =__data_end__
> >> +
> >> +    subs    r3, r2
> >> +    ble     .LC0
> >> +
> >> +.LC1:
> >> +    subs    r3, 4
> >> +    ldr    r0, [r1,r3]
> >> +    str    r0, [r2,r3]
> >> +    bgt    .LC1
> >> +
> >> +.LC0:
> >> +    ldr    r1, =__etext_loader
> >> +    ldr    r2, =__data_start___loader
> >> +    ldr    r3, =__data_end___loader
> >> +
> >> +    subs    r3, r2
> >> +    ble     .LC2
> >> +
> >> +.LC3:
> >> +    subs    r3, 4
> >> +    ldr    r0, [r1,r3]
> >> +    str    r0, [r2,r3]
> >> +    bgt    .LC3
> >> +.LC2:
> >> +
> >> +    subs    r0, r0
> >> +    ldr    r2, =__bss_start___loader
> >> +    ldr    r3, =__bss_end___loader
> >> +
> >> +    subs    r3, r2
> >> +    ble     .LC4
> >> +
> >> +.LC5:
> >> +    subs    r3, 4
> >> +    str    r0, [r2,r3]
> >> +    bgt    .LC5
> >> +.LC4:
> >> +
> >> +    LDR     R0, =__HeapBase
> >> +    LDR     R1, =__HeapLimit
> >> +    BL      _sbrkInit
> >> +
> >> +    LDR     R0, =SystemInit
> >> +    BLX     R0
> >> +    LDR     R0, =_start
> >> +    BX      R0
> >> +
> >> +    .pool
> >> +    .cantunwind
> >> +    .fnend
> >> +    .size   Reset_Handler_split,.-Reset_Handler_split
> >> +
> >> +    .section ".text"
> >> +  .end
> >> diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
> >> b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
> >> deleted file mode 100755
> >> index fb804fd..0000000
> >> --- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
> >> +++ /dev/null
> >> @@ -1,289 +0,0 @@
> >> -/*
> >> -Copyright (c) 2015, Nordic Semiconductor ASA
> >> -All rights reserved.
> >> -
> >> -Redistribution and use in source and binary forms, with or without
> >> -modification, are permitted provided that the following conditions are
> >> met:
> >> -
> >> -* Redistributions of source code must retain the above copyright
> notice,
> >> this
> >> -  list of conditions and the following disclaimer.
> >> -
> >> -* Redistributions in binary form must reproduce the above copyright
> >> notice,
> >> -  this list of conditions and the following disclaimer in the
> >> documentation
> >> -  and/or other materials provided with the distribution.
> >> -
> >> -* Neither the name of Nordic Semiconductor ASA nor the names of its
> >> -  contributors may be used to endorse or promote products derived from
> >> -  this software without specific prior written permission.
> >> -
> >> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
> >> IS"
> >> -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE
> >> -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> >> PURPOSE ARE
> >> -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> >> LIABLE
> >> -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL
> >> -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
> GOODS OR
> >> -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> HOWEVER
> >> -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> >> LIABILITY,
> >> -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
> THE
> >> USE
> >> -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> >> -*/
> >> -
> >> -/*
> >> -NOTE: Template files (including this one) are application specific and
> >> therefore
> >> -expected to be copied into the application project folder prior to its
> >> use!
> >> -*/
> >> -
> >> -    .syntax unified
> >> -    .arch armv7-m
> >> -
> >> -    .section .stack
> >> -    .align 3
> >> -    .equ    Stack_Size, 432
> >> -    .globl    __StackTop
> >> -    .globl    __StackLimit
> >> -__StackLimit:
> >> -    .space    Stack_Size
> >> -    .size __StackLimit, . - __StackLimit
> >> -__StackTop:
> >> -    .size __StackTop, . - __StackTop
> >> -
> >> -    .section .heap
> >> -    .align 3
> >> -#ifdef __HEAP_SIZE
> >> -    .equ    Heap_Size, __HEAP_SIZE
> >> -#else
> >> -    .equ    Heap_Size, 0
> >> -#endif
> >> -    .globl    __HeapBase
> >> -    .globl    __HeapLimit
> >> -__HeapBase:
> >> -    .if    Heap_Size
> >> -    .space    Heap_Size
> >> -    .endif
> >> -    .size __HeapBase, . - __HeapBase
> >> -__HeapLimit:
> >> -    .size __HeapLimit, . - __HeapLimit
> >> -
> >> -    .section .isr_vector
> >> -    .align 2
> >> -    .globl __isr_vector
> >> -__isr_vector:
> >> -    .long    __StackTop            /* Top of Stack */
> >> -    .long   Reset_Handler               /* Reset Handler */
> >> -    .long   NMI_Handler                 /* NMI Handler */
> >> -    .long   HardFault_Handler           /* Hard Fault Handler */
> >> -    .long   0                           /* Reserved */
> >> -    .long   0                           /* Reserved */
> >> -    .long   0                           /* Reserved */
> >> -    .long   0                           /* Reserved */
> >> -    .long   0                           /* Reserved */
> >> -    .long   0                           /* Reserved */
> >> -    .long   0                           /* Reserved */
> >> -    .long   SVC_Handler                 /* SVCall Handler */
> >> -    .long   0                           /* Reserved */
> >> -    .long   0                           /* Reserved */
> >> -    .long   PendSV_Handler              /* PendSV Handler */
> >> -    .long   SysTick_Handler             /* SysTick Handler */
> >> -
> >> -  /* External Interrupts */
> >> -    .long   POWER_CLOCK_IRQHandler
> >> -    .long   RADIO_IRQHandler
> >> -    .long   UARTE0_UART0_IRQHandler
> >> -    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
> >> -    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
> >> -    .long   NFCT_IRQHandler
> >> -    .long   GPIOTE_IRQHandler
> >> -    .long   SAADC_IRQHandler
> >> -    .long   TIMER0_IRQHandler
> >> -    .long   TIMER1_IRQHandler
> >> -    .long   TIMER2_IRQHandler
> >> -    .long   RTC0_IRQHandler
> >> -    .long   TEMP_IRQHandler
> >> -    .long   RNG_IRQHandler
> >> -    .long   ECB_IRQHandler
> >> -    .long   CCM_AAR_IRQHandler
> >> -    .long   WDT_IRQHandler
> >> -    .long   RTC1_IRQHandler
> >> -    .long   QDEC_IRQHandler
> >> -    .long   COMP_LPCOMP_IRQHandler
> >> -    .long   SWI0_EGU0_IRQHandler
> >> -    .long   SWI1_EGU1_IRQHandler
> >> -    .long   SWI2_EGU2_IRQHandler
> >> -    .long   SWI3_EGU3_IRQHandler
> >> -    .long   SWI4_EGU4_IRQHandler
> >> -    .long   SWI5_EGU5_IRQHandler
> >> -    .long   TIMER3_IRQHandler
> >> -    .long   TIMER4_IRQHandler
> >> -    .long   PWM0_IRQHandler
> >> -    .long   PDM_IRQHandler
> >> -    .long   0                         /*Reserved */
> >> -    .long   0                         /*Reserved */
> >> -    .long   MWU_IRQHandler
> >> -    .long   PWM1_IRQHandler
> >> -    .long   PWM2_IRQHandler
> >> -    .long   SPIM2_SPIS2_SPI2_IRQHandler
> >> -    .long   RTC2_IRQHandler
> >> -    .long   I2S_IRQHandler
> >> -
> >> -    .size    __isr_vector, . - __isr_vector
> >> -
> >> -/* Reset Handler */
> >> -
> >> -    .text
> >> -    .thumb
> >> -    .thumb_func
> >> -    .align 1
> >> -    .globl    Reset_Handler
> >> -    .type    Reset_Handler, %function
> >> -Reset_Handler:
> >> -    .fnstart
> >> -
> >> -/*     Loop to copy data from read only memory to RAM. The ranges
> >> - *      of copy from/to are specified by following symbols evaluated in
> >> - *      linker script.
> >> - *      __etext: End of code section, i.e., begin of data sections to
> >> copy from.
> >> - *      __data_start__/__data_end__: RAM address range that data
> should be
> >> - *      copied to. Both must be aligned to 4 bytes boundary.  */
> >> -
> >> -    ldr    r1, =__etext
> >> -    ldr    r2, =__data_start__
> >> -    ldr    r3, =__data_end__
> >> -
> >> -    subs    r3, r2
> >> -    ble     .LC0
> >> -
> >> -.LC1:
> >> -    subs    r3, 4
> >> -    ldr    r0, [r1,r3]
> >> -    str    r0, [r2,r3]
> >> -    bgt    .LC1
> >> -
> >> -.LC0:
> >> -
> >> -    LDR     R0, =__HeapBase
> >> -    LDR     R1, =__HeapLimit
> >> -    BL      _sbrkInit
> >> -
> >> -    LDR     R0, =SystemInit
> >> -    BLX     R0
> >> -
> >> -    LDR     R0, =_start
> >> -    BX      R0
> >> -
> >> -    .pool
> >> -    .cantunwind
> >> -    .fnend
> >> -    .size   Reset_Handler,.-Reset_Handler
> >> -
> >> -    .section ".text"
> >> -
> >> -
> >> -/* Dummy Exception Handlers (infinite loops which can be modified) */
> >> -
> >> -    .weak   NMI_Handler
> >> -    .type   NMI_Handler, %function
> >> -NMI_Handler:
> >> -    B       .
> >> -    .size   NMI_Handler, . - NMI_Handler
> >> -
> >> -
> >> -    .weak   HardFault_Handler
> >> -    .type   HardFault_Handler, %function
> >> -HardFault_Handler:
> >> -    B       .
> >> -    .size   HardFault_Handler, . - HardFault_Handler
> >> -
> >> -
> >> -    .weak   MemoryManagement_Handler
> >> -    .type   MemoryManagement_Handler, %function
> >> -MemoryManagement_Handler:
> >> -    B       .
> >> -    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
> >> -
> >> -
> >> -    .weak   BusFault_Handler
> >> -    .type   BusFault_Handler, %function
> >> -BusFault_Handler:
> >> -    B       .
> >> -    .size   BusFault_Handler, . - BusFault_Handler
> >> -
> >> -
> >> -    .weak   UsageFault_Handler
> >> -    .type   UsageFault_Handler, %function
> >> -UsageFault_Handler:
> >> -    B       .
> >> -    .size   UsageFault_Handler, . - UsageFault_Handler
> >> -
> >> -
> >> -    .weak   SVC_Handler
> >> -    .type   SVC_Handler, %function
> >> -SVC_Handler:
> >> -    B       .
> >> -    .size   SVC_Handler, . - SVC_Handler
> >> -
> >> -
> >> -    .weak   PendSV_Handler
> >> -    .type   PendSV_Handler, %function
> >> -PendSV_Handler:
> >> -    B       .
> >> -    .size   PendSV_Handler, . - PendSV_Handler
> >> -
> >> -
> >> -    .weak   SysTick_Handler
> >> -    .type   SysTick_Handler, %function
> >> -SysTick_Handler:
> >> -    B       .
> >> -    .size   SysTick_Handler, . - SysTick_Handler
> >> -
> >> -
> >> -/* IRQ Handlers */
> >> -
> >> -    .globl  Default_Handler
> >> -    .type   Default_Handler, %function
> >> -Default_Handler:
> >> -    B       .
> >> -    .size   Default_Handler, . - Default_Handler
> >> -
> >> -    .macro  IRQ handler
> >> -    .weak   \handler
> >> -    .set    \handler, Default_Handler
> >> -    .endm
> >> -
> >> -    IRQ  POWER_CLOCK_IRQHandler
> >> -    IRQ  RADIO_IRQHandler
> >> -    IRQ  UARTE0_UART0_IRQHandler
> >> -    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
> >> -    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
> >> -    IRQ  NFCT_IRQHandler
> >> -    IRQ  GPIOTE_IRQHandler
> >> -    IRQ  SAADC_IRQHandler
> >> -    IRQ  TIMER0_IRQHandler
> >> -    IRQ  TIMER1_IRQHandler
> >> -    IRQ  TIMER2_IRQHandler
> >> -    IRQ  RTC0_IRQHandler
> >> -    IRQ  TEMP_IRQHandler
> >> -    IRQ  RNG_IRQHandler
> >> -    IRQ  ECB_IRQHandler
> >> -    IRQ  CCM_AAR_IRQHandler
> >> -    IRQ  WDT_IRQHandler
> >> -    IRQ  RTC1_IRQHandler
> >> -    IRQ  QDEC_IRQHandler
> >> -    IRQ  COMP_LPCOMP_IRQHandler
> >> -    IRQ  SWI0_EGU0_IRQHandler
> >> -    IRQ  SWI1_EGU1_IRQHandler
> >> -    IRQ  SWI2_EGU2_IRQHandler
> >> -    IRQ  SWI3_EGU3_IRQHandler
> >> -    IRQ  SWI4_EGU4_IRQHandler
> >> -    IRQ  SWI5_EGU5_IRQHandler
> >> -    IRQ  TIMER3_IRQHandler
> >> -    IRQ  TIMER4_IRQHandler
> >> -    IRQ  PWM0_IRQHandler
> >> -    IRQ  PDM_IRQHandler
> >> -    IRQ  MWU_IRQHandler
> >> -    IRQ  PWM1_IRQHandler
> >> -    IRQ  PWM2_IRQHandler
> >> -    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
> >> -    IRQ  RTC2_IRQHandler
> >> -    IRQ  I2S_IRQHandler
> >> -
> >> -  .end
> >> diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
> >> b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
> >> deleted file mode 100755
> >> index 7426848..0000000
> >> --- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
> >> +++ /dev/null
> >> @@ -1,150 +0,0 @@
> >> -/*
> >> -Copyright (c) 2015, Nordic Semiconductor ASA
> >> -All rights reserved.
> >> -
> >> -Redistribution and use in source and binary forms, with or without
> >> -modification, are permitted provided that the following conditions are
> >> met:
> >> -
> >> -* Redistributions of source code must retain the above copyright
> notice,
> >> this
> >> -  list of conditions and the following disclaimer.
> >> -
> >> -* Redistributions in binary form must reproduce the above copyright
> >> notice,
> >> -  this list of conditions and the following disclaimer in the
> >> documentation
> >> -  and/or other materials provided with the distribution.
> >> -
> >> -* Neither the name of Nordic Semiconductor ASA nor the names of its
> >> -  contributors may be used to endorse or promote products derived from
> >> -  this software without specific prior written permission.
> >> -
> >> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
> >> IS"
> >> -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE
> >> -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> >> PURPOSE ARE
> >> -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> >> LIABLE
> >> -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL
> >> -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
> GOODS OR
> >> -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> HOWEVER
> >> -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> >> LIABILITY,
> >> -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
> THE
> >> USE
> >> -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> >> -*/
> >> -
> >> -/*
> >> -NOTE: Template files (including this one) are application specific and
> >> therefore
> >> -expected to be copied into the application project folder prior to its
> >> use!
> >> -*/
> >> -
> >> -    .syntax unified
> >> -    .arch armv7-m
> >> -    .section .stack
> >> -    .align 3
> >> -    .equ    Stack_Size, 432
> >> -    .globl    __StackTop
> >> -    .globl    __StackLimit
> >> -__StackLimit:
> >> -    .space    Stack_Size
> >> -    .size __StackLimit, . - __StackLimit
> >> -__StackTop:
> >> -    .size __StackTop, . - __StackTop
> >> -
> >> -    .section .heap
> >> -    .align 3
> >> -#ifdef __HEAP_SIZE
> >> -    .equ    Heap_Size, __HEAP_SIZE
> >> -#else
> >> -    .equ    Heap_Size, 0
> >> -#endif
> >> -    .globl    __HeapBase
> >> -    .globl    __HeapLimit
> >> -__HeapBase:
> >> -    .if    Heap_Size
> >> -    .space    Heap_Size
> >> -    .endif
> >> -    .size __HeapBase, . - __HeapBase
> >> -__HeapLimit:
> >> -    .size __HeapLimit, . - __HeapLimit
> >> -
> >> -    .section .isr_vector_split
> >> -    .align 2
> >> -    .globl __isr_vector_split
> >> -__isr_vector_split:
> >> -    .long    __StackTop            /* Top of Stack */
> >> -    .long   Reset_Handler_split               /* Reset Handler */
> >> -
> >> -    .size    __isr_vector_split, . - __isr_vector_split
> >> -
> >> -/* Reset Handler */
> >> -
> >> -    .text
> >> -    .thumb
> >> -    .thumb_func
> >> -    .align 1
> >> -    .globl    Reset_Handler_split
> >> -    .type    Reset_Handler_split, %function
> >> -Reset_Handler_split:
> >> -    .fnstart
> >> -
> >> -
> >> -/*     Loop to copy data from read only memory to RAM. The ranges
> >> - *      of copy from/to are specified by following symbols evaluated in
> >> - *      linker script.
> >> - *      __etext: End of code section, i.e., begin of data sections to
> >> copy from.
> >> - *      __data_start__/__data_end__: RAM address range that data
> should be
> >> - *      copied to. Both must be aligned to 4 bytes boundary.  */
> >> -
> >> -    ldr    r1, =__etext
> >> -    ldr    r2, =__data_start__
> >> -    ldr    r3, =__data_end__
> >> -
> >> -    subs    r3, r2
> >> -    ble     .LC0
> >> -
> >> -.LC1:
> >> -    subs    r3, 4
> >> -    ldr    r0, [r1,r3]
> >> -    str    r0, [r2,r3]
> >> -    bgt    .LC1
> >> -
> >> -.LC0:
> >> -    ldr    r1, =__etext_loader
> >> -    ldr    r2, =__data_start___loader
> >> -    ldr    r3, =__data_end___loader
> >> -
> >> -    subs    r3, r2
> >> -    ble     .LC2
> >> -
> >> -.LC3:
> >> -    subs    r3, 4
> >> -    ldr    r0, [r1,r3]
> >> -    str    r0, [r2,r3]
> >> -    bgt    .LC3
> >> -.LC2:
> >> -
> >> -    subs    r0, r0
> >> -    ldr    r2, =__bss_start___loader
> >> -    ldr    r3, =__bss_end___loader
> >> -
> >> -    subs    r3, r2
> >> -    ble     .LC4
> >> -
> >> -.LC5:
> >> -    subs    r3, 4
> >> -    str    r0, [r2,r3]
> >> -    bgt    .LC5
> >> -.LC4:
> >> -
> >> -    LDR     R0, =__HeapBase
> >> -    LDR     R1, =__HeapLimit
> >> -    BL      _sbrkInit
> >> -
> >> -    LDR     R0, =SystemInit
> >> -    BLX     R0
> >> -    LDR     R0, =_start
> >> -    BX      R0
> >> -
> >> -    .pool
> >> -    .cantunwind
> >> -    .fnend
> >> -    .size   Reset_Handler_split,.-Reset_Handler_split
> >> -
> >> -    .section ".text"
> >> -  .end
> >> --
> >> 2.7.4
> >>
> >>
>
>

Re: [PATCH] mcu/nordic/nrf52xxx: Fix for nrf52dk startup crash

Posted by will sanfilippo <wi...@runtime.io>.
Hey all:

Sorry about this. I think my build found the startup file somewhere but what is in develop doesnt. We will address this today.

Thanks, and sorry.

Will

> On Nov 7, 2016, at 6:13 AM, Michał Narajowski <mi...@codecoup.pl> wrote:
> 
> Also sent a pull request.
> 
> 2016-11-07 14:15 GMT+01:00 Michał Narajowski <mi...@codecoup.pl>
> :
> 
>> With this patch it is possible to start nrf52dk board.
>> Regression observed after patch:
>> 290c683 MYNEWT-475: BSP Cleanup
>> ---
>> .../src/arch/cortex_m4/gcc_startup_nrf52.s         | 289
>> +++++++++++++++++++++
>> .../src/arch/cortex_m4/gcc_startup_nrf52_split.s   | 150 +++++++++++
>> hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s     | 289
>> ---------------------
>> .../nordic/nrf52xxx/src/gcc_startup_nrf52_split.s  | 150 -----------
>> 4 files changed, 439 insertions(+), 439 deletions(-)
>> create mode 100755 hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
>> nrf52.s
>> create mode 100755 hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
>> nrf52_split.s
>> delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
>> delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
>> 
>> diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
>> b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
>> new file mode 100755
>> index 0000000..fb804fd
>> --- /dev/null
>> +++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
>> @@ -0,0 +1,289 @@
>> +/*
>> +Copyright (c) 2015, Nordic Semiconductor ASA
>> +All rights reserved.
>> +
>> +Redistribution and use in source and binary forms, with or without
>> +modification, are permitted provided that the following conditions are
>> met:
>> +
>> +* Redistributions of source code must retain the above copyright notice,
>> this
>> +  list of conditions and the following disclaimer.
>> +
>> +* Redistributions in binary form must reproduce the above copyright
>> notice,
>> +  this list of conditions and the following disclaimer in the
>> documentation
>> +  and/or other materials provided with the distribution.
>> +
>> +* Neither the name of Nordic Semiconductor ASA nor the names of its
>> +  contributors may be used to endorse or promote products derived from
>> +  this software without specific prior written permission.
>> +
>> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
>> IS"
>> +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>> PURPOSE ARE
>> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
>> LIABLE
>> +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
>> +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
>> +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
>> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
>> LIABILITY,
>> +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
>> USE
>> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> +*/
>> +
>> +/*
>> +NOTE: Template files (including this one) are application specific and
>> therefore
>> +expected to be copied into the application project folder prior to its
>> use!
>> +*/
>> +
>> +    .syntax unified
>> +    .arch armv7-m
>> +
>> +    .section .stack
>> +    .align 3
>> +    .equ    Stack_Size, 432
>> +    .globl    __StackTop
>> +    .globl    __StackLimit
>> +__StackLimit:
>> +    .space    Stack_Size
>> +    .size __StackLimit, . - __StackLimit
>> +__StackTop:
>> +    .size __StackTop, . - __StackTop
>> +
>> +    .section .heap
>> +    .align 3
>> +#ifdef __HEAP_SIZE
>> +    .equ    Heap_Size, __HEAP_SIZE
>> +#else
>> +    .equ    Heap_Size, 0
>> +#endif
>> +    .globl    __HeapBase
>> +    .globl    __HeapLimit
>> +__HeapBase:
>> +    .if    Heap_Size
>> +    .space    Heap_Size
>> +    .endif
>> +    .size __HeapBase, . - __HeapBase
>> +__HeapLimit:
>> +    .size __HeapLimit, . - __HeapLimit
>> +
>> +    .section .isr_vector
>> +    .align 2
>> +    .globl __isr_vector
>> +__isr_vector:
>> +    .long    __StackTop            /* Top of Stack */
>> +    .long   Reset_Handler               /* Reset Handler */
>> +    .long   NMI_Handler                 /* NMI Handler */
>> +    .long   HardFault_Handler           /* Hard Fault Handler */
>> +    .long   0                           /* Reserved */
>> +    .long   0                           /* Reserved */
>> +    .long   0                           /* Reserved */
>> +    .long   0                           /* Reserved */
>> +    .long   0                           /* Reserved */
>> +    .long   0                           /* Reserved */
>> +    .long   0                           /* Reserved */
>> +    .long   SVC_Handler                 /* SVCall Handler */
>> +    .long   0                           /* Reserved */
>> +    .long   0                           /* Reserved */
>> +    .long   PendSV_Handler              /* PendSV Handler */
>> +    .long   SysTick_Handler             /* SysTick Handler */
>> +
>> +  /* External Interrupts */
>> +    .long   POWER_CLOCK_IRQHandler
>> +    .long   RADIO_IRQHandler
>> +    .long   UARTE0_UART0_IRQHandler
>> +    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
>> +    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
>> +    .long   NFCT_IRQHandler
>> +    .long   GPIOTE_IRQHandler
>> +    .long   SAADC_IRQHandler
>> +    .long   TIMER0_IRQHandler
>> +    .long   TIMER1_IRQHandler
>> +    .long   TIMER2_IRQHandler
>> +    .long   RTC0_IRQHandler
>> +    .long   TEMP_IRQHandler
>> +    .long   RNG_IRQHandler
>> +    .long   ECB_IRQHandler
>> +    .long   CCM_AAR_IRQHandler
>> +    .long   WDT_IRQHandler
>> +    .long   RTC1_IRQHandler
>> +    .long   QDEC_IRQHandler
>> +    .long   COMP_LPCOMP_IRQHandler
>> +    .long   SWI0_EGU0_IRQHandler
>> +    .long   SWI1_EGU1_IRQHandler
>> +    .long   SWI2_EGU2_IRQHandler
>> +    .long   SWI3_EGU3_IRQHandler
>> +    .long   SWI4_EGU4_IRQHandler
>> +    .long   SWI5_EGU5_IRQHandler
>> +    .long   TIMER3_IRQHandler
>> +    .long   TIMER4_IRQHandler
>> +    .long   PWM0_IRQHandler
>> +    .long   PDM_IRQHandler
>> +    .long   0                         /*Reserved */
>> +    .long   0                         /*Reserved */
>> +    .long   MWU_IRQHandler
>> +    .long   PWM1_IRQHandler
>> +    .long   PWM2_IRQHandler
>> +    .long   SPIM2_SPIS2_SPI2_IRQHandler
>> +    .long   RTC2_IRQHandler
>> +    .long   I2S_IRQHandler
>> +
>> +    .size    __isr_vector, . - __isr_vector
>> +
>> +/* Reset Handler */
>> +
>> +    .text
>> +    .thumb
>> +    .thumb_func
>> +    .align 1
>> +    .globl    Reset_Handler
>> +    .type    Reset_Handler, %function
>> +Reset_Handler:
>> +    .fnstart
>> +
>> +/*     Loop to copy data from read only memory to RAM. The ranges
>> + *      of copy from/to are specified by following symbols evaluated in
>> + *      linker script.
>> + *      __etext: End of code section, i.e., begin of data sections to
>> copy from.
>> + *      __data_start__/__data_end__: RAM address range that data should be
>> + *      copied to. Both must be aligned to 4 bytes boundary.  */
>> +
>> +    ldr    r1, =__etext
>> +    ldr    r2, =__data_start__
>> +    ldr    r3, =__data_end__
>> +
>> +    subs    r3, r2
>> +    ble     .LC0
>> +
>> +.LC1:
>> +    subs    r3, 4
>> +    ldr    r0, [r1,r3]
>> +    str    r0, [r2,r3]
>> +    bgt    .LC1
>> +
>> +.LC0:
>> +
>> +    LDR     R0, =__HeapBase
>> +    LDR     R1, =__HeapLimit
>> +    BL      _sbrkInit
>> +
>> +    LDR     R0, =SystemInit
>> +    BLX     R0
>> +
>> +    LDR     R0, =_start
>> +    BX      R0
>> +
>> +    .pool
>> +    .cantunwind
>> +    .fnend
>> +    .size   Reset_Handler,.-Reset_Handler
>> +
>> +    .section ".text"
>> +
>> +
>> +/* Dummy Exception Handlers (infinite loops which can be modified) */
>> +
>> +    .weak   NMI_Handler
>> +    .type   NMI_Handler, %function
>> +NMI_Handler:
>> +    B       .
>> +    .size   NMI_Handler, . - NMI_Handler
>> +
>> +
>> +    .weak   HardFault_Handler
>> +    .type   HardFault_Handler, %function
>> +HardFault_Handler:
>> +    B       .
>> +    .size   HardFault_Handler, . - HardFault_Handler
>> +
>> +
>> +    .weak   MemoryManagement_Handler
>> +    .type   MemoryManagement_Handler, %function
>> +MemoryManagement_Handler:
>> +    B       .
>> +    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
>> +
>> +
>> +    .weak   BusFault_Handler
>> +    .type   BusFault_Handler, %function
>> +BusFault_Handler:
>> +    B       .
>> +    .size   BusFault_Handler, . - BusFault_Handler
>> +
>> +
>> +    .weak   UsageFault_Handler
>> +    .type   UsageFault_Handler, %function
>> +UsageFault_Handler:
>> +    B       .
>> +    .size   UsageFault_Handler, . - UsageFault_Handler
>> +
>> +
>> +    .weak   SVC_Handler
>> +    .type   SVC_Handler, %function
>> +SVC_Handler:
>> +    B       .
>> +    .size   SVC_Handler, . - SVC_Handler
>> +
>> +
>> +    .weak   PendSV_Handler
>> +    .type   PendSV_Handler, %function
>> +PendSV_Handler:
>> +    B       .
>> +    .size   PendSV_Handler, . - PendSV_Handler
>> +
>> +
>> +    .weak   SysTick_Handler
>> +    .type   SysTick_Handler, %function
>> +SysTick_Handler:
>> +    B       .
>> +    .size   SysTick_Handler, . - SysTick_Handler
>> +
>> +
>> +/* IRQ Handlers */
>> +
>> +    .globl  Default_Handler
>> +    .type   Default_Handler, %function
>> +Default_Handler:
>> +    B       .
>> +    .size   Default_Handler, . - Default_Handler
>> +
>> +    .macro  IRQ handler
>> +    .weak   \handler
>> +    .set    \handler, Default_Handler
>> +    .endm
>> +
>> +    IRQ  POWER_CLOCK_IRQHandler
>> +    IRQ  RADIO_IRQHandler
>> +    IRQ  UARTE0_UART0_IRQHandler
>> +    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
>> +    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
>> +    IRQ  NFCT_IRQHandler
>> +    IRQ  GPIOTE_IRQHandler
>> +    IRQ  SAADC_IRQHandler
>> +    IRQ  TIMER0_IRQHandler
>> +    IRQ  TIMER1_IRQHandler
>> +    IRQ  TIMER2_IRQHandler
>> +    IRQ  RTC0_IRQHandler
>> +    IRQ  TEMP_IRQHandler
>> +    IRQ  RNG_IRQHandler
>> +    IRQ  ECB_IRQHandler
>> +    IRQ  CCM_AAR_IRQHandler
>> +    IRQ  WDT_IRQHandler
>> +    IRQ  RTC1_IRQHandler
>> +    IRQ  QDEC_IRQHandler
>> +    IRQ  COMP_LPCOMP_IRQHandler
>> +    IRQ  SWI0_EGU0_IRQHandler
>> +    IRQ  SWI1_EGU1_IRQHandler
>> +    IRQ  SWI2_EGU2_IRQHandler
>> +    IRQ  SWI3_EGU3_IRQHandler
>> +    IRQ  SWI4_EGU4_IRQHandler
>> +    IRQ  SWI5_EGU5_IRQHandler
>> +    IRQ  TIMER3_IRQHandler
>> +    IRQ  TIMER4_IRQHandler
>> +    IRQ  PWM0_IRQHandler
>> +    IRQ  PDM_IRQHandler
>> +    IRQ  MWU_IRQHandler
>> +    IRQ  PWM1_IRQHandler
>> +    IRQ  PWM2_IRQHandler
>> +    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
>> +    IRQ  RTC2_IRQHandler
>> +    IRQ  I2S_IRQHandler
>> +
>> +  .end
>> diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
>> b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
>> new file mode 100755
>> index 0000000..7426848
>> --- /dev/null
>> +++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
>> @@ -0,0 +1,150 @@
>> +/*
>> +Copyright (c) 2015, Nordic Semiconductor ASA
>> +All rights reserved.
>> +
>> +Redistribution and use in source and binary forms, with or without
>> +modification, are permitted provided that the following conditions are
>> met:
>> +
>> +* Redistributions of source code must retain the above copyright notice,
>> this
>> +  list of conditions and the following disclaimer.
>> +
>> +* Redistributions in binary form must reproduce the above copyright
>> notice,
>> +  this list of conditions and the following disclaimer in the
>> documentation
>> +  and/or other materials provided with the distribution.
>> +
>> +* Neither the name of Nordic Semiconductor ASA nor the names of its
>> +  contributors may be used to endorse or promote products derived from
>> +  this software without specific prior written permission.
>> +
>> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
>> IS"
>> +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>> PURPOSE ARE
>> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
>> LIABLE
>> +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
>> +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
>> +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
>> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
>> LIABILITY,
>> +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
>> USE
>> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> +*/
>> +
>> +/*
>> +NOTE: Template files (including this one) are application specific and
>> therefore
>> +expected to be copied into the application project folder prior to its
>> use!
>> +*/
>> +
>> +    .syntax unified
>> +    .arch armv7-m
>> +    .section .stack
>> +    .align 3
>> +    .equ    Stack_Size, 432
>> +    .globl    __StackTop
>> +    .globl    __StackLimit
>> +__StackLimit:
>> +    .space    Stack_Size
>> +    .size __StackLimit, . - __StackLimit
>> +__StackTop:
>> +    .size __StackTop, . - __StackTop
>> +
>> +    .section .heap
>> +    .align 3
>> +#ifdef __HEAP_SIZE
>> +    .equ    Heap_Size, __HEAP_SIZE
>> +#else
>> +    .equ    Heap_Size, 0
>> +#endif
>> +    .globl    __HeapBase
>> +    .globl    __HeapLimit
>> +__HeapBase:
>> +    .if    Heap_Size
>> +    .space    Heap_Size
>> +    .endif
>> +    .size __HeapBase, . - __HeapBase
>> +__HeapLimit:
>> +    .size __HeapLimit, . - __HeapLimit
>> +
>> +    .section .isr_vector_split
>> +    .align 2
>> +    .globl __isr_vector_split
>> +__isr_vector_split:
>> +    .long    __StackTop            /* Top of Stack */
>> +    .long   Reset_Handler_split               /* Reset Handler */
>> +
>> +    .size    __isr_vector_split, . - __isr_vector_split
>> +
>> +/* Reset Handler */
>> +
>> +    .text
>> +    .thumb
>> +    .thumb_func
>> +    .align 1
>> +    .globl    Reset_Handler_split
>> +    .type    Reset_Handler_split, %function
>> +Reset_Handler_split:
>> +    .fnstart
>> +
>> +
>> +/*     Loop to copy data from read only memory to RAM. The ranges
>> + *      of copy from/to are specified by following symbols evaluated in
>> + *      linker script.
>> + *      __etext: End of code section, i.e., begin of data sections to
>> copy from.
>> + *      __data_start__/__data_end__: RAM address range that data should be
>> + *      copied to. Both must be aligned to 4 bytes boundary.  */
>> +
>> +    ldr    r1, =__etext
>> +    ldr    r2, =__data_start__
>> +    ldr    r3, =__data_end__
>> +
>> +    subs    r3, r2
>> +    ble     .LC0
>> +
>> +.LC1:
>> +    subs    r3, 4
>> +    ldr    r0, [r1,r3]
>> +    str    r0, [r2,r3]
>> +    bgt    .LC1
>> +
>> +.LC0:
>> +    ldr    r1, =__etext_loader
>> +    ldr    r2, =__data_start___loader
>> +    ldr    r3, =__data_end___loader
>> +
>> +    subs    r3, r2
>> +    ble     .LC2
>> +
>> +.LC3:
>> +    subs    r3, 4
>> +    ldr    r0, [r1,r3]
>> +    str    r0, [r2,r3]
>> +    bgt    .LC3
>> +.LC2:
>> +
>> +    subs    r0, r0
>> +    ldr    r2, =__bss_start___loader
>> +    ldr    r3, =__bss_end___loader
>> +
>> +    subs    r3, r2
>> +    ble     .LC4
>> +
>> +.LC5:
>> +    subs    r3, 4
>> +    str    r0, [r2,r3]
>> +    bgt    .LC5
>> +.LC4:
>> +
>> +    LDR     R0, =__HeapBase
>> +    LDR     R1, =__HeapLimit
>> +    BL      _sbrkInit
>> +
>> +    LDR     R0, =SystemInit
>> +    BLX     R0
>> +    LDR     R0, =_start
>> +    BX      R0
>> +
>> +    .pool
>> +    .cantunwind
>> +    .fnend
>> +    .size   Reset_Handler_split,.-Reset_Handler_split
>> +
>> +    .section ".text"
>> +  .end
>> diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
>> b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
>> deleted file mode 100755
>> index fb804fd..0000000
>> --- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
>> +++ /dev/null
>> @@ -1,289 +0,0 @@
>> -/*
>> -Copyright (c) 2015, Nordic Semiconductor ASA
>> -All rights reserved.
>> -
>> -Redistribution and use in source and binary forms, with or without
>> -modification, are permitted provided that the following conditions are
>> met:
>> -
>> -* Redistributions of source code must retain the above copyright notice,
>> this
>> -  list of conditions and the following disclaimer.
>> -
>> -* Redistributions in binary form must reproduce the above copyright
>> notice,
>> -  this list of conditions and the following disclaimer in the
>> documentation
>> -  and/or other materials provided with the distribution.
>> -
>> -* Neither the name of Nordic Semiconductor ASA nor the names of its
>> -  contributors may be used to endorse or promote products derived from
>> -  this software without specific prior written permission.
>> -
>> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
>> IS"
>> -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>> PURPOSE ARE
>> -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
>> LIABLE
>> -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
>> -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
>> -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
>> -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
>> LIABILITY,
>> -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
>> USE
>> -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> -*/
>> -
>> -/*
>> -NOTE: Template files (including this one) are application specific and
>> therefore
>> -expected to be copied into the application project folder prior to its
>> use!
>> -*/
>> -
>> -    .syntax unified
>> -    .arch armv7-m
>> -
>> -    .section .stack
>> -    .align 3
>> -    .equ    Stack_Size, 432
>> -    .globl    __StackTop
>> -    .globl    __StackLimit
>> -__StackLimit:
>> -    .space    Stack_Size
>> -    .size __StackLimit, . - __StackLimit
>> -__StackTop:
>> -    .size __StackTop, . - __StackTop
>> -
>> -    .section .heap
>> -    .align 3
>> -#ifdef __HEAP_SIZE
>> -    .equ    Heap_Size, __HEAP_SIZE
>> -#else
>> -    .equ    Heap_Size, 0
>> -#endif
>> -    .globl    __HeapBase
>> -    .globl    __HeapLimit
>> -__HeapBase:
>> -    .if    Heap_Size
>> -    .space    Heap_Size
>> -    .endif
>> -    .size __HeapBase, . - __HeapBase
>> -__HeapLimit:
>> -    .size __HeapLimit, . - __HeapLimit
>> -
>> -    .section .isr_vector
>> -    .align 2
>> -    .globl __isr_vector
>> -__isr_vector:
>> -    .long    __StackTop            /* Top of Stack */
>> -    .long   Reset_Handler               /* Reset Handler */
>> -    .long   NMI_Handler                 /* NMI Handler */
>> -    .long   HardFault_Handler           /* Hard Fault Handler */
>> -    .long   0                           /* Reserved */
>> -    .long   0                           /* Reserved */
>> -    .long   0                           /* Reserved */
>> -    .long   0                           /* Reserved */
>> -    .long   0                           /* Reserved */
>> -    .long   0                           /* Reserved */
>> -    .long   0                           /* Reserved */
>> -    .long   SVC_Handler                 /* SVCall Handler */
>> -    .long   0                           /* Reserved */
>> -    .long   0                           /* Reserved */
>> -    .long   PendSV_Handler              /* PendSV Handler */
>> -    .long   SysTick_Handler             /* SysTick Handler */
>> -
>> -  /* External Interrupts */
>> -    .long   POWER_CLOCK_IRQHandler
>> -    .long   RADIO_IRQHandler
>> -    .long   UARTE0_UART0_IRQHandler
>> -    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
>> -    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
>> -    .long   NFCT_IRQHandler
>> -    .long   GPIOTE_IRQHandler
>> -    .long   SAADC_IRQHandler
>> -    .long   TIMER0_IRQHandler
>> -    .long   TIMER1_IRQHandler
>> -    .long   TIMER2_IRQHandler
>> -    .long   RTC0_IRQHandler
>> -    .long   TEMP_IRQHandler
>> -    .long   RNG_IRQHandler
>> -    .long   ECB_IRQHandler
>> -    .long   CCM_AAR_IRQHandler
>> -    .long   WDT_IRQHandler
>> -    .long   RTC1_IRQHandler
>> -    .long   QDEC_IRQHandler
>> -    .long   COMP_LPCOMP_IRQHandler
>> -    .long   SWI0_EGU0_IRQHandler
>> -    .long   SWI1_EGU1_IRQHandler
>> -    .long   SWI2_EGU2_IRQHandler
>> -    .long   SWI3_EGU3_IRQHandler
>> -    .long   SWI4_EGU4_IRQHandler
>> -    .long   SWI5_EGU5_IRQHandler
>> -    .long   TIMER3_IRQHandler
>> -    .long   TIMER4_IRQHandler
>> -    .long   PWM0_IRQHandler
>> -    .long   PDM_IRQHandler
>> -    .long   0                         /*Reserved */
>> -    .long   0                         /*Reserved */
>> -    .long   MWU_IRQHandler
>> -    .long   PWM1_IRQHandler
>> -    .long   PWM2_IRQHandler
>> -    .long   SPIM2_SPIS2_SPI2_IRQHandler
>> -    .long   RTC2_IRQHandler
>> -    .long   I2S_IRQHandler
>> -
>> -    .size    __isr_vector, . - __isr_vector
>> -
>> -/* Reset Handler */
>> -
>> -    .text
>> -    .thumb
>> -    .thumb_func
>> -    .align 1
>> -    .globl    Reset_Handler
>> -    .type    Reset_Handler, %function
>> -Reset_Handler:
>> -    .fnstart
>> -
>> -/*     Loop to copy data from read only memory to RAM. The ranges
>> - *      of copy from/to are specified by following symbols evaluated in
>> - *      linker script.
>> - *      __etext: End of code section, i.e., begin of data sections to
>> copy from.
>> - *      __data_start__/__data_end__: RAM address range that data should be
>> - *      copied to. Both must be aligned to 4 bytes boundary.  */
>> -
>> -    ldr    r1, =__etext
>> -    ldr    r2, =__data_start__
>> -    ldr    r3, =__data_end__
>> -
>> -    subs    r3, r2
>> -    ble     .LC0
>> -
>> -.LC1:
>> -    subs    r3, 4
>> -    ldr    r0, [r1,r3]
>> -    str    r0, [r2,r3]
>> -    bgt    .LC1
>> -
>> -.LC0:
>> -
>> -    LDR     R0, =__HeapBase
>> -    LDR     R1, =__HeapLimit
>> -    BL      _sbrkInit
>> -
>> -    LDR     R0, =SystemInit
>> -    BLX     R0
>> -
>> -    LDR     R0, =_start
>> -    BX      R0
>> -
>> -    .pool
>> -    .cantunwind
>> -    .fnend
>> -    .size   Reset_Handler,.-Reset_Handler
>> -
>> -    .section ".text"
>> -
>> -
>> -/* Dummy Exception Handlers (infinite loops which can be modified) */
>> -
>> -    .weak   NMI_Handler
>> -    .type   NMI_Handler, %function
>> -NMI_Handler:
>> -    B       .
>> -    .size   NMI_Handler, . - NMI_Handler
>> -
>> -
>> -    .weak   HardFault_Handler
>> -    .type   HardFault_Handler, %function
>> -HardFault_Handler:
>> -    B       .
>> -    .size   HardFault_Handler, . - HardFault_Handler
>> -
>> -
>> -    .weak   MemoryManagement_Handler
>> -    .type   MemoryManagement_Handler, %function
>> -MemoryManagement_Handler:
>> -    B       .
>> -    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
>> -
>> -
>> -    .weak   BusFault_Handler
>> -    .type   BusFault_Handler, %function
>> -BusFault_Handler:
>> -    B       .
>> -    .size   BusFault_Handler, . - BusFault_Handler
>> -
>> -
>> -    .weak   UsageFault_Handler
>> -    .type   UsageFault_Handler, %function
>> -UsageFault_Handler:
>> -    B       .
>> -    .size   UsageFault_Handler, . - UsageFault_Handler
>> -
>> -
>> -    .weak   SVC_Handler
>> -    .type   SVC_Handler, %function
>> -SVC_Handler:
>> -    B       .
>> -    .size   SVC_Handler, . - SVC_Handler
>> -
>> -
>> -    .weak   PendSV_Handler
>> -    .type   PendSV_Handler, %function
>> -PendSV_Handler:
>> -    B       .
>> -    .size   PendSV_Handler, . - PendSV_Handler
>> -
>> -
>> -    .weak   SysTick_Handler
>> -    .type   SysTick_Handler, %function
>> -SysTick_Handler:
>> -    B       .
>> -    .size   SysTick_Handler, . - SysTick_Handler
>> -
>> -
>> -/* IRQ Handlers */
>> -
>> -    .globl  Default_Handler
>> -    .type   Default_Handler, %function
>> -Default_Handler:
>> -    B       .
>> -    .size   Default_Handler, . - Default_Handler
>> -
>> -    .macro  IRQ handler
>> -    .weak   \handler
>> -    .set    \handler, Default_Handler
>> -    .endm
>> -
>> -    IRQ  POWER_CLOCK_IRQHandler
>> -    IRQ  RADIO_IRQHandler
>> -    IRQ  UARTE0_UART0_IRQHandler
>> -    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
>> -    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
>> -    IRQ  NFCT_IRQHandler
>> -    IRQ  GPIOTE_IRQHandler
>> -    IRQ  SAADC_IRQHandler
>> -    IRQ  TIMER0_IRQHandler
>> -    IRQ  TIMER1_IRQHandler
>> -    IRQ  TIMER2_IRQHandler
>> -    IRQ  RTC0_IRQHandler
>> -    IRQ  TEMP_IRQHandler
>> -    IRQ  RNG_IRQHandler
>> -    IRQ  ECB_IRQHandler
>> -    IRQ  CCM_AAR_IRQHandler
>> -    IRQ  WDT_IRQHandler
>> -    IRQ  RTC1_IRQHandler
>> -    IRQ  QDEC_IRQHandler
>> -    IRQ  COMP_LPCOMP_IRQHandler
>> -    IRQ  SWI0_EGU0_IRQHandler
>> -    IRQ  SWI1_EGU1_IRQHandler
>> -    IRQ  SWI2_EGU2_IRQHandler
>> -    IRQ  SWI3_EGU3_IRQHandler
>> -    IRQ  SWI4_EGU4_IRQHandler
>> -    IRQ  SWI5_EGU5_IRQHandler
>> -    IRQ  TIMER3_IRQHandler
>> -    IRQ  TIMER4_IRQHandler
>> -    IRQ  PWM0_IRQHandler
>> -    IRQ  PDM_IRQHandler
>> -    IRQ  MWU_IRQHandler
>> -    IRQ  PWM1_IRQHandler
>> -    IRQ  PWM2_IRQHandler
>> -    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
>> -    IRQ  RTC2_IRQHandler
>> -    IRQ  I2S_IRQHandler
>> -
>> -  .end
>> diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
>> b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
>> deleted file mode 100755
>> index 7426848..0000000
>> --- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
>> +++ /dev/null
>> @@ -1,150 +0,0 @@
>> -/*
>> -Copyright (c) 2015, Nordic Semiconductor ASA
>> -All rights reserved.
>> -
>> -Redistribution and use in source and binary forms, with or without
>> -modification, are permitted provided that the following conditions are
>> met:
>> -
>> -* Redistributions of source code must retain the above copyright notice,
>> this
>> -  list of conditions and the following disclaimer.
>> -
>> -* Redistributions in binary form must reproduce the above copyright
>> notice,
>> -  this list of conditions and the following disclaimer in the
>> documentation
>> -  and/or other materials provided with the distribution.
>> -
>> -* Neither the name of Nordic Semiconductor ASA nor the names of its
>> -  contributors may be used to endorse or promote products derived from
>> -  this software without specific prior written permission.
>> -
>> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
>> IS"
>> -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>> PURPOSE ARE
>> -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
>> LIABLE
>> -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
>> -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
>> -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
>> -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
>> LIABILITY,
>> -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
>> USE
>> -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> -*/
>> -
>> -/*
>> -NOTE: Template files (including this one) are application specific and
>> therefore
>> -expected to be copied into the application project folder prior to its
>> use!
>> -*/
>> -
>> -    .syntax unified
>> -    .arch armv7-m
>> -    .section .stack
>> -    .align 3
>> -    .equ    Stack_Size, 432
>> -    .globl    __StackTop
>> -    .globl    __StackLimit
>> -__StackLimit:
>> -    .space    Stack_Size
>> -    .size __StackLimit, . - __StackLimit
>> -__StackTop:
>> -    .size __StackTop, . - __StackTop
>> -
>> -    .section .heap
>> -    .align 3
>> -#ifdef __HEAP_SIZE
>> -    .equ    Heap_Size, __HEAP_SIZE
>> -#else
>> -    .equ    Heap_Size, 0
>> -#endif
>> -    .globl    __HeapBase
>> -    .globl    __HeapLimit
>> -__HeapBase:
>> -    .if    Heap_Size
>> -    .space    Heap_Size
>> -    .endif
>> -    .size __HeapBase, . - __HeapBase
>> -__HeapLimit:
>> -    .size __HeapLimit, . - __HeapLimit
>> -
>> -    .section .isr_vector_split
>> -    .align 2
>> -    .globl __isr_vector_split
>> -__isr_vector_split:
>> -    .long    __StackTop            /* Top of Stack */
>> -    .long   Reset_Handler_split               /* Reset Handler */
>> -
>> -    .size    __isr_vector_split, . - __isr_vector_split
>> -
>> -/* Reset Handler */
>> -
>> -    .text
>> -    .thumb
>> -    .thumb_func
>> -    .align 1
>> -    .globl    Reset_Handler_split
>> -    .type    Reset_Handler_split, %function
>> -Reset_Handler_split:
>> -    .fnstart
>> -
>> -
>> -/*     Loop to copy data from read only memory to RAM. The ranges
>> - *      of copy from/to are specified by following symbols evaluated in
>> - *      linker script.
>> - *      __etext: End of code section, i.e., begin of data sections to
>> copy from.
>> - *      __data_start__/__data_end__: RAM address range that data should be
>> - *      copied to. Both must be aligned to 4 bytes boundary.  */
>> -
>> -    ldr    r1, =__etext
>> -    ldr    r2, =__data_start__
>> -    ldr    r3, =__data_end__
>> -
>> -    subs    r3, r2
>> -    ble     .LC0
>> -
>> -.LC1:
>> -    subs    r3, 4
>> -    ldr    r0, [r1,r3]
>> -    str    r0, [r2,r3]
>> -    bgt    .LC1
>> -
>> -.LC0:
>> -    ldr    r1, =__etext_loader
>> -    ldr    r2, =__data_start___loader
>> -    ldr    r3, =__data_end___loader
>> -
>> -    subs    r3, r2
>> -    ble     .LC2
>> -
>> -.LC3:
>> -    subs    r3, 4
>> -    ldr    r0, [r1,r3]
>> -    str    r0, [r2,r3]
>> -    bgt    .LC3
>> -.LC2:
>> -
>> -    subs    r0, r0
>> -    ldr    r2, =__bss_start___loader
>> -    ldr    r3, =__bss_end___loader
>> -
>> -    subs    r3, r2
>> -    ble     .LC4
>> -
>> -.LC5:
>> -    subs    r3, 4
>> -    str    r0, [r2,r3]
>> -    bgt    .LC5
>> -.LC4:
>> -
>> -    LDR     R0, =__HeapBase
>> -    LDR     R1, =__HeapLimit
>> -    BL      _sbrkInit
>> -
>> -    LDR     R0, =SystemInit
>> -    BLX     R0
>> -    LDR     R0, =_start
>> -    BX      R0
>> -
>> -    .pool
>> -    .cantunwind
>> -    .fnend
>> -    .size   Reset_Handler_split,.-Reset_Handler_split
>> -
>> -    .section ".text"
>> -  .end
>> --
>> 2.7.4
>> 
>> 


Re: [PATCH] mcu/nordic/nrf52xxx: Fix for nrf52dk startup crash

Posted by Michał Narajowski <mi...@codecoup.pl>.
Also sent a pull request.

2016-11-07 14:15 GMT+01:00 Michał Narajowski <mi...@codecoup.pl>
:

> With this patch it is possible to start nrf52dk board.
> Regression observed after patch:
> 290c683 MYNEWT-475: BSP Cleanup
> ---
>  .../src/arch/cortex_m4/gcc_startup_nrf52.s         | 289
> +++++++++++++++++++++
>  .../src/arch/cortex_m4/gcc_startup_nrf52_split.s   | 150 +++++++++++
>  hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s     | 289
> ---------------------
>  .../nordic/nrf52xxx/src/gcc_startup_nrf52_split.s  | 150 -----------
>  4 files changed, 439 insertions(+), 439 deletions(-)
>  create mode 100755 hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
> nrf52.s
>  create mode 100755 hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_
> nrf52_split.s
>  delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
>  delete mode 100755 hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
>
> diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
> b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
> new file mode 100755
> index 0000000..fb804fd
> --- /dev/null
> +++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
> @@ -0,0 +1,289 @@
> +/*
> +Copyright (c) 2015, Nordic Semiconductor ASA
> +All rights reserved.
> +
> +Redistribution and use in source and binary forms, with or without
> +modification, are permitted provided that the following conditions are
> met:
> +
> +* Redistributions of source code must retain the above copyright notice,
> this
> +  list of conditions and the following disclaimer.
> +
> +* Redistributions in binary form must reproduce the above copyright
> notice,
> +  this list of conditions and the following disclaimer in the
> documentation
> +  and/or other materials provided with the distribution.
> +
> +* Neither the name of Nordic Semiconductor ASA nor the names of its
> +  contributors may be used to endorse or promote products derived from
> +  this software without specific prior written permission.
> +
> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
> IS"
> +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE ARE
> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> LIABLE
> +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> LIABILITY,
> +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +*/
> +
> +/*
> +NOTE: Template files (including this one) are application specific and
> therefore
> +expected to be copied into the application project folder prior to its
> use!
> +*/
> +
> +    .syntax unified
> +    .arch armv7-m
> +
> +    .section .stack
> +    .align 3
> +    .equ    Stack_Size, 432
> +    .globl    __StackTop
> +    .globl    __StackLimit
> +__StackLimit:
> +    .space    Stack_Size
> +    .size __StackLimit, . - __StackLimit
> +__StackTop:
> +    .size __StackTop, . - __StackTop
> +
> +    .section .heap
> +    .align 3
> +#ifdef __HEAP_SIZE
> +    .equ    Heap_Size, __HEAP_SIZE
> +#else
> +    .equ    Heap_Size, 0
> +#endif
> +    .globl    __HeapBase
> +    .globl    __HeapLimit
> +__HeapBase:
> +    .if    Heap_Size
> +    .space    Heap_Size
> +    .endif
> +    .size __HeapBase, . - __HeapBase
> +__HeapLimit:
> +    .size __HeapLimit, . - __HeapLimit
> +
> +    .section .isr_vector
> +    .align 2
> +    .globl __isr_vector
> +__isr_vector:
> +    .long    __StackTop            /* Top of Stack */
> +    .long   Reset_Handler               /* Reset Handler */
> +    .long   NMI_Handler                 /* NMI Handler */
> +    .long   HardFault_Handler           /* Hard Fault Handler */
> +    .long   0                           /* Reserved */
> +    .long   0                           /* Reserved */
> +    .long   0                           /* Reserved */
> +    .long   0                           /* Reserved */
> +    .long   0                           /* Reserved */
> +    .long   0                           /* Reserved */
> +    .long   0                           /* Reserved */
> +    .long   SVC_Handler                 /* SVCall Handler */
> +    .long   0                           /* Reserved */
> +    .long   0                           /* Reserved */
> +    .long   PendSV_Handler              /* PendSV Handler */
> +    .long   SysTick_Handler             /* SysTick Handler */
> +
> +  /* External Interrupts */
> +    .long   POWER_CLOCK_IRQHandler
> +    .long   RADIO_IRQHandler
> +    .long   UARTE0_UART0_IRQHandler
> +    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
> +    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
> +    .long   NFCT_IRQHandler
> +    .long   GPIOTE_IRQHandler
> +    .long   SAADC_IRQHandler
> +    .long   TIMER0_IRQHandler
> +    .long   TIMER1_IRQHandler
> +    .long   TIMER2_IRQHandler
> +    .long   RTC0_IRQHandler
> +    .long   TEMP_IRQHandler
> +    .long   RNG_IRQHandler
> +    .long   ECB_IRQHandler
> +    .long   CCM_AAR_IRQHandler
> +    .long   WDT_IRQHandler
> +    .long   RTC1_IRQHandler
> +    .long   QDEC_IRQHandler
> +    .long   COMP_LPCOMP_IRQHandler
> +    .long   SWI0_EGU0_IRQHandler
> +    .long   SWI1_EGU1_IRQHandler
> +    .long   SWI2_EGU2_IRQHandler
> +    .long   SWI3_EGU3_IRQHandler
> +    .long   SWI4_EGU4_IRQHandler
> +    .long   SWI5_EGU5_IRQHandler
> +    .long   TIMER3_IRQHandler
> +    .long   TIMER4_IRQHandler
> +    .long   PWM0_IRQHandler
> +    .long   PDM_IRQHandler
> +    .long   0                         /*Reserved */
> +    .long   0                         /*Reserved */
> +    .long   MWU_IRQHandler
> +    .long   PWM1_IRQHandler
> +    .long   PWM2_IRQHandler
> +    .long   SPIM2_SPIS2_SPI2_IRQHandler
> +    .long   RTC2_IRQHandler
> +    .long   I2S_IRQHandler
> +
> +    .size    __isr_vector, . - __isr_vector
> +
> +/* Reset Handler */
> +
> +    .text
> +    .thumb
> +    .thumb_func
> +    .align 1
> +    .globl    Reset_Handler
> +    .type    Reset_Handler, %function
> +Reset_Handler:
> +    .fnstart
> +
> +/*     Loop to copy data from read only memory to RAM. The ranges
> + *      of copy from/to are specified by following symbols evaluated in
> + *      linker script.
> + *      __etext: End of code section, i.e., begin of data sections to
> copy from.
> + *      __data_start__/__data_end__: RAM address range that data should be
> + *      copied to. Both must be aligned to 4 bytes boundary.  */
> +
> +    ldr    r1, =__etext
> +    ldr    r2, =__data_start__
> +    ldr    r3, =__data_end__
> +
> +    subs    r3, r2
> +    ble     .LC0
> +
> +.LC1:
> +    subs    r3, 4
> +    ldr    r0, [r1,r3]
> +    str    r0, [r2,r3]
> +    bgt    .LC1
> +
> +.LC0:
> +
> +    LDR     R0, =__HeapBase
> +    LDR     R1, =__HeapLimit
> +    BL      _sbrkInit
> +
> +    LDR     R0, =SystemInit
> +    BLX     R0
> +
> +    LDR     R0, =_start
> +    BX      R0
> +
> +    .pool
> +    .cantunwind
> +    .fnend
> +    .size   Reset_Handler,.-Reset_Handler
> +
> +    .section ".text"
> +
> +
> +/* Dummy Exception Handlers (infinite loops which can be modified) */
> +
> +    .weak   NMI_Handler
> +    .type   NMI_Handler, %function
> +NMI_Handler:
> +    B       .
> +    .size   NMI_Handler, . - NMI_Handler
> +
> +
> +    .weak   HardFault_Handler
> +    .type   HardFault_Handler, %function
> +HardFault_Handler:
> +    B       .
> +    .size   HardFault_Handler, . - HardFault_Handler
> +
> +
> +    .weak   MemoryManagement_Handler
> +    .type   MemoryManagement_Handler, %function
> +MemoryManagement_Handler:
> +    B       .
> +    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
> +
> +
> +    .weak   BusFault_Handler
> +    .type   BusFault_Handler, %function
> +BusFault_Handler:
> +    B       .
> +    .size   BusFault_Handler, . - BusFault_Handler
> +
> +
> +    .weak   UsageFault_Handler
> +    .type   UsageFault_Handler, %function
> +UsageFault_Handler:
> +    B       .
> +    .size   UsageFault_Handler, . - UsageFault_Handler
> +
> +
> +    .weak   SVC_Handler
> +    .type   SVC_Handler, %function
> +SVC_Handler:
> +    B       .
> +    .size   SVC_Handler, . - SVC_Handler
> +
> +
> +    .weak   PendSV_Handler
> +    .type   PendSV_Handler, %function
> +PendSV_Handler:
> +    B       .
> +    .size   PendSV_Handler, . - PendSV_Handler
> +
> +
> +    .weak   SysTick_Handler
> +    .type   SysTick_Handler, %function
> +SysTick_Handler:
> +    B       .
> +    .size   SysTick_Handler, . - SysTick_Handler
> +
> +
> +/* IRQ Handlers */
> +
> +    .globl  Default_Handler
> +    .type   Default_Handler, %function
> +Default_Handler:
> +    B       .
> +    .size   Default_Handler, . - Default_Handler
> +
> +    .macro  IRQ handler
> +    .weak   \handler
> +    .set    \handler, Default_Handler
> +    .endm
> +
> +    IRQ  POWER_CLOCK_IRQHandler
> +    IRQ  RADIO_IRQHandler
> +    IRQ  UARTE0_UART0_IRQHandler
> +    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
> +    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
> +    IRQ  NFCT_IRQHandler
> +    IRQ  GPIOTE_IRQHandler
> +    IRQ  SAADC_IRQHandler
> +    IRQ  TIMER0_IRQHandler
> +    IRQ  TIMER1_IRQHandler
> +    IRQ  TIMER2_IRQHandler
> +    IRQ  RTC0_IRQHandler
> +    IRQ  TEMP_IRQHandler
> +    IRQ  RNG_IRQHandler
> +    IRQ  ECB_IRQHandler
> +    IRQ  CCM_AAR_IRQHandler
> +    IRQ  WDT_IRQHandler
> +    IRQ  RTC1_IRQHandler
> +    IRQ  QDEC_IRQHandler
> +    IRQ  COMP_LPCOMP_IRQHandler
> +    IRQ  SWI0_EGU0_IRQHandler
> +    IRQ  SWI1_EGU1_IRQHandler
> +    IRQ  SWI2_EGU2_IRQHandler
> +    IRQ  SWI3_EGU3_IRQHandler
> +    IRQ  SWI4_EGU4_IRQHandler
> +    IRQ  SWI5_EGU5_IRQHandler
> +    IRQ  TIMER3_IRQHandler
> +    IRQ  TIMER4_IRQHandler
> +    IRQ  PWM0_IRQHandler
> +    IRQ  PDM_IRQHandler
> +    IRQ  MWU_IRQHandler
> +    IRQ  PWM1_IRQHandler
> +    IRQ  PWM2_IRQHandler
> +    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
> +    IRQ  RTC2_IRQHandler
> +    IRQ  I2S_IRQHandler
> +
> +  .end
> diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
> b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
> new file mode 100755
> index 0000000..7426848
> --- /dev/null
> +++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
> @@ -0,0 +1,150 @@
> +/*
> +Copyright (c) 2015, Nordic Semiconductor ASA
> +All rights reserved.
> +
> +Redistribution and use in source and binary forms, with or without
> +modification, are permitted provided that the following conditions are
> met:
> +
> +* Redistributions of source code must retain the above copyright notice,
> this
> +  list of conditions and the following disclaimer.
> +
> +* Redistributions in binary form must reproduce the above copyright
> notice,
> +  this list of conditions and the following disclaimer in the
> documentation
> +  and/or other materials provided with the distribution.
> +
> +* Neither the name of Nordic Semiconductor ASA nor the names of its
> +  contributors may be used to endorse or promote products derived from
> +  this software without specific prior written permission.
> +
> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
> IS"
> +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE ARE
> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> LIABLE
> +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> LIABILITY,
> +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +*/
> +
> +/*
> +NOTE: Template files (including this one) are application specific and
> therefore
> +expected to be copied into the application project folder prior to its
> use!
> +*/
> +
> +    .syntax unified
> +    .arch armv7-m
> +    .section .stack
> +    .align 3
> +    .equ    Stack_Size, 432
> +    .globl    __StackTop
> +    .globl    __StackLimit
> +__StackLimit:
> +    .space    Stack_Size
> +    .size __StackLimit, . - __StackLimit
> +__StackTop:
> +    .size __StackTop, . - __StackTop
> +
> +    .section .heap
> +    .align 3
> +#ifdef __HEAP_SIZE
> +    .equ    Heap_Size, __HEAP_SIZE
> +#else
> +    .equ    Heap_Size, 0
> +#endif
> +    .globl    __HeapBase
> +    .globl    __HeapLimit
> +__HeapBase:
> +    .if    Heap_Size
> +    .space    Heap_Size
> +    .endif
> +    .size __HeapBase, . - __HeapBase
> +__HeapLimit:
> +    .size __HeapLimit, . - __HeapLimit
> +
> +    .section .isr_vector_split
> +    .align 2
> +    .globl __isr_vector_split
> +__isr_vector_split:
> +    .long    __StackTop            /* Top of Stack */
> +    .long   Reset_Handler_split               /* Reset Handler */
> +
> +    .size    __isr_vector_split, . - __isr_vector_split
> +
> +/* Reset Handler */
> +
> +    .text
> +    .thumb
> +    .thumb_func
> +    .align 1
> +    .globl    Reset_Handler_split
> +    .type    Reset_Handler_split, %function
> +Reset_Handler_split:
> +    .fnstart
> +
> +
> +/*     Loop to copy data from read only memory to RAM. The ranges
> + *      of copy from/to are specified by following symbols evaluated in
> + *      linker script.
> + *      __etext: End of code section, i.e., begin of data sections to
> copy from.
> + *      __data_start__/__data_end__: RAM address range that data should be
> + *      copied to. Both must be aligned to 4 bytes boundary.  */
> +
> +    ldr    r1, =__etext
> +    ldr    r2, =__data_start__
> +    ldr    r3, =__data_end__
> +
> +    subs    r3, r2
> +    ble     .LC0
> +
> +.LC1:
> +    subs    r3, 4
> +    ldr    r0, [r1,r3]
> +    str    r0, [r2,r3]
> +    bgt    .LC1
> +
> +.LC0:
> +    ldr    r1, =__etext_loader
> +    ldr    r2, =__data_start___loader
> +    ldr    r3, =__data_end___loader
> +
> +    subs    r3, r2
> +    ble     .LC2
> +
> +.LC3:
> +    subs    r3, 4
> +    ldr    r0, [r1,r3]
> +    str    r0, [r2,r3]
> +    bgt    .LC3
> +.LC2:
> +
> +    subs    r0, r0
> +    ldr    r2, =__bss_start___loader
> +    ldr    r3, =__bss_end___loader
> +
> +    subs    r3, r2
> +    ble     .LC4
> +
> +.LC5:
> +    subs    r3, 4
> +    str    r0, [r2,r3]
> +    bgt    .LC5
> +.LC4:
> +
> +    LDR     R0, =__HeapBase
> +    LDR     R1, =__HeapLimit
> +    BL      _sbrkInit
> +
> +    LDR     R0, =SystemInit
> +    BLX     R0
> +    LDR     R0, =_start
> +    BX      R0
> +
> +    .pool
> +    .cantunwind
> +    .fnend
> +    .size   Reset_Handler_split,.-Reset_Handler_split
> +
> +    .section ".text"
> +  .end
> diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
> b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
> deleted file mode 100755
> index fb804fd..0000000
> --- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
> +++ /dev/null
> @@ -1,289 +0,0 @@
> -/*
> -Copyright (c) 2015, Nordic Semiconductor ASA
> -All rights reserved.
> -
> -Redistribution and use in source and binary forms, with or without
> -modification, are permitted provided that the following conditions are
> met:
> -
> -* Redistributions of source code must retain the above copyright notice,
> this
> -  list of conditions and the following disclaimer.
> -
> -* Redistributions in binary form must reproduce the above copyright
> notice,
> -  this list of conditions and the following disclaimer in the
> documentation
> -  and/or other materials provided with the distribution.
> -
> -* Neither the name of Nordic Semiconductor ASA nor the names of its
> -  contributors may be used to endorse or promote products derived from
> -  this software without specific prior written permission.
> -
> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
> IS"
> -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE ARE
> -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> LIABLE
> -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
> -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> LIABILITY,
> -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
> -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> -*/
> -
> -/*
> -NOTE: Template files (including this one) are application specific and
> therefore
> -expected to be copied into the application project folder prior to its
> use!
> -*/
> -
> -    .syntax unified
> -    .arch armv7-m
> -
> -    .section .stack
> -    .align 3
> -    .equ    Stack_Size, 432
> -    .globl    __StackTop
> -    .globl    __StackLimit
> -__StackLimit:
> -    .space    Stack_Size
> -    .size __StackLimit, . - __StackLimit
> -__StackTop:
> -    .size __StackTop, . - __StackTop
> -
> -    .section .heap
> -    .align 3
> -#ifdef __HEAP_SIZE
> -    .equ    Heap_Size, __HEAP_SIZE
> -#else
> -    .equ    Heap_Size, 0
> -#endif
> -    .globl    __HeapBase
> -    .globl    __HeapLimit
> -__HeapBase:
> -    .if    Heap_Size
> -    .space    Heap_Size
> -    .endif
> -    .size __HeapBase, . - __HeapBase
> -__HeapLimit:
> -    .size __HeapLimit, . - __HeapLimit
> -
> -    .section .isr_vector
> -    .align 2
> -    .globl __isr_vector
> -__isr_vector:
> -    .long    __StackTop            /* Top of Stack */
> -    .long   Reset_Handler               /* Reset Handler */
> -    .long   NMI_Handler                 /* NMI Handler */
> -    .long   HardFault_Handler           /* Hard Fault Handler */
> -    .long   0                           /* Reserved */
> -    .long   0                           /* Reserved */
> -    .long   0                           /* Reserved */
> -    .long   0                           /* Reserved */
> -    .long   0                           /* Reserved */
> -    .long   0                           /* Reserved */
> -    .long   0                           /* Reserved */
> -    .long   SVC_Handler                 /* SVCall Handler */
> -    .long   0                           /* Reserved */
> -    .long   0                           /* Reserved */
> -    .long   PendSV_Handler              /* PendSV Handler */
> -    .long   SysTick_Handler             /* SysTick Handler */
> -
> -  /* External Interrupts */
> -    .long   POWER_CLOCK_IRQHandler
> -    .long   RADIO_IRQHandler
> -    .long   UARTE0_UART0_IRQHandler
> -    .long   SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
> -    .long   SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
> -    .long   NFCT_IRQHandler
> -    .long   GPIOTE_IRQHandler
> -    .long   SAADC_IRQHandler
> -    .long   TIMER0_IRQHandler
> -    .long   TIMER1_IRQHandler
> -    .long   TIMER2_IRQHandler
> -    .long   RTC0_IRQHandler
> -    .long   TEMP_IRQHandler
> -    .long   RNG_IRQHandler
> -    .long   ECB_IRQHandler
> -    .long   CCM_AAR_IRQHandler
> -    .long   WDT_IRQHandler
> -    .long   RTC1_IRQHandler
> -    .long   QDEC_IRQHandler
> -    .long   COMP_LPCOMP_IRQHandler
> -    .long   SWI0_EGU0_IRQHandler
> -    .long   SWI1_EGU1_IRQHandler
> -    .long   SWI2_EGU2_IRQHandler
> -    .long   SWI3_EGU3_IRQHandler
> -    .long   SWI4_EGU4_IRQHandler
> -    .long   SWI5_EGU5_IRQHandler
> -    .long   TIMER3_IRQHandler
> -    .long   TIMER4_IRQHandler
> -    .long   PWM0_IRQHandler
> -    .long   PDM_IRQHandler
> -    .long   0                         /*Reserved */
> -    .long   0                         /*Reserved */
> -    .long   MWU_IRQHandler
> -    .long   PWM1_IRQHandler
> -    .long   PWM2_IRQHandler
> -    .long   SPIM2_SPIS2_SPI2_IRQHandler
> -    .long   RTC2_IRQHandler
> -    .long   I2S_IRQHandler
> -
> -    .size    __isr_vector, . - __isr_vector
> -
> -/* Reset Handler */
> -
> -    .text
> -    .thumb
> -    .thumb_func
> -    .align 1
> -    .globl    Reset_Handler
> -    .type    Reset_Handler, %function
> -Reset_Handler:
> -    .fnstart
> -
> -/*     Loop to copy data from read only memory to RAM. The ranges
> - *      of copy from/to are specified by following symbols evaluated in
> - *      linker script.
> - *      __etext: End of code section, i.e., begin of data sections to
> copy from.
> - *      __data_start__/__data_end__: RAM address range that data should be
> - *      copied to. Both must be aligned to 4 bytes boundary.  */
> -
> -    ldr    r1, =__etext
> -    ldr    r2, =__data_start__
> -    ldr    r3, =__data_end__
> -
> -    subs    r3, r2
> -    ble     .LC0
> -
> -.LC1:
> -    subs    r3, 4
> -    ldr    r0, [r1,r3]
> -    str    r0, [r2,r3]
> -    bgt    .LC1
> -
> -.LC0:
> -
> -    LDR     R0, =__HeapBase
> -    LDR     R1, =__HeapLimit
> -    BL      _sbrkInit
> -
> -    LDR     R0, =SystemInit
> -    BLX     R0
> -
> -    LDR     R0, =_start
> -    BX      R0
> -
> -    .pool
> -    .cantunwind
> -    .fnend
> -    .size   Reset_Handler,.-Reset_Handler
> -
> -    .section ".text"
> -
> -
> -/* Dummy Exception Handlers (infinite loops which can be modified) */
> -
> -    .weak   NMI_Handler
> -    .type   NMI_Handler, %function
> -NMI_Handler:
> -    B       .
> -    .size   NMI_Handler, . - NMI_Handler
> -
> -
> -    .weak   HardFault_Handler
> -    .type   HardFault_Handler, %function
> -HardFault_Handler:
> -    B       .
> -    .size   HardFault_Handler, . - HardFault_Handler
> -
> -
> -    .weak   MemoryManagement_Handler
> -    .type   MemoryManagement_Handler, %function
> -MemoryManagement_Handler:
> -    B       .
> -    .size   MemoryManagement_Handler, . - MemoryManagement_Handler
> -
> -
> -    .weak   BusFault_Handler
> -    .type   BusFault_Handler, %function
> -BusFault_Handler:
> -    B       .
> -    .size   BusFault_Handler, . - BusFault_Handler
> -
> -
> -    .weak   UsageFault_Handler
> -    .type   UsageFault_Handler, %function
> -UsageFault_Handler:
> -    B       .
> -    .size   UsageFault_Handler, . - UsageFault_Handler
> -
> -
> -    .weak   SVC_Handler
> -    .type   SVC_Handler, %function
> -SVC_Handler:
> -    B       .
> -    .size   SVC_Handler, . - SVC_Handler
> -
> -
> -    .weak   PendSV_Handler
> -    .type   PendSV_Handler, %function
> -PendSV_Handler:
> -    B       .
> -    .size   PendSV_Handler, . - PendSV_Handler
> -
> -
> -    .weak   SysTick_Handler
> -    .type   SysTick_Handler, %function
> -SysTick_Handler:
> -    B       .
> -    .size   SysTick_Handler, . - SysTick_Handler
> -
> -
> -/* IRQ Handlers */
> -
> -    .globl  Default_Handler
> -    .type   Default_Handler, %function
> -Default_Handler:
> -    B       .
> -    .size   Default_Handler, . - Default_Handler
> -
> -    .macro  IRQ handler
> -    .weak   \handler
> -    .set    \handler, Default_Handler
> -    .endm
> -
> -    IRQ  POWER_CLOCK_IRQHandler
> -    IRQ  RADIO_IRQHandler
> -    IRQ  UARTE0_UART0_IRQHandler
> -    IRQ  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
> -    IRQ  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
> -    IRQ  NFCT_IRQHandler
> -    IRQ  GPIOTE_IRQHandler
> -    IRQ  SAADC_IRQHandler
> -    IRQ  TIMER0_IRQHandler
> -    IRQ  TIMER1_IRQHandler
> -    IRQ  TIMER2_IRQHandler
> -    IRQ  RTC0_IRQHandler
> -    IRQ  TEMP_IRQHandler
> -    IRQ  RNG_IRQHandler
> -    IRQ  ECB_IRQHandler
> -    IRQ  CCM_AAR_IRQHandler
> -    IRQ  WDT_IRQHandler
> -    IRQ  RTC1_IRQHandler
> -    IRQ  QDEC_IRQHandler
> -    IRQ  COMP_LPCOMP_IRQHandler
> -    IRQ  SWI0_EGU0_IRQHandler
> -    IRQ  SWI1_EGU1_IRQHandler
> -    IRQ  SWI2_EGU2_IRQHandler
> -    IRQ  SWI3_EGU3_IRQHandler
> -    IRQ  SWI4_EGU4_IRQHandler
> -    IRQ  SWI5_EGU5_IRQHandler
> -    IRQ  TIMER3_IRQHandler
> -    IRQ  TIMER4_IRQHandler
> -    IRQ  PWM0_IRQHandler
> -    IRQ  PDM_IRQHandler
> -    IRQ  MWU_IRQHandler
> -    IRQ  PWM1_IRQHandler
> -    IRQ  PWM2_IRQHandler
> -    IRQ  SPIM2_SPIS2_SPI2_IRQHandler
> -    IRQ  RTC2_IRQHandler
> -    IRQ  I2S_IRQHandler
> -
> -  .end
> diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
> b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
> deleted file mode 100755
> index 7426848..0000000
> --- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
> +++ /dev/null
> @@ -1,150 +0,0 @@
> -/*
> -Copyright (c) 2015, Nordic Semiconductor ASA
> -All rights reserved.
> -
> -Redistribution and use in source and binary forms, with or without
> -modification, are permitted provided that the following conditions are
> met:
> -
> -* Redistributions of source code must retain the above copyright notice,
> this
> -  list of conditions and the following disclaimer.
> -
> -* Redistributions in binary form must reproduce the above copyright
> notice,
> -  this list of conditions and the following disclaimer in the
> documentation
> -  and/or other materials provided with the distribution.
> -
> -* Neither the name of Nordic Semiconductor ASA nor the names of its
> -  contributors may be used to endorse or promote products derived from
> -  this software without specific prior written permission.
> -
> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
> IS"
> -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE ARE
> -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> LIABLE
> -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
> -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> LIABILITY,
> -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
> -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> -*/
> -
> -/*
> -NOTE: Template files (including this one) are application specific and
> therefore
> -expected to be copied into the application project folder prior to its
> use!
> -*/
> -
> -    .syntax unified
> -    .arch armv7-m
> -    .section .stack
> -    .align 3
> -    .equ    Stack_Size, 432
> -    .globl    __StackTop
> -    .globl    __StackLimit
> -__StackLimit:
> -    .space    Stack_Size
> -    .size __StackLimit, . - __StackLimit
> -__StackTop:
> -    .size __StackTop, . - __StackTop
> -
> -    .section .heap
> -    .align 3
> -#ifdef __HEAP_SIZE
> -    .equ    Heap_Size, __HEAP_SIZE
> -#else
> -    .equ    Heap_Size, 0
> -#endif
> -    .globl    __HeapBase
> -    .globl    __HeapLimit
> -__HeapBase:
> -    .if    Heap_Size
> -    .space    Heap_Size
> -    .endif
> -    .size __HeapBase, . - __HeapBase
> -__HeapLimit:
> -    .size __HeapLimit, . - __HeapLimit
> -
> -    .section .isr_vector_split
> -    .align 2
> -    .globl __isr_vector_split
> -__isr_vector_split:
> -    .long    __StackTop            /* Top of Stack */
> -    .long   Reset_Handler_split               /* Reset Handler */
> -
> -    .size    __isr_vector_split, . - __isr_vector_split
> -
> -/* Reset Handler */
> -
> -    .text
> -    .thumb
> -    .thumb_func
> -    .align 1
> -    .globl    Reset_Handler_split
> -    .type    Reset_Handler_split, %function
> -Reset_Handler_split:
> -    .fnstart
> -
> -
> -/*     Loop to copy data from read only memory to RAM. The ranges
> - *      of copy from/to are specified by following symbols evaluated in
> - *      linker script.
> - *      __etext: End of code section, i.e., begin of data sections to
> copy from.
> - *      __data_start__/__data_end__: RAM address range that data should be
> - *      copied to. Both must be aligned to 4 bytes boundary.  */
> -
> -    ldr    r1, =__etext
> -    ldr    r2, =__data_start__
> -    ldr    r3, =__data_end__
> -
> -    subs    r3, r2
> -    ble     .LC0
> -
> -.LC1:
> -    subs    r3, 4
> -    ldr    r0, [r1,r3]
> -    str    r0, [r2,r3]
> -    bgt    .LC1
> -
> -.LC0:
> -    ldr    r1, =__etext_loader
> -    ldr    r2, =__data_start___loader
> -    ldr    r3, =__data_end___loader
> -
> -    subs    r3, r2
> -    ble     .LC2
> -
> -.LC3:
> -    subs    r3, 4
> -    ldr    r0, [r1,r3]
> -    str    r0, [r2,r3]
> -    bgt    .LC3
> -.LC2:
> -
> -    subs    r0, r0
> -    ldr    r2, =__bss_start___loader
> -    ldr    r3, =__bss_end___loader
> -
> -    subs    r3, r2
> -    ble     .LC4
> -
> -.LC5:
> -    subs    r3, 4
> -    str    r0, [r2,r3]
> -    bgt    .LC5
> -.LC4:
> -
> -    LDR     R0, =__HeapBase
> -    LDR     R1, =__HeapLimit
> -    BL      _sbrkInit
> -
> -    LDR     R0, =SystemInit
> -    BLX     R0
> -    LDR     R0, =_start
> -    BX      R0
> -
> -    .pool
> -    .cantunwind
> -    .fnend
> -    .size   Reset_Handler_split,.-Reset_Handler_split
> -
> -    .section ".text"
> -  .end
> --
> 2.7.4
>
>