Posts: 1
Joined: Fri Mar 14, 2014 5:56 pm

Executing programmes without OS

Fri Mar 14, 2014 6:12 pm

Hello friends....I am new to raspberry Pi. I am getting used to raspberry pi programming using raspbian. But is it possible to run the same code without any OS on pi? Thanks

Posts: 108
Joined: Mon Sep 10, 2012 4:14 pm

Re: Executing programmes without OS

Fri Mar 14, 2014 7:28 pm

Unless your program contains all the logic to deal with low-level interfaces on the Pi to deal with memory, I/O, etc., then your program won't run. That's what the operating system provides for you.
However if you want to learn how to do all those things yourself this is the right place to come for information and questions!
Check out the resources post on this forum for pointers. Most people start with Alex Chadwick's excellent introduction to bare metal assembly on the Raspberry Pi, called "Baking Pi", https://www.cl.cam.ac.uk/projects/raspb ... orials/os/

User avatar
Forum Moderator
Forum Moderator
Posts: 13372
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Executing programmes without OS

Fri Mar 14, 2014 7:52 pm

Any time your program needs input from a keyboard, output to a display device, file access, memory management, or even multitasking support then you need an OS, as that is what an OS is for!

Thats said, some people prefer to simply use "the bare metal", that is why we have a "bare metal" section, where you can find tips on how to run code with a minimum of (OS) overhead.

Also the section to go to if you want to create your own OS!

Return to “Bare metal, Assembly language”