Page 1 of 1
cmsis-rtos
Posted: Mon Jun 11, 2018 9:16 am
by maxzen
Hello all,
we would like to use cmsis-rtos to interface with freertos
For every XXX() api freertos has also the XXXFromISR() version: so we need to know if there is an intrinsic that tell us if we are inside an interrupt handler, something like __get_IPSR() for cortex processors
Thank you
Max
Re: cmsis-rtos
Posted: Mon Jun 11, 2018 9:53 am
by WiFive
Re: cmsis-rtos
Posted: Wed Jun 13, 2018 9:56 am
by maxzen
Thank you WiFive,
what about __BKPT()? Does esp32 have a similar instruction?
Re: cmsis-rtos
Posted: Thu Jun 14, 2018 7:50 am
by ESP_igrr
__asm__ ("break 0,0");
should break into debugger if OCD is enabled, and raise DebugException if not.
Re: cmsis-rtos
Posted: Thu Jun 14, 2018 8:03 am
by maxzen
Thank you ESP_igrr,
now I can complete my macros:
Code: Select all
#ifdef NDEBUG
# define CHECK_IT(a) (void)(a)
# define BPOINT
#else
# define CHECK_IT(a) assert(a)
# define BPOINT __asm__("break 0,0")
#endif
Re: cmsis-rtos
Posted: Thu Jun 14, 2018 8:37 am
by michprev
ESP_igrr wrote:__asm__ ("break 0,0");
should break into debugger if OCD is enabled, and raise DebugException if not.
By the way is there any support in OpenOCD / gdb to step over break instruction once reached?
EDIT:
Found
https://github.com/espressif/openocd-esp32/issues/2