Hardware for Operating System development theory

Discussion of the PICO module, baseboard or peripherals

Hardware for Operating System development theory

Postby Chuoiujk » Wed Dec 28, 2016 7:40 am

:D I am heavily interested in Operating System theory and design and have decided I would like to play with developing an OS. I have a background in x86 assembly and have looked into ARM also. I would like a development board to develop the OS for. Has anyone had experience with OS development and/or can suggest some hardware to use?

One board I am considering is the LPC1769 LPCXpresso board.

I am aware I could use a VM, but I would like to use actual hardware.

Then I have figured something out.
Coincidently I am currently trying to (just for fun) write my own RTOS on a small PIC24FJ32GA002 (had it lying around, easy to work and test with). This is a simple 28-pin 16MIPS 16-bit controller, but does the job in my case. I currently got a task kernel working so I can switch tasks, use delays handled by the RTOS etc. Now moving on to more abstract features with memory and peripheral communication (handled by the RTOS).

I don't think you need a monster microcontroller to run any RTOS. The task kernal only consumes 500~600 instructions and about 300~400 bytes of RAM for 2(+1idle) tasks. Even this low memory device has 10.5k instructions and 8KB of RAM, so I am only using about 5% now.

For an RTOS its very important that the CPU supports some kind of easy stack changing, so you can change the application context fast. For example, I know some of the older PICs (like a PIC16 or a PIC18 device) have got hardware based stacks. On the PIC24 I am storing the context (pushing CPU registers onto the stack), changing the stack pointer (to the stack of another task) and resuming the context (popping CPU registers from the stack).

The ARM chips doesn't have a hardware based stack, so they are good to go. Note that the LPCXpresso board comes with it's own compiler and development environment. This means you must use the code_red compiler and environment for the onboard debugger. The debugger doesn't work with another environment, because the software for the debugger is loaded by their own IDE. The free compiler version of the compiler also has a 128KB code restriction. This is amount of code that can be debugged, I believe. 128KB is plenty for a small RTOS to start with.

You can always get your own JLINK or JTAG programmer, but you would have to wire the SW or JTAG port to the LPC1769 board. Other than that, the LPC1769 has plenty of resources and peripherals to start going. I don't know from my experience how good the debugging tools is on the LPCxpresso when you're debugging really low-end stuff (like task switching). On the PIC24 I had to second-guess what is going on, MPLAB didn't properly capture hang-ups.. Nevertheless it's still possible. For ARM there also plenty of RTOS and resources out there to take a peek at.
I expect answers to be supported by facts, references, or expertise. Any suggestions will be much appreciated! Thanks ! !
Chuoiujk
 
Posts: 1
Joined: Wed Dec 28, 2016 7:33 am

Re: Hardware for Operating System development theory

Postby saikumar » Fri Jul 21, 2017 7:09 am

The kernel is a computer program that is the core of a computer's operating system, with .... In theory, the device should work correctly with the suitable driver. ... Allowing the operating system direct access to hardware resources. ..... Rapid development time and new software can be tested without having to reboot the kernel Operating Systems Development - Basic Theory by Mike, 2009 ... The idea of an interface between hardware and programs came during the Mainframe era
saikumar
 
Posts: 1
Joined: Fri Jul 21, 2017 7:06 am


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 1 guest