Skip to content

Commit 87e2030

Browse files
fabiobaltierikartben
authored andcommitted
drivers: dp: fix build on M0 MCUs
Current code does not build on Cortex-M0, seems like it does not like subs: Error: instruction not supported in Thumb16 mode -- `subs r3,#1' Adding a unified assembler language declaration in the snippet seems to fix the problem, also add an M0+ board so this is tested in CI. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
1 parent 5a338ff commit 87e2030

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/dp/swdp_ll_pin.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
static ALWAYS_INLINE void pin_delay_asm(uint32_t delay)
1212
{
1313
#if defined(CONFIG_CPU_CORTEX_M)
14-
__asm volatile ("movs r3, %[p]\n"
14+
__asm volatile (".syntax unified\n"
15+
"movs r3, %[p]\n"
1516
".start_%=:\n"
1617
"subs r3, #1\n"
1718
"bne .start_%=\n"

samples/subsys/dap/sample.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ tests:
99
platform_allow:
1010
- nrf52840dk/nrf52840
1111
- frdm_k64f
12+
- nucleo_c071rb
1213
tags: dap

0 commit comments

Comments
 (0)