Hi, I'm using AT91SAM9260 in a printer design. I'm using RL-RTX operating system.Since AT91SAM9 contains I & D caches and MMU built-in I'd like to use it.But, all the examples provided by Keil for AT91SAM9 had enabled only I-cache. How can I use both the I and D caches and MMU? Can I use MMU with RL-RTX?
Please help me.
In theory, you can use MMU with any program. The question is more what you want to solve, and what will happen.
In this case, I would think that you have to modify the os_switch_tasks() function, to get the different tasks to run in their own address spaces. The bad part is that - I don't have the full source, so I may be wrong - the common data structures used by RTX will have to be accessible from all tasks, so you will not get full isolation.
You will also get a bit of problem with allocation functions, since the MMU works on a different abstraction level than the allocation function - RTX does not know that it should map/unmap memory regions to your individual threads.
In the end, it might be easier to use the MMU to just write-protect critical information from all threads, than trying to get isolation between individual threads.