This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi QJ and Jagadish,
Thanks for your help in the past few days, it is very appreciated.
I finally found out why in "Streaming mode", Segger SystemView makes the TI FreeRTOS port fail.
When we hit "play", an ISR is raised (the CPU is in IRQ mode) to start the recording session.
The problem is: The SEGGER_SYSVIEW_Start function calls MPU_uxTaskGetStackHighWaterMark which ends up resetting to User mode, generating a permission abort.
Here's a video showcasing the problem
Here's the proof that it's a privilege problem using CP15
In your opinion, what would be the best way to solve this problem?
Best regards,
Gabriel
Yes you are correct. The FSR=0x0D means the abort is caused by permission. The process in user mode is not allowed to access the system resources directly.
I don't know the FreeRTOS ported by Segger. I noticed that the mode is witched to User Mode in an IRQ interrupt (HW interrupt) service routine.
If the mode is switched to user mode in IRQ ISR, the UNDEF exception will be generated when exiting the IRQ ISR.
I don't know the FreeRTOS ported by Segger
To be clear: I'm using the TI port.
The problem is the TI way of porting FreeRTOS is different than most FreeRTOS port.
The problem comes from integrating the TI port with Segger SytemView.
If the mode is switched to user mode in IRQ ISR, the UNDEF exception will be generated when exiting the IRQ ISR
I think this is what I'm observing.
Is it possible to modify the portRAISE_PRIVILEGE() and portRESET_PRIVILEGE() macro to consider this scenario?
It would be great if the `portRESET_PRIVILEGE()` would instead just restore the previous mode, instead of setting it to UserMode.
You can try to comment out the portRESET_PRIVILEGE(...) (line 602) in the following function and too see what happens
Modifying the portRESET_PRIVILEGE() function may mess up all your project.