Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

4
votes
0answers
65 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 ...
3
votes
1answer
81 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 ...
0
votes
0answers
56 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 ...
0
votes
2answers
273 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 ...
3
votes
1answer
115 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 ...
3
votes
1answer
645 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 ...
1
vote
1answer
660 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 ...
1
vote
1answer
28 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 ...
5
votes
1answer
1k 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 ...
0
votes
2answers
845 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 ...
0
votes
1answer
344 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 ...
3
votes
1answer
123 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 ...
2
votes
1answer
547 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 ...
-1
votes
1answer
63 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? ...
0
votes
1answer
44 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?
2
votes
1answer
280 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 ...
1
vote
2answers
2k 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 ...
0
votes
1answer
123 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 ...
1
vote
1answer
164 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 ...
1
vote
1answer
180 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 ...
2
votes
0answers
516 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 ...
2
votes
1answer
278 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 ...
1
vote
0answers
176 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....
4
votes
1answer
354 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 ...
3
votes
1answer
541 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 ...
5
votes
1answer
2k views

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'...
1
vote
0answers
340 views

Is it possible to Flash VideoCore ROM?

If I understand VideoCore IV correctly, it contain a bootrom (and perhaps some other information in the ROM). I understand that the bootrom contain a different instruction set than ARM. I would guess ...
0
votes
1answer
60 views

Baking Pi OK05 - Why “ldr” twice to make the pattern work?

I'm carefully following Baking Pi with my model B, making sure I fully understand everything going on. I am now at lesson 5, to flash the SOS Morse code. It works fine, but I am curious why it needs ...
9
votes
1answer
3k views

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 ...
2
votes
1answer
1k views

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 ...
1
vote
1answer
357 views

Modifying GPIO memory for one pin turns multiple on

I am attempting to write an API for interaction with the GPIO pins in a bare metal environment in C. However , sometimes when I attempt to turn on one of the GPIO pins it turns multiple on. Here is ...
0
votes
0answers
128 views

Anyone have luck doing bare metal development for the Pi 2 using the tools from Xcode?

I have my eyes in doing bare metal development on the Pi 2. However I have nowhere to install a Linux to as my Mac's hard drive (retrofitted 480GB SSD) is almost full. So anyone have luck in writing ...
1
vote
1answer
144 views

Accessing predefined kernel virtual address in raspberry-pi

Recently, I have started working on embedded system (and I don't have any prior knowledge about it), trying to gain some knowledge in this field. I am working with Raspberry-pi. I am doing bare-metal ...
2
votes
0answers
2k views

Assembly - set gpio as input

I have 2 leds and one button. both green and yellow led off when booting from card. When the button is pressed, i want to turn green led off and yellow led on. However, I have to write assembly. I ...
1
vote
1answer
341 views

Raspberry bare metal boot even with entry different from 0x8000

I'm developing simple bare metal program for Raspberry I read many articles witch state that the entry on linker script should be at address 0x8000, but it boot with any other address. so is this ...
0
votes
3answers
463 views

local and global variables in bare metal programming

I'm developing simple blink led for PI without OS (bare metal) when setting the variable tim inside the kernel_main, the led still on and doesn't blink. but when setting variable tim global (outside ...
1
vote
1answer
2k views

Is it possible to boot the Raspberry Pi in Secure Mode?

I am currently developing a small OS on my Raspberry Pi, that I install by replacing the kernel.img file on the /boot partition of my SD card. By the time my code is run, the CPU is already in Normal ...
3
votes
1answer
2k views

Bare metal programming: How to access Ethernet HW interface

Bare metal programming: I need to write my own Ethernet driver for the raspberry pi, but I can't find the programmer's hardware manual or other documentation on how to code to the Pi's Ethernet ...
4
votes
1answer
153 views

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 = ...
4
votes
0answers
767 views

How to profile code on raspberry pi? [closed]

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 ...