You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The startup script bootloader_startup_nrf51.s doesn't work for me and looks a bit old.
What do I have to do to make it work ?
This is mine :
/*Copyright (c) 2013, Nordic Semiconductor ASAAll rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, 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, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*//*NOTE: Template files (including this one) are application specific and thereforeexpected to be copied into the application project folder prior to its use!*/
.syntaxunified
.archarmv7-m
.section .stack
.align3#ifdef__STACK_SIZE
.equStack_Size, __STACK_SIZE#else
.equStack_Size, 2048#endif
.globl__StackTop
.globl__StackLimit__StackLimit:
.spaceStack_Size
.size__StackLimit, . -__StackLimit__StackTop:
.size__StackTop, . -__StackTop
.section .heap
.align3#ifdef__HEAP_SIZE
.equHeap_Size, __HEAP_SIZE#else
.equHeap_Size, 2048#endif
.globl__HeapBase
.globl__HeapLimit__HeapBase:
.ifHeap_Size
.spaceHeap_Size
.endif
.size__HeapBase, . -__HeapBase__HeapLimit:
.size__HeapLimit, . -__HeapLimit
.section .Vectors
.align2
.globl__Vectors__Vectors:
.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/*POWER_CLOCK */
.long RADIO_IRQHandler/*RADIO */
.long UART0_IRQHandler/*UART0 */
.long SPI0_TWI0_IRQHandler/*SPI0_TWI0 */
.long SPI1_TWI1_IRQHandler/*SPI1_TWI1 */
.long 0/*Reserved */
.long GPIOTE_IRQHandler/*GPIOTE */
.long ADC_IRQHandler/*ADC */
.long TIMER0_IRQHandler/*TIMER0 */
.long TIMER1_IRQHandler/*TIMER1 */
.long TIMER2_IRQHandler/*TIMER2 */
.long RTC0_IRQHandler/*RTC0 */
.long TEMP_IRQHandler/*TEMP */
.long RNG_IRQHandler/*RNG */
.long ECB_IRQHandler/*ECB */
.long CCM_AAR_IRQHandler/*CCM_AAR */
.long WDT_IRQHandler/*WDT */
.long RTC1_IRQHandler/*RTC1 */
.long QDEC_IRQHandler/*QDEC */
.long LPCOMP_IRQHandler/*LPCOMP */
.long SWI0_IRQHandler/*SWI0 */
.long SWI1_IRQHandler/*SWI1 */
.long SWI2_IRQHandler/*SWI2 */
.long SWI3_IRQHandler/*SWI3 */
.long SWI4_IRQHandler/*SWI4 */
.long SWI5_IRQHandler/*SWI5 */
.long 0/*Reserved */
.long 0/*Reserved */
.long 0/*Reserved */
.long 0/*Reserved */
.long 0/*Reserved */
.long 0/*Reserved */
.size__Vectors, . -__Vectors/* Reset Handler */
.equNRF_POWER_RAMON_ADDRESS, 0x40000524
.equNRF_POWER_RAMONB_ADDRESS, 0x40000554
.equNRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
.text
.thumb
.thumb_func
.align1
.globlReset_Handler
.typeReset_Handler, %functionReset_Handler:
.fnstart/* Make sure ALL RAM banks are powered on */MOVSR1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
LDR R0, =NRF_POWER_RAMON_ADDRESS
LDRR2, [R0]
ORRSR2, R1STRR2, [R0]
LDRR0, =NRF_POWER_RAMONB_ADDRESSLDRR2, [R0]
ORRSR2, R1STRR2, [R0]
/* 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. */ldrr1, =__etextldrr2, =__data_start__ldrr3, =__data_end__subsr3, r2ble .LC0
.LC1:
subsr3, 4ldrr0, [r1,r3]
strr0, [r2,r3]
bgt .LC1
.LC0:
LDRR0, =SystemInitBLXR0LDRR0, =_startBXR0
.pool
.cantunwind
.fnend
.sizeReset_Handler,.-Reset_Handler
.section".text"/* Dummy Exception Handlers (infinite loops which can be modified) */
.weakNMI_Handler
.typeNMI_Handler, %function
NMI_Handler:
B .
.sizeNMI_Handler, . -NMI_Handler
.weakHardFault_Handler
.typeHardFault_Handler, %function
HardFault_Handler:
B .
.sizeHardFault_Handler, . -HardFault_Handler
.weakSVC_Handler
.typeSVC_Handler, %function
SVC_Handler:
B .
.sizeSVC_Handler, . -SVC_Handler
.weakPendSV_Handler
.typePendSV_Handler, %function
PendSV_Handler:
B .
.sizePendSV_Handler, . -PendSV_Handler
.weakSysTick_Handler
.typeSysTick_Handler, %function
SysTick_Handler:
B .
.sizeSysTick_Handler, . -SysTick_Handler/* IRQ Handlers */
.globlDefault_Handler
.typeDefault_Handler, %function
Default_Handler:
B .
.sizeDefault_Handler, . -Default_Handler
.macroIRQhandler
.weak \handler
.set \handler, Default_Handler
.endmIRQPOWER_CLOCK_IRQHandlerIRQRADIO_IRQHandlerIRQUART0_IRQHandlerIRQSPI0_TWI0_IRQHandlerIRQSPI1_TWI1_IRQHandlerIRQGPIOTE_IRQHandlerIRQADC_IRQHandlerIRQTIMER0_IRQHandlerIRQTIMER1_IRQHandlerIRQTIMER2_IRQHandlerIRQRTC0_IRQHandlerIRQTEMP_IRQHandlerIRQRNG_IRQHandlerIRQECB_IRQHandlerIRQCCM_AAR_IRQHandlerIRQWDT_IRQHandlerIRQRTC1_IRQHandlerIRQQDEC_IRQHandlerIRQLPCOMP_IRQHandlerIRQSWI0_IRQHandlerIRQSWI1_IRQHandlerIRQSWI2_IRQHandlerIRQSWI3_IRQHandlerIRQSWI4_IRQHandlerIRQSWI5_IRQHandler
.end
The text was updated successfully, but these errors were encountered:
The startup script bootloader_startup_nrf51.s doesn't work for me and looks a bit old.
What do I have to do to make it work ?
This is mine :
The text was updated successfully, but these errors were encountered: