Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: My first attempt to understand this Raspberry Pi

Fri Aug 31, 2012 10:29 pm

DexOS,

OK, I'm with you, "bare metal OS" can provide services but does not disalow direct hardware interaction. Fair enough.
50k and has all the normal stuff like cli, gui, tcp/ip stack, has a fasm port and ide

That is an impressive feat. Especially to now have it in two different architecture versions. Why did you go that way rather han using C or other HLL?

I'd certainly be interested in trying out your x86 version. I'm curious.
Memory in C++ is a leaky abstraction .

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

Re: My first attempt to understand this Raspberry Pi

Sat Sep 01, 2012 2:14 pm

At the beginning it was going to be a pascal OS, but it ended up 90% inline assembly, so i just switched to 100% ASM.
Theres a common belief that people only code in ASM to optimize code for speed or size, but there are some crazy people out there that actually like coding in assembly, we are control freaks and these very same control freaks are also the the type to code there own OS ;) .

You can download and test the x86 ver here: http://www.dex-os.com/
You can run it in a emulator to test it.

You can also test some of the function of the arm ver here: http://www.dex-os.com/DexBasic/DexBasic.htm

Just follow the tuts, which uses fasms macro to make a basic like language.
The full OS with cli and gui will be released what i have done the pcb boards.
There's also youtube videos if you search for "ASM OS"
Batteries not included, Some assembly required.

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: My first attempt to understand this Raspberry Pi

Sat Sep 01, 2012 5:09 pm

DexOS,

I can imagine writing an OS in Pascal would become a pain. There is a reason all (most) operating systems are written in C.

Years ago I came accross a book about writing MS Windows programs. MFC and all that. However this book was showing you how to do it in x89 ASM rather than C++. At the time I found it easier to understand than the all that C++ junk.

Thanks for the link, I will check it out. Does x86 dex-os run on any real bare metal systems, like an 8086 board or so?
Memory in C++ is a leaky abstraction .

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

Re: My first attempt to understand this Raspberry Pi

Sat Sep 01, 2012 6:46 pm

Heater wrote:Thanks for the link, I will check it out. Does x86 dex-os run on any real bare metal systems, like an 8086 board or so?
Yes it will run on any x86 sys, from 486 up to the latest sys as long as it still uses BIOS for booting.

It can boot using floppy, cd, hdd, usb, also it can boot from Dos.
See here for how to: http://www.dex-os.com/Doc/DexOS_Building_Installing.txt
This is it booting from a x86 computer the size of the PI
http://www.youtube.com/watch?v=mYJx2zZK7c8

Its called a eBox 3350MX
http://robosavvy.com/store/product_info ... ts_id/1704
Batteries not included, Some assembly required.

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

Re: My first attempt to understand this Raspberry Pi

Sat Sep 01, 2012 7:02 pm

Note that connecting a propellor chip to the PI (using the PI's UART) is a good way to interface a keyboard and a mouse to a PI, without the need to use USB, or the need to interface keyboard and mouse directly to the PI.

On the propeller you only need to hook up two mini_DIN connectors to the propeller, and use some existing code for PS/2 keyboard, serial mouse and UART communication interfaces, (you can also use existing board designs, as many of them has the right connectors, for example the "Hydra" board, or one of the many open hardware designs, but its also easy enough to wire it up on a piece of perfboard) then you can design a protocol to send data packages with keyboard and mouse data over the serial connection to the PI, where you split the packages in two streams, one for the keyboard and one for the mouse. That way you only need the one UART on the PI for both keyboard and mouse I/O.

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

Re: My first attempt to understand this Raspberry Pi

Sat Sep 01, 2012 8:30 pm

mahjongg wrote:Note that connecting a propellor chip to the PI (using the PI's UART) is a good way to interface a keyboard and a mouse to a PI, without the need to use USB, or the need to interface keyboard and mouse directly to the PI.

On the propeller you only need to hook up two mini_DIN connectors to the propeller, and use some existing code for PS/2 keyboard, serial mouse and UART communication interfaces, (you can also use existing board designs, as many of them have the right connectors, for example the "Hydra" board, or one of the many open hardware designs, but its also easy enough to wire it up on a piece of perfboard) then you can design a protocol to send data packages with keyboard and mouse data over the serial connection to the PI, where you split the packages in two streams, one for the keyboard and one for the mouse. That way you only need the one UART on the PI for both keyboard and mouse I/O.
Nice, thanks for the info, i new you could do this with the arduino, but it seems just as simple with the propellor chip.
Batteries not included, Some assembly required.

User avatar
liz
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 5212
Joined: Thu Jul 28, 2011 7:22 pm
Contact: Website

Re: My first attempt to understand this Raspberry Pi

Sun Sep 02, 2012 12:32 am

One of our interns has written a lovely intro to bare metal on the Raspberry Pi as his summer project. He's polishing it at the moment, but I'm hoping to get it on the front page next week.
Director of Communications, Raspberry Pi

W. H. Heydt
Posts: 12648
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: My first attempt to understand this Raspberry Pi

Sun Sep 02, 2012 6:26 am

DexOS wrote: Theres a common belief that people only code in ASM to optimize code for speed or size, but there are some crazy people out there that actually like coding in assembly, we are control freaks and these very same control freaks are also the the type to code there own OS ;)
While I have been toying with the idea of learning the assembly language of the Pi (with an eye to translating a program I once wrote in ALC on a 360/50 to completely solve the Soma Cube...it took 4 hours to run...), I might be more enthusiastic about going back to using such languages if I hadn't spent some time maintaining an 11,000 line assembly program that was the main posting program for demad deposit application....

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

Re: My first attempt to understand this Raspberry Pi

Sun Sep 02, 2012 3:58 pm

liz wrote:One of our interns has written a lovely intro to bare metal on the Raspberry Pi as his summer project. He's polishing it at the moment, but I'm hoping to get it on the front page next week.
Great look forward to that, it will be cool to get some bare metal on the front page.
Batteries not included, Some assembly required.

adlambert

Re: My first attempt to understand this Raspberry Pi

Mon Sep 03, 2012 10:46 am

liz wrote:One of our interns has written a lovely intro to bare metal on the Raspberry Pi as his summer project. He's polishing it at the moment, but I'm hoping to get it on the front page next week.
Is it this by Alex Chadwick?

http://www.cl.cam.ac.uk/freshers/raspbe ... orials/os/

Looks like the best thing I've found to do with the Pi so far, for my interests as I am not a fan of slow lumbering linux GUI. Please pass on my thanks and congratulations to him, this is brilliant!

Return to “General discussion”