Comments (4)
Thank you for raising this issue.
For our side:
I think it's a good practice to always have an else branch. And in this case, adding a #warning for portMPU_TYPE_REG != portEXPECTED_MPU_TYPE_VALUE
would be something quick dirty we can do to at least ease the pain.
For your side:
I'm not sure how far you went with your project. But in case you may need to jump start on 16-entry MPU...
prvSetupMPU()
This function as you are already aware of, is for setting up MPU entries for none task specific regions. If your linker script has the same symbols and section size/alignment, you may likely be able to just use this part with minimum modification.- And since now we have more entries, these can be used (partially or however suits your application scenario) for either task specifics or global settings. If global, could append
prvSetupMPU()
. If task specific, need to save settings in task context -- related functions, namelyvPortRestoreContextOfFirstTask()
, andvPortStoreTaskMPUSettings()
.
from freertos-kernel.
Hi @yuhui-zheng,
thanks for the answer, but I didn't really catch your comment above, could you please explain further?
Do you mean that the prvSetupMPU() doesn't need to be updated to support the 16 regions MPU?
sorry for the disturbance.
regards
Haithem.
from freertos-kernel.
Before more words to confuse you... Supporting 16-entry MPU out-of-box is of our interest, though I don't have a concrete timeline to share when typing this line. The bullet points are mostly for "in case you need it yesterday" and you were planning to customize existing MPU port.
Expanding comments on prvSetupMPU()
a little bit. (In your first post you linked IAR/CORTEX_M4F_MPU port, so that below is specific to this port.)
The other part to MPU initialization is how memory is partitioned in your application (with linker script). As an example, CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/IAR
this project uses this linker script along with IAR/CORTEX_M4F_MPU port. __privileged_functions_start__
is set to address 0x08000000, and __privileged_functions_end__
is set to address 0x08007FFF. So that these lines set up an MPU entry to grant privilege mode read-only access to functions in memory address range of [__privileged_functions_start__
, __privileged_functions_end__
]. (Also executable, see XN bit in MPU_RASR register.)
So if to setup a new project with STM32H743 evaluation board, may need to get a reasonable memory partition as well. Hope this clarifies a little bit.
Regards,
Yuhui
from freertos-kernel.
Thanks I'm closing this issue now.
regards
Haithem.
from freertos-kernel.
Related Issues (20)
- [BUG] Access violation in taskSELECT_HIGHEST_PRIORITY_TASK() HOT 11
- pvPortRealloc Implementation in AVR32_UC3 Port HOT 1
- [BUG]
- Five heaps to choose? HOT 4
- [Feature Request] The number of system calls needs to support the sizeof(uintptr_t) HOT 4
- [DOC] HOT 1
- Will timer task be created twice for smp x2 freertos HOT 1
- [BUG] Release commit for 10.6.2 is not in-tree HOT 2
- [BUG] Missing type cast in vTaskGetInfo causes compiler warning HOT 1
- [BUG] xTaskGetTickCount() erroneously skips ahead HOT 4
- SPDX file contains numerous issues HOT 6
- smp for cortex-m7 HOT 1
- MPU V2 for CM3 & CM4 HOT 1
- [BUG] Atomic_*s are not atomic! HOT 2
- [BUG] GCC_ARM_CM4_MPU assumes FPU HOT 2
- [BUG] - TCBs and dynamic stacks leaked when scheduler is stopped HOT 17
- FreeRTOS.h configSTACK_DEPTH_TYPE inconsistent with default type HOT 1
- [BUG] SMP prvSelectHighestPriorityTask adds current task to the front of the ready list if pxIndex points to the head of the list HOT 2
- [Feature Request] Default Affinity Set HOT 2
- Add support to cortex A7 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freertos-kernel.