- IsmaelGarHerr
- Posts: 2
- Joined: Mon Jun 02, 2025 7:52 pm
RaspBerry Pi 5 Memory Map
Hello to everyone! I'm new developing bare metal I just decided to start learning with my raspberry pi5. I'm following this tutorial https://satyria.de/arm/index.php?title=Hauptseite and all is pretty straightforward but I'm a little bit lost about the memory addresses for the registers being used to blink the LED.
The example says that base peripheral address is:
But according to RaspBerryPi RP1 peripherals. Base address starts at 0x40000000 where does the addresses used in the tutorial come from?
The example says that base peripheral address is:
Code: Select all
//
// base.h
//
#ifndef _base_h
#define _base_h
.equ RPI_BASE, 0x107C000000UL
// GPIO
.equ ARM_GPIO2_BASE, RPI_BASE + 0x1517C00
.equ ARM_GPIO2_DATA0, ARM_GPIO2_BASE + 0x04
#endif
Last edited by IsmaelGarHerr on Tue Jun 03, 2025 3:39 pm, edited 2 times in total.
- jamesh
- Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator - Posts: 35174
- Joined: Sat Jul 30, 2011 7:41 pm
Re: Rasp Berry Pi 5 Memory Map
Not an answer to your questions, but for learning baremetal I'd go with the Pico2 for running code and use the Pi for development and compiling.
Software guy, working in the applications team.
- cleverca22
- Posts: 9593
- Joined: Sat Aug 18, 2012 2:33 pm
Re: RaspBerry Pi 5 Memory Map
the pcie controller remaps things a lotIsmaelGarHerr wrote: ↑Tue Jun 03, 2025 1:55 pmBut according to RaspBerryPi RP1 peripherals. Base address starts at 0x40000000 where does the addresses used in the tutorial come from?
you have to parse the device-tree and the ranges= entries to know how to properly remap it
also, this address isnt even the RP1, thats the bcm2712 gpioIsmaelGarHerr wrote: ↑Tue Jun 03, 2025 1:55 pm.equ RPI_BASE, 0x107C000000UL
// GPIO
.equ ARM_GPIO2_BASE, RPI_BASE + 0x1517C00
so your looking at the entirely wrong document
- IsmaelGarHerr
- Posts: 2
- Joined: Mon Jun 02, 2025 7:52 pm
Re: RaspBerry Pi 5 Memory Map
So if that address corresponds to bcm2712_gpio peripheral, how does it manage to control raspberry's GPIO pins if they are supposed to be managed by the RP1? is somehow PCIe remapping data written to hats the bcm2712 gpio to the RP1? Sorry if my assumption is wrong btw as I mentioned im new at thiscleverca22 wrote: ↑Tue Jun 03, 2025 4:37 pmthe pcie controller remaps things a lotIsmaelGarHerr wrote: ↑Tue Jun 03, 2025 1:55 pmBut according to RaspBerryPi RP1 peripherals. Base address starts at 0x40000000 where does the addresses used in the tutorial come from?
you have to parse the device-tree and the ranges= entries to know how to properly remap it
also, this address isnt even the RP1, thats the bcm2712 gpioIsmaelGarHerr wrote: ↑Tue Jun 03, 2025 1:55 pm.equ RPI_BASE, 0x107C000000UL
// GPIO
.equ ARM_GPIO2_BASE, RPI_BASE + 0x1517C00
so your looking at the entirely wrong document
- cleverca22
- Posts: 9593
- Joined: Sat Aug 18, 2012 2:33 pm
Re: RaspBerry Pi 5 Memory Map
the onboard status led is tied to a bcm2712 gpioIsmaelGarHerr wrote: ↑Tue Jun 03, 2025 7:53 pmSo if that address corresponds to bcm2712_gpio peripheral, how does it manage to control raspberry's GPIO pins if they are supposed to be managed by the RP1?
the gpio header is going to the RP1
Return to "Bare metal, Assembly language"
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion