From a25b9fa1ab68d7b37dd5bd5ed727607e3315f4a0 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Tue, 28 Oct 2014 15:30:59 -0700 Subject: usb: fix undefined USB endpoints When calling the ep_undefined function, the linker was not considering it as a Thumb function and not setting the LSB in the address pointer. This was causing an exception at runtime. Signed-off-by: Vincent Palatin BRANCH=all BUG=none TEST=inspect assembly Change-Id: I8f4d1e351081032e138f593f0b61294031fc09b1 Reviewed-on: https://chromium-review.googlesource.com/226093 Reviewed-by: Vincent Palatin Commit-Queue: Vincent Palatin Tested-by: Vincent Palatin --- chip/stm32/usb_endpoints.S | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/chip/stm32/usb_endpoints.S b/chip/stm32/usb_endpoints.S index 831b4a8dee..0c950ccbe1 100644 --- a/chip/stm32/usb_endpoints.S +++ b/chip/stm32/usb_endpoints.S @@ -25,10 +25,6 @@ .endif .endm -ep_undefined: -iface_undefined: - bx lr - /* align function pointers on a 32-bit boundary */ .align 2 /* Endpoint callbacks */ @@ -99,3 +95,11 @@ interface 4 interface 5 interface 6 interface 7 + +.text +.code 16 + +.thumb_func +ep_undefined: +iface_undefined: + bx lr -- cgit v1.2.1