Hi all!
I'm porting a program written in C that uses mmap (fpmmap) that maps GPIOs and other utilities on a beaglebone. Everything is going well, until the test, where I see the all base address of beaglebone in FPC should be divided by 4096 dec ($1000 hex) to get it working. Example:
In C:
CM_BaseAddr = mmap(NULL, 0x4000, PROT_READ | PROT_WRITE,
MAP_SHARED, devmemfd, *0x44e00000*);to get the "same" code working in FPC I have to change some constants.
CM_BaseAddr := Fpmmap(NULL, $4000, PROT_READ + PROT_WRITE,
MAP_SHARED, devmemfd, *$44e00*);I did a strace in the FPC executable, and the in line above, the base address is "multiplied" by 4096 dec ($1000 hex) becoming back equal to the C constant.
The question is: this is intentional? Has some technical point that's not mentioned on the fpmmap documentation? Or it's simply a bug?
