ROOT/cling modeling accesses to data at fixed addresses

Hi,
I want to use cling to run a software which is designed for
an embedded platform. The software is accessing external components
at fixed addresses e.g. simplified example

int *i=(int*)0xF0000000;
*i=1;

Cling aborts and reports:
warning: invalid memory pointer passed to a callee: *i = 1

Is it possible to install a handler inside Cling which allows
me to handle such accesses and then continuing the program
execution right after the accesses ?

Thanks for any hint!

Try:

int *i = (int *)0xF0000000;
*i = 1;

I assume that, when you speak about a “fixed address”, you really mean some “hardware address”.
You will need to “translate” this “hardware address” into a “virtual address” which your utility (e.g. “cling”) is using, e.g. something like “mmap” on Linux does (and actually you may also need a dedicated “device driver” / “kernel module” for your “hardware” in order to access it).

See also: The GNU C Library -> Low-Level Input/Output -> Memory-mapped I/O

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.