Hello!
I released the new real-time binary data logging/tracing toolkit a few weeks ago - see the RTEdbg on Github. The toolkit is ready for use on devices with an ARM Cortex-M core. I have added two new drivers that allow it to be used on non-ARM 32-bit devices and checked the compatibility of the data logging library with FreeRTOS before releasing the updated version.
I have a few questions and hope to get answers here, as I expect that some low-level programmers are following the FreeRTOS/Kernel discussions.
Things regarding re-entrancy are pretty straightforward if the CPU core supports mutex (atomic) instructions. I think I also understand how to do this for processor cores like ARM Cortex M0/M0+/M23 that do not support atomic operations. These CPU cores do not allow a non-privileged (normal) task to disable/enable interrupts using the CPS instruction. To check everything, I created a mini-project for an ARM Cortex M0+ based STM32 device using STM32CubeMX. While playing with (debugging) this project, I noticed that
- the FreeRTOS port for the Cortex M0 executes all tasks in privileged mode (the CPS instruction runs normally), and
- the portPRIVILEGE_BIT is not used at all in the Cortex M0 version.
If I could use CPS instructions in my logging implementation for these processor families, it would simplify and speed up data logging compared to the version that also requires checking the values of the CONTROL and IPSR processor registers.
My questions are:
- Is the interrupt enable/disable (task always executed in privileged mode) only possible for the ARM Cortex M0 FreeRTOS port implementation or is it general for all CPU cores where the interrupts have to be temporarily disabled for the atomic operations? Are such details described somewhere (PDF file, web page, …)?
- Is there an existing project (preferably for an STM32 device, e.g. M0, M4, M7) that implements either all or at least most of the logging macros (FreeRTOS Trace Hook Macros)? I want to focus on the design of the macros themselves and not on writing an application to test FreeRTOS activity logging.
Best regards,
Branko