Yep, that got it going - thanks!! :) It's odd that it worked under the older OS. All I've effectively done is change the type of the gpio_map pointer returned by mmap from char* to volatile uint32* (previously this was done after the fact via a cast: gpio = (volatile unsigned long *) gpio_map). Tony
Does another process on your system access the GPIO memory? I note you don't have MAP_SHARED. specified as it is here: http://elinux.org/RPi_Low-level_peripherals#GPIO_Code_examples EAGAIN The file to be mapped is already locked using advisory or mandatory record locking. See fcntl(2). Is there ano...
I'm running 3.6.11+ #474 (soft float) and I've written a c++ app (in Qt4.8.2) that listens for signals on one or more GPIO pins. My app was working just fine until I upgraded to the current release, but now it can't map the GPIO locations. The code (somewhat abridged, but you get the idea): #define ...
Ok, some progress - i *can* access /dev/mem; it's the following invocation of mmap that's failing - with error code 11 (EAGAIN - The file has been locked, or too much memory has been locked). Investigations continue ...
I wrote a program that accesses /dev/mem in order to manipulate GPIOs and it works fine with release 3.2.27+ OS, but the same code compiled under 3.6.11+ fails to open /dev/mem, even though I'm running as root (chmod 4755). if((mem_fd = open("/dev/mem", O_RDWR | O_SYNC)) < 0) return false; etc. Anyo...