aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-10-26 16:52:16 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-10-26 16:56:33 -0400
commit2ecc8d8f62b40c3b241d8091220fbe959d9b67ee (patch)
treec09b2d6f28287c555b822ed15d709c6a1003ed39
parent5da6a62759be14554702be681dc36fe8809769f2 (diff)
downloadkutter-2ecc8d8f62b40c3b241d8091220fbe959d9b67ee.tar.gz
kutter-2ecc8d8f62b40c3b241d8091220fbe959d9b67ee.tar.xz
kutter-2ecc8d8f62b40c3b241d8091220fbe959d9b67ee.zip
stm32: stm32f4 usb boot check only needed when CONFIG_USBSERIAL
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/stm32/stm32f4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stm32/stm32f4.c b/src/stm32/stm32f4.c
index 92c40b22..0c87201a 100644
--- a/src/stm32/stm32f4.c
+++ b/src/stm32/stm32f4.c
@@ -209,10 +209,10 @@ clock_setup(void)
void
armcm_main(void)
{
- if (*(uint64_t*)USB_BOOT_FLAG_ADDR == USB_BOOT_FLAG) {
+ if (CONFIG_USBSERIAL && *(uint64_t*)USB_BOOT_FLAG_ADDR == USB_BOOT_FLAG) {
*(uint64_t*)USB_BOOT_FLAG_ADDR = 0;
uint32_t *sysbase = (uint32_t*)0x1fff0000;
- asm volatile("mov sp, %r0\n bx %r1"
+ asm volatile("mov sp, %0\n bx %1"
: : "r"(sysbase[0]), "r"(sysbase[1]));
}