From 2155ab2b72cc4f076dc0a25d0e3a5fdd4d218998 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 15 Jan 2017 15:04:02 +0100 Subject: o Adding a generic binutils part for creating the info files (.nm, disassembly, size, hex and bin files.) o Adding initial support for STM32F103xx chips. Can easily be expanded to all at least the F1 series. --- stm32f103/src/init_low.s | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 stm32f103/src/init_low.s (limited to 'stm32f103/src/init_low.s') diff --git a/stm32f103/src/init_low.s b/stm32f103/src/init_low.s new file mode 100644 index 0000000..b666ed4 --- /dev/null +++ b/stm32f103/src/init_low.s @@ -0,0 +1,47 @@ +.syntax unified +.cpu cortex-m3 +.thumb + +.section .text + +.thumb_func +.global _Reset_Handler +_Reset_Handler: + bl init_high + b halt + +.thumb_func +.global halt +halt: + b . + +.thumb_func +.global NMI_Handler +NMI_Handler: + b halt + +.thumb_func +.global HardFault_Handler +HardFault_Handler: + tst lr, #4 + ite eq + mrseq r0, msp + mrsne r0, psp + b HardFault_Handler_C + +.thumb_func +.global MemManage_Handler +MemManage_Handler: + b halt + +.thumb_func +.global BusFault_Handler +BusFault_Handler: + b halt + +.thumb_func +.global UsageFault_Handler +UsageFault_Handler: + b halt + +.end -- cgit v1.2.3