Hello,
I’m writing a TMS570LC435 zero-copy Ethernet driver for FreeRTOS+TCP V4.2.1 and static buffer allocation. I started with a bare metal version with lwip, then used FreeRTOS without MPU and got that running. Now I want to integrate it into our running system with MPU.
There I have a runtime issue with BufferAllocation_1.c. When calling uxListRemove() from BufferAllocation_1.c, I run into a prefetch error. It seems to have something to do with the processor mode (privileged or user mode).
I have found a hacky solution to just change the processor mode before:
It happens in line 259 when I call ( void ) uxListRemove( &( pxReturn->xBufferListItem ) );. To be precise I saw in the debugger it happens exactly when I want to jump to the address of uxListRemove().
Thank you. That sounds reasonable. I’ll try that tomorrow and give you then feedback.
Thanks for your support. I just tested your suggestion. It seems to work. I still have some stack overflow somewhere which I need to address, but the problem from above seems to be fixed.
But I needed to modify the FreeRTOS_IPInit_Multi() in FreeRTOS_IP.c. The IP-Task is normally created with xTaskCreateStatic().