mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 01:20:19 +00:00
tusb_verify: add riscv assert support
This simply executes an "ebreak" instruction. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
ef07427e06
commit
359189ea2d
@ -89,9 +89,13 @@
|
|||||||
volatile uint32_t* ARM_CM_DHCSR = ((volatile uint32_t*) 0xE000EDF0UL); /* Cortex M CoreDebug->DHCSR */ \
|
volatile uint32_t* ARM_CM_DHCSR = ((volatile uint32_t*) 0xE000EDF0UL); /* Cortex M CoreDebug->DHCSR */ \
|
||||||
if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n"); /* Only halt mcu if debugger is attached */ \
|
if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n"); /* Only halt mcu if debugger is attached */ \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
#else
|
||||||
|
#if defined(__riscv)
|
||||||
|
#define TU_BREAKPOINT() do { __asm("ebreak\n"); } while(0)
|
||||||
#else
|
#else
|
||||||
#define TU_BREAKPOINT()
|
#define TU_BREAKPOINT()
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* Macro Generator
|
/* Macro Generator
|
||||||
|
Loading…
x
Reference in New Issue
Block a user