FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [February 2015 Threads] dynamically generated structure object's address to memory regions of a restricted task criation in MPU modePosted by bhaveshshah2310 on February 26, 2015 I am here trying to make project where i create some different tasks are intersecting with different peripherals and isolate those tasks for memory usage using MPU in freeRTOS on LPC 1769, when i open a peripheral say UART or I2C there a structure object is been generated related to that peripheralcontrolt as it is done by FreeRTOS+IO framework.
Now my object is been created and the address is returned by FreeRTOS_open api now i want to use those address in creating a ristrected task using xTaskCreateRestricted, As i use this handler as in starting point of any region it gives me error like its not constant.
how do i solve this problem ? how can i pass memory space generated at run time as this FreeRTOS_open api is been called at starting of main() and then give them in such restricted tasks are been created after that.
I am bit confused over here.
dynamically generated structure object's address to memory regions of a restricted task criation in MPU modePosted by rtel on February 27, 2015 I can't recall without checking the code, which I can't do right now, but you might find that the structure is not allocated in one go. For example, if a structure is allocated, but that structure contains a semaphore, then the semaphore will have been allocated separately and therefore not necessarily be in the region you are defining for the MPU. If that were the case then you may be able to access the containing structure without a problem, but get a memory fault when the semaphore is allocated inside the structure.
Also the MPU does not allow fine grained memory regions to be defined, I think they have to be a power of two (can't quite remember) so you could not define one just for the allocated structure with including a lot of unused RAM in the region allocated to the MPU.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|