CS 452/652 Spring 2022 - Lecture 1
May 3, 2022
next
Course Overview
purpose: tackle a difficult and sizeable implementation project!
key characteristics
full-stack, including low-level communication
timely interaction with real-world system: latency bottleneck
robustness against defects (train, switch, sensor)
Software Development
small kernel
no memory translation/protection, no file system
micro-kernel with send-receive-reply (SRR) communication
multi-threading, no locking → concurrency & non-determinism
interrupt handling
train control
model and control real-world system in software
address multi-dimensional problem space
System Overview
train set, controller, ARM computer, Track PC, TFTP server, development computer
see
sketch
development
two-box model: development vs. execution
manual linking and loading
gcc/g++ with basic library support → freestanding: no heap
rudimentary gdb support
example code provided
C standard library
a lot of C functionality comes from the C standard libray
C standard library interfaces with operating system
here:
newlib
, but no operating system kernel
limited functionality - no heap!
using newlib routines that always need dynamic memory → not possible
using newlib routines that might need dynamic memory → might be possible
if certain that heap-needing functionality not triggered
linker might still want to resolve heap-related
program break
symbol → fake it!
Assignment 0
assignment is out and due next week → start now
generic polling loop
for (;;) { if (c1) a1(); if (c2) a2(); ... }
Memory Layout
TS-7200 RAM
0x2000000
high end of 32 MB RAM
0x0218000
historic Linux load/start address
0x0100000
suggested load address
0x0044F88
lowest possible load address
0x0000000
low end of RAM
at runtime: code, data, no heap, stack
ELF file format - sections: text, data, bss
text and data are placed by RedBoot 'load' command
entry point is learned by RedBoot for 'go' command
bss section must be zeroed by program itself
RedBoot 'go' does not re-initialize the data section