Skip to main content

Questions tagged [bare-metal]

low-level programming of a computer without any operating system or the development of own custom operating systems

Filter by
Sorted by
Tagged with
0 votes
0 answers
68 views

How to create a fat32 file system on bare metal raspberry pi 4?

There is some "os" tutorial for raspberry pi 4: https://github.com/isometimes/rpi4-osdev https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials but they did not refer to how to build ...
wang kai's user avatar
  • 101
0 votes
0 answers
43 views

Core 0 runs 465 times as fast as cores 1, 2 and 3

I have a baremetal os which I run on Raspberry Pi 2 and 3 in AARCH32. It has had daily and heavy use for years. Mostly it runs on core 0, but I have a small bit running on core 1. I am trying to add ...
Kelvin's user avatar
  • 1
0 votes
0 answers
95 views

SWD debugging for Raspberry Pi Zero W

I am developing a bare metal program that will be run on a Raspberry Pi Zero board. Is it possible to debug the program with the SWD protocol? Are RPi0/1 boards (which are based on BCM2835 SoC) able ...
علاء الليبي's user avatar
0 votes
0 answers
41 views

Can't get simple assembly code to run on 3B+ board

I am writing a bare metal code to run on GPIO 4 on raspberry pi 3B+ .section .init .globl _start _start: # pin 4 for 3B+ ldr r0, =0x3F200000 mov r1, #1 lsl r1, #12 str r1, [r0, #...
Ahmed's user avatar
  • 1
1 vote
0 answers
79 views

Where is the boot sequence documented in detail?

I'm following this tutorial on writing "bare metal" code for the Raspberry Pi 4. I've gotten the code working fine, but I'm left wondering how I could have figured any of this stuff out for ...
Jack M's user avatar
  • 111
1 vote
0 answers
54 views

Pi Zero V1.3 miniuart not working

Ive got a bare metal project that has been running on Pi 3 without problems, i want to start moving it over to the Pi Zero, i have a V1.3 Pi Zero (not W) here so started with that. Ive stripped it ...
Adrian Brown's user avatar
1 vote
0 answers
120 views

Bare metal USB on the Raspberry Pi 3B

I have been trying to learn the working of USB drivers through the on-board port on the Raspberry Pi 3B(BCM2837). I'm referring to this repo for the source code: https://github.com/xinu-os/xinu/blob/...
NotAProgrammer's user avatar
0 votes
2 answers
343 views

Unable to connect to raspberry pi 3b over minicom

I want to connect to my raspberry pi 3 model B V 1.2 to minicom using serial cable. I have attached serial cables to correct pins like this. image of my setup I have installed raspbian from the ...
Afaq Shah's user avatar
  • 101
3 votes
0 answers
65 views

RPI(2) Bare Metal: does GPU support text mode and what is the default video mode?

I'm struggling with trying to find any information about text-mode capability in Raspberry Pi. I'm reading about decompression, 3d, etc. fancy features but I'd like to learn about fundamentals: Is ...
ardabro's user avatar
  • 131
2 votes
1 answer
3k views

Using Hardware PWM in Raspberry Pi 4

I was working on a project where I needed 4 different hardware PWM signals to control actuators using PWM drivers. I know that Raspberry pi has four PWM pins but the BCM2711 datasheet shows each pair [...
gaurang navelkar's user avatar
1 vote
1 answer
540 views

How to install aarch64-none-elf on the raspberry pi

I have tried installing aarch64-none-elf on my raspberry pi 3B+ from the arm website when I extract it, I can't run the executable files in it. Here's the error: bash: ./aarch64-none-elf-gcc: cannot ...
Ben's user avatar
  • 13
0 votes
0 answers
82 views

Installing aarch64-elf for barebones compilation on raspberry pi

I'm following this tutorial but it doesn't explain how to install aarch64-elf. Can someone explain how to do this on the Raspberry Pi 3B(running raspberry pi OS). The command that will be run with it ...
Ben's user avatar
  • 13
1 vote
1 answer
727 views

Bare metal LED access on RPi 4

I've been playing with the Baking Pi tutorials, getting assembly code to work on the [bare metal] Pi 1 (BCM2835). I'm now interested in adapting the code to work on the Pi 4 BCM2711 but I'm struggling ...
moo's user avatar
  • 298
1 vote
1 answer
558 views

Raspberry Pi Mailbox Interface Difficulties

I have been working on a bare metal program on my Raspberry Pi 3 B and am currently working on using the Mailbox Property Interface. I have been able to use it to initialize a framebuffer using the ...
Someone's user avatar
  • 111
0 votes
2 answers
456 views

Debugging potentially broken uart pins

I have recently been working on a bare metal project on a raspberry pi. I have been using a uart to usb cable to for logging, which has been able to send messages to my computer. Recently however, it ...
Someone's user avatar
  • 111
2 votes
1 answer
332 views

Are the ARM Mailbox and Doorbell interrupts ever triggered?

I'm writing some very bare metal multi-tasking code that manipulates the hardware on a Pi3. Part of that is to initialise a frame buffer, and I'd like to avoid polling loops, where possible. (e.g. ...
Simon Willcocks's user avatar
1 vote
1 answer
121 views

Why is the Pi 4 SOC documentation hidden? [closed]

I was interested in doing some bare metal development with the PI 4 but there are substantial aspects of the SOC which are not publicly documented, particularly in relation to network/WIFI/GPU. Why is ...
FourierFlux's user avatar
2 votes
2 answers
927 views

Where to Find Documentation for GPIO Controller Pins of Pi4?

I'm beginning bare metal programming on the Pi4. As a simple 'hello world' equivalent I'm trying to get the ACT led to blink. I have seen references that it is tied to the BCM2711 GPIO Controller pin ...
Edward Chamberlain's user avatar
4 votes
1 answer
1k views

BCM2835 GPIO Pins vs. Physical Pin Numbers

Good morning. I am attempting some low-level assembly coding for Raspberry Pi. Using the BCM2835 Peripherals Doc, I have successfully been able to work with the GPIO controller on my RPi Model B rev. ...
House's user avatar
  • 211
2 votes
0 answers
86 views

Kernel.img displays a blank screen instead of the intended text to be printed | Bare Metal | Pi Zero

Please note that I am building this Os through a different sd card with raspbian, but on the same machine(Pi Zero W) as the one I'm testing my Os on. I am trying to learn how to create my own ...
Programing's user avatar
2 votes
1 answer
78 views

BCM2835 datasheet addressing system

I've been interested in writing a kernel for my old Raspberry Pi for quite a while, and managed to make work some ARM assembly code I found on the famous "Baking Pi" course by the University ...
mell_o_tron's user avatar
1 vote
0 answers
316 views

Raspberry Pi Version 1 B (512 MB) - Using JTAG

I want to use an FT2232H Mini Board as Raspberry Pi JTAG (based on https://github.com/dwelch67/raspberrypi/tree/master/armjtag). I use a raspberry pi B version 1 (this one with the 26-pin connector ...
Kampi's user avatar
  • 203
1 vote
0 answers
167 views

Setting up paging in raspberry pi 3 model B in 32 bit mode

I am trying to setup paging in rpi 3b in 32 bit mode. First of all I am aiming for identity mapping all kernel code, so I started with short descriptor format using 1 MB sections. Identity mapping ...
zero's user avatar
  • 59
2 votes
1 answer
1k views

bootcode.bin RPi 3

I've been reading this document: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/bootflow.md About the boot process of the Raspberry Pi. I want to make a simple "Hello, ...
Cromulent's user avatar
  • 123
1 vote
1 answer
3k views

Rpi3b+ to Rpi3b+ jtag/SWD connection and OpenOCD

I'd like to hook together two Raspberry pi 3b+ to use jtag/SWD with OpenOCD. I learned it can be done, but implementing it has proven challenging. I have two questions: How to connect the Rpi's. If I'...
T. M.'s user avatar
  • 869
4 votes
1 answer
154 views

How does the hardware cause long delays?

I want to write a bit-banging driver for a Raspberry Pi 3. For testing I developed a simple Linux kernel mode driver which toggles a GPIO pin with approx. 1Mhz. Here is the code excerpt. static ...
Rainer Urian's user avatar
3 votes
1 answer
301 views

Why does adding a nop or constant break my code?

I am learning the ARM architecture via bare metal programming on the Raspberry Pi 3. I have a booting "kernel" that prints out some info. I have reached a point that I don't understand what is ...
Jacob Calvert's user avatar
0 votes
0 answers
332 views

How to access the external SDRAM?

Is it possible to access the external 512 MB SDRAM (on my Pi B+) from a bare-metal program? If yes, how would I do so? Do I have to configure and use the MMU for it? I don't want to handle virtual ...
binaryBigInt's user avatar
1 vote
2 answers
1k views

Installing Wi-Fi on bare metal (no terminal) [closed]

I am currently working in an environment without an OS, just binary boot files as well as .ini files that define the stuff like upnp audio connection in between locally-connected raspberry pis (the ...
sigmasrb's user avatar
2 votes
1 answer
332 views

Reading files with a custom kernel

I've been following this tutorial showing you how to write a custom kernel for the raspberry pi. Everything's working out well, but I can't figure out how to read files from the boot partition of the ...
Tavon's user avatar
  • 23
3 votes
2 answers
5k views

How to build my very own device tree (and if I need to)

Let me preface this by saying I don't know much about device trees. I do know a bit about ATAGs, since I'm working with this operating system that currently only uses ATAGs. I'm modifying the ...
Priya Bansal's user avatar
3 votes
1 answer
1k views

Raspberry pi 3 openocd debugging jtag scan interrogation fail all zeroes problem

I am trying to debug a bare metal application using openocd (seggers does not provide support for the cortex a-53 so jlink won't work). I installed openocd following this set of instructions. However ...
Makogan's user avatar
  • 171
0 votes
1 answer
96 views

Can someone explain what the values are and where they are found?

I'm trying to follow along with this OS building tutorial. I'm trying to understand what the LED_ values in rpi-gpio.h mean and how they are all used. Where in the documentation are these values ...
Justin808's user avatar
  • 109
5 votes
4 answers
4k views

Can't turn on ACT LED on baremetal Pi3

I'm trying to run some bare-metal code on my raspi 3. This is my first time doing any sort of bare-metal programming, so first things first I want to turn on my ACT led as a kind of hello-world type ...
Ripread's user avatar
  • 153
0 votes
2 answers
2k views

Booting the raspberry pi and running a bare metal program

Background Info I am attempting to write a few bare metal programs and in theory I would eventually write a kernel. To get used to the environment, I found a tutorial that was known to work to could ...
dalearn's user avatar
  • 109
0 votes
1 answer
732 views

Raspberry Pi Baremetal Programming

Just few days ago I bought Rasberry Pi 3 for education, and try my best at low-level programming. For now I wrote a simple GPIO code to set low and high level on controller's pin. My functions can ...
shizumia's user avatar
3 votes
1 answer
189 views

OS-less raspberry pi 2 debugging of Assembly language

I have a Raspberry Pi 2 without an OS installed. I have an assignment where I have to create and display some code in assembly language for the Pi 2. The lab that we have set up at school has ...
SeesSound's user avatar
  • 131
5 votes
1 answer
4k views

Is it possible to get the state of the LEDs and GPIOs in a QEMU emulation like the HDMI and audio?

I've gotten QEMU emulation working with: Emulation on a Linux PC On that Linux based example, I can see the HDMI output on a window, and hear sounds from the speaker. Now I started playing with bare ...
Ciro Santilli OurBigBook.com's user avatar
-1 votes
1 answer
88 views

How can I find these files?

I am roughly following this tutorial and have created a kernel.img. It says: Do you still have the SD card with the original Raspbian image on it from when you where testing the hardware above? ...
dalearn's user avatar
  • 109
0 votes
1 answer
71 views

Compile .img on OSX

How do I create a .img file on a mac? I am trying to create a basic OS but after writing some basic C (roughly following this tutorial) what do I do to put that code on the Pi?
dalearn's user avatar
  • 109
2 votes
1 answer
581 views

Bare metal: Why does the CPU automatically read instructions from the SD card?

I'm learning bare metal programming on the RPi. My main experience is from using 8-bit PIC microcontrollers. Reading from SD cards is comparatively high level. How does the CPU achieve this? Does it ...
Jodes's user avatar
  • 562
2 votes
2 answers
4k views

Raspberry Pi 3 Model B Timers

Since BCM2837 is a cortex-A53, it should have architected timers accessible through CNT* registers. Does Pi 3 have one for each core? Are they free running or derived from the GPU timers as before? If ...
Xi Han's user avatar
  • 173
0 votes
1 answer
189 views

Questions about bus addresses

I've been working on my bare metal DMA code. I've heard that you need to pass bus addresses to initialize DMA control block. I want to know why you need to put 0xC or 0x4 in front of memory address ...
IamU's user avatar
  • 23
1 vote
1 answer
225 views

Simple bare metal code on Pi 3 doesn't work

I'm trying to run this bare metal code to turn BCM16 on. The code is made into raw binary and config.txt contains the necessary kernel= attribute. I measured with multimeter; nothing happened. What ...
Xi Han's user avatar
  • 173
1 vote
1 answer
487 views

Raspberry PI multiple high frequency pinout

I'm controlling 4 stepper motors with my raspberry PI, and I need to step them in a control loop cycling at a specified rate as low as once every 40 microseconds. The motors won't always be stepped ...
catsock's user avatar
  • 111
2 votes
0 answers
933 views

Raspberry Pi 2 - bare metal DMA

I am trying to make DMA on bare-metal raspberry Pi2 working. Unfortunatelly it does not and I have got no idea why. Below is my source code: typedef struct{ UINT32 controlStatus; UINT32 ...
DawidPi's user avatar
  • 121
2 votes
1 answer
506 views

How tp get USB to USB UART console without linux

I'm trying to develop my own OS kernel from scratch for the raspberry pi and I want to be able to debug my code from my computer over putty through a cable. Now I've did a little googling and found ...
Amit Hendin's user avatar
1 vote
0 answers
267 views

RPi2 bare metal blinker

This is my first assembly program. I have a FAT32 formatted SD card with latest bootcode.bin, start.elf, and a flat binary named kernel7.img converted from the following dumped ELF file: build/kernal....
zach's user avatar
  • 11
5 votes
1 answer
634 views

Different addressing systems

I just started the Baking Pi tutorials and the first lesson is already very confusing. The very first thing we do is ldr r0,=0x20200000 The author explains that 0x20200000 is the address of the ...
zach's user avatar
  • 89
3 votes
1 answer
2k views

Possible to do bare metal programming on Pi?

I seek to use the Pi as an educational tool to learn about programming a machine from the ground-up. In a perfect scenario, the first instruction executed after the firmware on ROM, and everything ...
zach's user avatar
  • 89