[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua - running bytecode from an external ram space
- From: Rob Kendrick <rjek@...>
- Date: Thu, 14 Jul 2011 09:18:39 +0100
On Thu, Jul 14, 2011 at 10:12:05AM +0300, Bogdan Marinescu wrote:
> > Does that processor have something like the memory protection unit on the
> > arms? You could easily change the Lua allocator to use your own function
> > that 'allocates' from a protected region and use the fault handler to do the
> > access.
>
> I don't know of any MCU with a MMU.
I first suggested just this technique earlier in the week :) Larger
STM32s have an MPU (a heavily cut-down MMU) that may be able to do this
paging as you suggest: poor performance may be acceptable if you don't
need to query it often. Some of NXP's LPC range have a full ARM9-style
MMU that you can use if you want. Or there's the option of selecting a
MCU with an external memory bus.
The alternative might be to augment the compiler to generate function
calls for memory accesses, but I suspect this would be the ugliest of
hacks.
B.