diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-12-14 07:51:19 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-12-14 07:51:19 +0100 |
commit | c2aae4ccb63158f197c3d0629082e7699dfe8e25 (patch) | |
tree | 647d7de9bf61552bfc89b0a736f68caada92611c /init.s | |
parent | afbb4cc73c44b6321cae39dbe46b97155805097d (diff) | |
download | stm32f103-playground-c2aae4ccb63158f197c3d0629082e7699dfe8e25.tar.gz stm32f103-playground-c2aae4ccb63158f197c3d0629082e7699dfe8e25.tar.bz2 stm32f103-playground-c2aae4ccb63158f197c3d0629082e7699dfe8e25.tar.xz stm32f103-playground-c2aae4ccb63158f197c3d0629082e7699dfe8e25.zip |
correct linking, putting the assembly code in .text with proper linking script made ld recognise the functions as thumb instructions.
Diffstat (limited to 'init.s')
-rw-r--r-- | init.s | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -1,12 +1,14 @@ -; https://github.com/dwelch67/stm32_samples -; http://stackoverflow.com/questions/9565921/cortex-m3-initialisation +/* +https://github.com/dwelch67/stm32_samples +http://stackoverflow.com/questions/9565921/cortex-m3-initialisation +*/ .syntax unified .cpu cortex-m3 .thumb -.section isr_vectors -.thumb_func +.section .isr_vectors + .global vectors vectors: stacktop: .word 0x20001000 @@ -26,9 +28,8 @@ stacktop: .word 0x20001000 .word hang2 .word hang2 -.global fault_code -fault_code: -.word 0 +/* VERY significant */ +.section .text .thumb_func .global _Reset_Handler @@ -42,7 +43,6 @@ hang2: .thumb_func NMI_Handler: - movs r0, #1 b hang2 .thumb_func @@ -55,15 +55,14 @@ HardFault_Handler: .thumb_func MemManage_Handler: - movs r0, #3 b hang2 .thumb_func BusFault_Handler: - movs r0, #4 b hang2 .thumb_func UsageFault_Handler: - mov r0, #5 b hang2 + +.end |