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>
This commit is contained in:
Fabio Baltieri 2025-05-09 17:40:59 +01:00 committed by Benjamin Cabé
commit 87e20308bd
2 changed files with 3 additions and 1 deletions

View file

@ -11,7 +11,8 @@
static ALWAYS_INLINE void pin_delay_asm(uint32_t delay)
{
#if defined(CONFIG_CPU_CORTEX_M)
__asm volatile ("movs r3, %[p]\n"
__asm volatile (".syntax unified\n"
"movs r3, %[p]\n"
".start_%=:\n"
"subs r3, #1\n"
"bne .start_%=\n"

View file

@ -9,4 +9,5 @@ tests:
platform_allow:
- nrf52840dk/nrf52840
- frdm_k64f
- nucleo_c071rb
tags: dap