cmsis-rtos

maxzen
Posts: 15
Joined: Fri Jun 08, 2018 11:56 am

cmsis-rtos

Postby maxzen » Mon Jun 11, 2018 9:16 am

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

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: cmsis-rtos

Postby WiFive » Mon Jun 11, 2018 9:53 am


maxzen
Posts: 15
Joined: Fri Jun 08, 2018 11:56 am

Re: cmsis-rtos

Postby maxzen » Wed Jun 13, 2018 9:56 am

Thank you WiFive,

what about __BKPT()? Does esp32 have a similar instruction?

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: cmsis-rtos

Postby ESP_igrr » Thu Jun 14, 2018 7:50 am

__asm__ ("break 0,0");

should break into debugger if OCD is enabled, and raise DebugException if not.

maxzen
Posts: 15
Joined: Fri Jun 08, 2018 11:56 am

Re: cmsis-rtos

Postby maxzen » Thu Jun 14, 2018 8:03 am

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

michprev
Posts: 92
Joined: Fri Aug 04, 2017 8:57 pm

Re: cmsis-rtos

Postby michprev » Thu Jun 14, 2018 8:37 am

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

Who is online

Users browsing this forum: No registered users and 101 guests