Lecture24 - CIS 450 Computer Architecture and Organization Lecture 24 BrickOS Real-Time Operating System Mitch Neilsen([email protected] 219D Nichols

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 450 – Computer Architecture and Organization Lecture 24: BrickOS Real-Time Operating System Mitch Neilsen ([email protected] ) 219D Nichols Hall
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Topics ± RCX Hardware/Peripherals ± BrickOS real-time operating system z Successor to legOS 0.2.4 z Available at: http://brickos.sourceforge.net z Installation/building using GCC cross-compiler ± BrickOS Kernel z Task Management (TM) z Memory Management (MM) z InterProcess Communicaton (IPC) z IR Networking (Legos Network Protocol = LNP)
Background image of page 2
Lego Mindstorms Hardware R obotics C ommand E X plorer ( RCX 1.0 ) Hitachi H8/300 microcontroller 16 KB ROM, 16 KB RAM 16 MHz system clock 16 bit free-running timer 3 sensor ports (for light, touch, sound, temperature, etc.) 3 motor (actuator) ports IR transmitter/receiver LCD screen
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
RCX Hardware 32k RAM Hitachi H8/3292 microcontroller 16k ROM A/D Converter 16-bit Timer 8-bit Timer I/O Ports
Background image of page 4
H8/3292 Microcontroller Details ± Series H8/3297 ± Product name H8/3292 ± Part number HD6433292 ± ROM size 16K ± Internal RAM size 512 bytes ± Speed 16MHz @ 5V ± 8-bit Timers 2 ± 16-bit Timers 1 ± A/D Conversion 8 8-bit ± I/O pins 43 ± Input only pins 8 ± Serial port 1 ± 10mA outputs 10
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Hitachi H8/3292 microcontroller ± 16-bit Address Space ± 8 16-bit General Purpose Registers: R0, R1, R2, … , R7 z Byte-addressable: R0H, R0L, R1H, R1L, … , R7H, R7L ± 2 Control Registers z 16-bit Program Counter (PC) z 8-bit Condition Code Register (CCR) (status register) z R7 is used as the Stack Pointer (SP = R7) ± 16 kb ROM z contains a driver that is executed when the RCX is powered z provides low-level routines that call interrupt handlers in RAM so that interrupt handling can be customized in firmware ± 512 b Static RAM on-chip (mapped to 0xFD80-0xFF7F) ± Factory default firmware (standard firmware) contains a bytecode interpreter, which leaves only 6 kb of RAM for user programs / . Idea: replace the factory default firmware with our own lean and mean firmware .
Background image of page 6
CPU Registers
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CPU Instructions
Background image of page 8
External 32 kb RAM ± External RAM is referenced in address range: 0x8000-0xFB7F, only address 0x7B7F = 31,615 bytes. ± On-chip RAM (512 bytes) is mapped to: 0xFD80-FF7F. ± External RAM in: 0xFF80-0xFF87 (hmmm, 8 bytes ). ± On-chip registers are mapped to memory in: 0xFF88-0xFFFF.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
H8/3292 Address Map – Mode 2
Background image of page 10
Stack Frame Layout
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
BrickOS (LegOS 0.2.4) Kernel Kernel Initialization and Timing kmain.c and systime.c • Task Management tm.c • Interprocess Communication lnp.c, lnp-logical.c and semaphore.c
Background image of page 12
Hitachi H8 ROM Start-up driver for Firmware = kmain( ) •The kernel starts when kmain( ) is called by ROM. •This function initializes the kernel before starting in either single tasking or multitasking mode. •In multitasking mode, 3 tasks are started:
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/09/2008 for the course CIS 450 taught by Professor Neilsen,mitch during the Spring '08 term at Kansas State University.

Page1 / 49

Lecture24 - CIS 450 Computer Architecture and Organization Lecture 24 BrickOS Real-Time Operating System Mitch Neilsen([email protected] 219D Nichols

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online