tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Bare metal motivations

Tue Jul 24, 2012 7:04 am

the slightly offtopic discussion in Dex's thread (for which I am largely responsible) got me wondering where people wanted to go with their bare metal projects. With a bit of catalysis from destruk's comment below, I figured I'd pull it out and stop polluting Dex's thread:
destruk wrote:Obviously Tuffy
That's tufty. "tufty" as in squirrel, not "tuffy" as in Biffa Bacon (which, despite the fact I play ice hockey, would be actionable under false advertising regulations). Alternatively, "Simon" would do ;)
destruk wrote:you don't need anything else to program. If the program uses a single command "Print Hello" - and the only command the system supports is Print, then that is all you need. Would the slideshow work if you needed arithmetic operations or the other features you speak of? No.
Well, sure. If all you ever need to do is print strings, you only ever need a print command. That doesn't make for a general purpose programming language, though. Not that there's anything wrong with domain specific languages, of course, but, having been there, I can see a lot of issues with the approach Dex is taking. That's fuel for another thread, though, and Dex knows that if and when he hits those issues, if he needs any help he can come to pretty much anyone here, myself included.
destruk wrote:I think you're just upset that someone else is trying to do something and they succeeded, where you have failed.
:shock:
Not at all. I'm actually pretty much resigned to failure, and as far as I'm concerned, there's no competition between myself and Dex or anyone else here. It's not a race, and nobody's giving out prizes, after all.

So, what's my motivation? Well, I'm one of those who feel that there is room for significant improvement in the state of OS design. That mainstream operating systems as they currently stand are kludgy and unpleasant, no matter how remarkable they may be in terms of hardware support. I feel that the bedrock of current operating systems is fundamentally broken, based on unsafe and unsound programming practices, and that's part of why they are growing so fat and unstable. I'd expound on this, and how I want to fix it, in more depth, but it's 9AM and chairlifts need turning.

Of course, I'm not the first, and will probably not be the last, person to try and make an operating system based a totally different bedrock, (Lisp / Scheme in my case). Maybe I'll succeed, and someone somewhere will pick up on one or two of the ideas I'm trying to implement. Far more probably, I won't, but even then, maybe some people will pick up and run with some of my code, which would also be a success as far as I'm concerned. In any case, though, who cares apart from me?

In short, I'm building an experimental, self-hosted OS that, in theory, can be used as a teaching platform as well as an experimentation platform.

What are other people trying to do?

Simon

User avatar
Cycl0ne
Posts: 102
Joined: Mon Jun 25, 2012 8:03 am

Re: Bare metal motivations

Tue Jul 24, 2012 1:52 pm

Hmm,

you know my repo Simon, im coding an AmigaOS Clone on Raspberry Pi ;-) Or at least im refactoring my 10 Years PowerOS code to ARM, coding a lot more due to PowerPC/x86 dependencies.
If everything goes well, the shell will be up in 1-2 Weeks with all shell commands, FAT, LEAN and the RAM Filesystem. Due to the small footprint of only 512kb for the final kernel.bin with the complete gui, driver, filesystems,... , its going to be really cool fast on the arm.

Cheers
C.

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: Bare metal motivations

Tue Jul 24, 2012 2:21 pm

Only want io via GPIO and need it to operate rapidly and predictably.
Ostendo ignarus addo scientia.

User avatar
Beakster
Posts: 29
Joined: Mon Oct 24, 2011 6:03 pm

Re: Bare metal motivations

Tue Jul 24, 2012 3:02 pm

Just got my Pi yesterday and my plan since I heard about the Pi was to do some bare metal stuff. The reasons I have I think align well with the R-Pi's project aims, I want to further understand low level computing.

My 9-5 job is a C# programmer, and working with such a modern language that essentially only runs in a Virtual Machine is a long way from low level. All I'm doing is making API calls which call other peoples code.

When I was at school and university I really enjoyed 6502 and 68000 assembly language but only really did the basics. I was around in the 80s, when micro computers like the C64 and BBC Micro came with user manuals which showed the computers memory map and listed the processors instructions. I was a bit young to really get properly involved in low level coding when it was as accessible as it was in the 80s, so the Pi seems like a good way to further my understanding now.

My Pi arrived yesterday and one of the first things I did was to run dwelch's flasher.bin program to make the OK LED flash. My plan for the coming days is to set up a Linux VM to build ARM Asm/C and then try and get something running so I can plot simple graphics to the frame buffer.

rembrandt
Posts: 12
Joined: Thu Jul 19, 2012 9:58 am

Re: Bare metal motivations

Tue Jul 24, 2012 3:18 pm

My reasons are pretty much the same as Beakster.

I'm a C# developer also, and did some asm as part of my Uni course.

Just received my Pi, and have it up and running on Raspbian.

I've looked at both DexOs and Bernards tutorials, and I'll be working my way through both. I'm thinking of writing a blog about my newbie experience so that others can avoid the mistakes that I will inevitably make along the way.

User avatar
Cycl0ne
Posts: 102
Joined: Mon Jun 25, 2012 8:03 am

Re: Bare metal motivations

Tue Jul 24, 2012 4:00 pm

Beakster wrote: My Pi arrived yesterday and one of the first things I did was to run dwelch's flasher.bin program to make the OK LED flash. My plan for the coming days is to set up a Linux VM to build ARM Asm/C and then try and get something running so I can plot simple graphics to the frame buffer.
Hi Beakster,

look at this https://github.com/MichaelBell/RasPi-bare. You dont need the virtual Linux machine, all can be done in windows, just install cygwin and the cross compiler from my [GUIDE] Baremetal for beginners thread. http://www.raspberrypi.org/phpBB3/viewt ... 72&t=10850

hippy
Posts: 5587
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Bare metal motivations

Tue Jul 24, 2012 5:31 pm

tufty wrote:the slightly offtopic discussion in Dex's thread ... got me wondering where people wanted to go with their bare metal projects.
I'd like to be able to help people use the R-Pi as an intelligent peripheral for other micros. The desire is to be able to simply tell someone with an R-Pi, "wire it up like this, copy this kernel.img on your SD Card and off you go". A typical project would be a serially controlled HDMI text display.

I'm looking at a target audience which likely has no interest in the R-Pi itself, just wants the end result, and I want to make the 'how to' as simple as possible, reduce support questions on setup, configuration and installation. If I can get projects using any 32MB+ SD Card, FAT32 formatted, simple drag and drop of files, power-up and it works, I'll be happy :-)

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Bare metal motivations

Tue Jul 24, 2012 7:38 pm

My idea for the R-PI was to port my OS to it, to that end i made good progress.
I had both a working GUI and CLI, but then it hit me, i would alway be at a
big disadvantage with linux in terms of drivers etc, anyone that needed a gui
or cli could use linux.
So i thought that what is needed is not another desktop OS, but more useful
would be to use the R-PI as a more powerful arduino like device, so my aim is to code a set of functions that lets you code for your R-PI in basic, that will run bare metal and boot right into your program.
You can use these embedded basic command to do anything you want with the P-PI including if you want, to use them to build a OS or for real-time electronics etc, its up to you.
I also want to let people make cool stuff for the PI, who have no interest in learning programming at all, but also hope the very same code would be useful to help people learn low level stuff, if they chose to dig deeper.
Batteries not included, Some assembly required.

valtonia
Posts: 26
Joined: Wed Jul 04, 2012 9:09 pm

Re: Bare metal motivations

Tue Jul 24, 2012 10:23 pm

My approach is a combination of a bit of nostalgia for me from my Spectrum / C64 / BBC coding days (yes I really am that old!) and to try to provide that same environment to kids now, without the learning curve of Linux + Python.

So, I'm hoping to produce what I call a "switch on and code" system, which will most likely implement a kind of BASIC language. So far I'm laying the groundwork in terms of memory management, graphics, sound, keyboard input etc. and making fair progress. I'm certainly not looking to produce the next big desktop OS.

Now I'm not saying there's anything wrong with Linux + Python, only that kids today don't have the patience/attention span they did when I was young(er) so I wanted to provide that same instant gratification you can get by switching on, typing 'print "hello"' and see it appear on the screen.

V.

Return to “Bare metal, Assembly language”