Embedded Operating System for newbies (long post; sorry)

Greetings Everybody!

I am a final year EE student working on my final year project. The aim of the project is to develop an embedded system that showcases whatever i've learnt about microcontrollers and programming.

I've chosen a simple project to do so. I'm developing an "Embedded Inventory Control". Considr a warehouse with components A,B and C. Each in its own crate, they have differnt weights. So when 1 crate at a time leaves the warehouse, i use a load cell and ADC to measure its weight. Thus the stock of that component can be updated. When the stock dips below a preset, the micro hooked up to a server triggers a chain of events. The PC sends an email to the 'supplier' ordering more components and an email/sms to the 'owner'. Meanwhile the owner can also access the PC (through the internet) to find out the stock of each component.

I know many of you will have rolled your eyes and said "there are better ways to do this!", but please bear with my design. So far I've used PIC16F877 and C programming. Since there are several functions involved, i've used a multi-file program. I want to extend this concept now to an OS level.

How do i write a code so that the 'feel' is of an OS using programs rather than a program using functions? Any suggestions?

Regards, Devyn

Reply to
Devyn
Loading thread data ...

I think Linux on a PC would be the easiest. But if you have never configured a Linux system before you are in for a long project (or at least long hours). Since you sound like you are at a university or technical college you might be able to borrow a machine already configured for terminal mode or get somebody else to coach you through the process.

Write code in "C", compile with gcc and then you can string your modules together with shell scripts.

Also see if you can scare up a copy of "Embedded Linux" by Hollabaugh. One of many books on the subject. Good in that it follows a project in a documentary fashion with enough details for you to figure stuff out on your own.

Rob Young snipped-for-privacy@ieee.nospamplease.org (can you figure out the correct address?)

Reply to
Rob Young

An OS loads and executes programs and manages resources such as I/O, memory and a file system. Using a programmed microcontroller you can mimic this by having an "OS" program that steps through a list of "tasks" and calls the appropriate "program" for each step. The main change you need to make to your existing program is to replace the main program, which is calling the functions directly, with a program that reads the addresses of the functions from a list of tasks (also stored in flash memory), calling them indirectly. You will also need a standardized method for programs to communicate with each other. In a PC this is done by reading and writing files, but you have no external storage, so set aside a few registers to serve as your "file system".

Before you start, do some reading about real OS's to get more ideas and to help justify your claim that this is a minimal OS. Also, write down a procedure so that someone unfamiliar with the system could efficiently install or remove programs without breaking the OS.

-- Joe Legris

Reply to
Joe Legris

There is a uCos port for a real time kernel from Nathan Brown as freeware at

formatting link
We use the original version on the arm chips and it works well

Reply to
martin de lange

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.