Questions tagged [bare-metal]

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

63 questions
10
votes
1 answer

How to start core 1,2,3 in Raspberry Pi 2

I have written a bare metal multi core example. Code, circuit diagram is here - https://github.com/jeffreyantony/multipi/tree/master/Example_01 In my example, there are 3 LED's connected to the GPIO pins of the raspberry Pi. There are totally 4…
robomon
  • 393
  • 3
  • 11
6
votes
1 answer

Is there a Raspberry Pi emulator?

For doing bare metal programming, it would be really useful if there was a software emulator for the Raspberry Pi which I could use for debugging and inspection of state. Does such a thing exist? I've seen some people using qemu with a custom kernel…
David Given
  • 163
  • 1
  • 5
5
votes
4 answers

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 program but I can't for the life of me get it to…
Ripread
  • 153
  • 1
  • 3
5
votes
1 answer

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 metal, and the hello world is to blink the OK…
5
votes
1 answer

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 GPIO controller. Not to just want to blindly believe…
zach
  • 89
  • 3
4
votes
0 answers

How to profile code on raspberry pi?

Are there any open source or examples for using raspberry pi's ARM cpu's PMU, performance counter? It can be a bare metal example or user-space application. I have seen this and that (which I don't understand how can I use to profile bare metal…
0x90
  • 141
  • 3
4
votes
1 answer

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 ssize_t dev_write(struct file *filep, const char…
4
votes
1 answer

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 when I call the command: openocd -f…
Makogan
  • 191
  • 1
  • 1
  • 7
4
votes
1 answer

How to do QEMU emulation for bare metal Raspberry Pi images

I would like to emulate using QEMU the bare metal Raspberry Pi examples provided in this link https://github.com/dwelch67/raspberrypi. Could someone let me know which commandline arguments should I use to get QEMU running. I checked in the internet…
robomon
  • 393
  • 3
  • 11
4
votes
1 answer

What is the relation of the frequency and operation execution time?

I am started to program the RPI without any OS, I would like to create a delay function .globl noop noop: nop extern void noop(); void delayUS(uint32 useconds) { uint32 i; uint32 lpnr = useconds / MCUFREQ * ...; for (i = 0; i <…
Mokus
  • 983
  • 5
  • 10
  • 19
4
votes
1 answer

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. 2.0 to turn the "ACT" LED on (which I know is raw…
Jacob B.
  • 211
  • 1
  • 6
3
votes
1 answer

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 happening. I have two pieces of boot code below, one…
3
votes
2 answers

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 operating system to work on the Raspberry Pi 3s, and…
Priya Bansal
  • 39
  • 1
  • 4
3
votes
1 answer

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 hardware/software that allows us to run and test the code…
SeesSound
  • 131
  • 2
3
votes
1 answer

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 thereafter, should be something I…
zach
  • 89
  • 3
1
2 3 4 5