bcm2835_init: gpio mmap failed: Cannot allocate memory bcm2835 init failed !!!

296 views
Skip to first unread message

Nithin kumar Guruswamy

unread,
Mar 26, 2021, 8:45:01 PM3/26/21
to bcm2835
Hi Mike/All,

Driver version:I have the latest  bcm2835-1.68 installed.
Board: Raspberry Pi 4B

I am trying to run the test example given in 


But I am getting error as both in non root and root mode

pi@raspberrypi:~/Pan-Tilt-HAT/RaspberryPi/test $ ./main
bcm2835_init: gpio mmap failed: Cannot allocate memory
bcm2835 init failed  !!! 
pi@raspberrypi:~/Pan-Tilt-HAT/RaspberryPi/test $ sudo ./main
bcm2835_init: gpio mmap failed: Cannot allocate memory
bcm2835 init failed  !!! 
pi@raspberrypi:~/Pan-Tilt-HAT/RaspberryPi/test $ 


Am I missing some patch?
Please help.

Sam James

unread,
Mar 27, 2021, 5:10:06 AM3/27/21
to bcm...@googlegroups.com
Hi


Have you compiled from source or are you running the precompiled version downloaded from git?

Thanks

Sam

--
You received this message because you are subscribed to the Google Groups "bcm2835" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcm2835+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bcm2835/09f407f9-2d11-43e1-b225-abd8fe36abden%40googlegroups.com.

Nithin kumar Guruswamy

unread,
Mar 27, 2021, 9:55:58 AM3/27/21
to bcm2835
Hi ,

For both version(precompiled and when I compile using make) I get the same error.

Thanks

Sam James

unread,
Mar 29, 2021, 5:51:22 AM3/29/21
to bcm...@googlegroups.com
Hi Kumar

Can I ask with complier your using? Over the weekend I have found there are differences between the  c99-gcc and gcc-8 that might get your program working

--
Reply all
Reply to author
Forward
0 new messages