MMU Question

Hello all,

i am working with a Digi Connect-Me module with NetOS 6.3.

Currently i want to write something like a dynamic loader (like the RTLD from GLibC). Now my question is how to map an executable (or parts of it) into memory!
So far i have the elf executable in my FlashFS and now i don’t know how to use the MMU to load the data into memory - any help or guidance would be very appreciated.

If anybody just has an example of how to make use of the MMU i would be glad also.

Thanks in advance,

EDIT: I guess it would be wrong to just malloc some memory and then use that to read in the data from the executable with NAFSread_file(…)

Message was edited by: DanielS

The Connect ME doesn’t have an MMU (or, more precisely the NS7520 processor in the module doesn’t have one). You’ll also want to make sure the executable can be executed by the ARM processor.

Since you’d have to recompile it for the NET+OS / ARM environment, why not just include the functionality you need into your main application?

Thanks for your answear and yeah im aware of the fact that the NS7520 doesn’t have a MMU but the API Reference states that it still supports these routines. And yeah the additional executable are also cross-compiled for the ARM target just like the main application.

The special thing is, that i don’t want to recompile the main application but to add and exchange functionality at runtime/during operation. therefore i need to mmap() the executables to be able to execute it and thats the point where i’m currently stuck at since mmap utilizes page sizes, alignment and padding. Additionally i even don’t get it how to load data with the MMU-Api anyway.