Apress / Raspberry-Pi-Assembly-Language-Programming

Source Code for 'Raspberry Pi Assembly Language Programming: ARM Processor Coding' by Stephen Smith
https://www.apress.com/us/book/9781484252864
Other
23 stars 20 forks source link

Raspberry Pi 4B incompatibility with flashmem project #2

Open OutsourcedGuru opened 4 years ago

OutsourcedGuru commented 4 years ago

I'm noting that the source code for the Chapter 8, p153 flashmem code works as expected on the Raspberry Pi 3B computer but doesn't seem to be running on the Raspberry Pi 4B.

gpiomem.s:

gpioaddr:       .word   0x3F200             @ mem address of gpio register / 4096

Are you sure this is correct for the Raspberry Pi 4B, as indicated on p154's last paragraph?

I'm getting a "Failed to map memory" error from this platform (as run by sudo ...).

ls -l /dev/mem
  crw-r----- 1 root kmem 1, 1 Dec  7 17:49 /dev/mem
ls -l /dev/gpiomem
  crw-rw---- 1 root gpio 247, 0 Dec  7 17:49 /dev/gpiomem
groups
  pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi
heshgt commented 3 years ago

I am running into the same issue on pi 4b, did you figure out how to fix it?

OutsourcedGuru commented 3 years ago

Nope.