diff --git a/src/device/arm/cortexm.s b/src/device/arm/cortexm.s index 29d6a269..3335c4c9 100644 --- a/src/device/arm/cortexm.s +++ b/src/device/arm/cortexm.s @@ -19,3 +19,12 @@ HardFault_Handler: // Continue handling this error in Go. bl handleHardFault + +// This is a convenience function for semihosting support. +// At some point, this should be replaced by inline assembly. +.section .text.SemihostingCall +.global SemihostingCall +.type SemihostingCall, %function +SemihostingCall: + bkpt 0xab + bx lr diff --git a/targets/cortex-m.s b/targets/cortex-m.s index 595ff56f..96aaafb1 100644 --- a/targets/cortex-m.s +++ b/targets/cortex-m.s @@ -3,15 +3,6 @@ .syntax unified -// This is a convenience function for QEMU semihosting support. -// At some point, this should be replaced by inline assembly. -.section .text.SemihostingCall -.global SemihostingCall -.type SemihostingCall, %function -SemihostingCall: - bkpt 0xab - bx lr - // This is the default handler for interrupts, if triggered but not defined. .section .text.Default_Handler .global Default_Handler