ANSWERS.
What is an embedded system? correct answers a programmed controlling and operating system
with a dedicated function within a larger mechanical or electrical system, often with real-time
computing constraints. It is embedded as part of a complete device often including hardware and
mechanical parts.
Textbook:a computer system embedded in another device
Give an example of an embedded system correct answers Industrial Robots, GPS Receivers,
Digital Cameras, DVD Players, Wireless Routers, Set top Boxes, Gaming Consoles,
Photocopiers, Microwave Ovens, MP3 Players
Give an example of a non-embedded system correct answers computers, mobiles, tablets
What is one difference between designing for embedded vs non embedded? correct answers •
Embedded in a system
• Real-time constraints
• Resource Constraints
• Application Specific
Are embedded systems typically application specific or general purpose? correct answers
application specific
Application specific correct answers How is the functionality different than PCs?
• Implements specific functions
• PCs are general purpose
Performance?
• Must meet real time constraints (e.g. brakes need to activate)
• PC - can handle delay or crash
Operation?
• Processing in response to input stimuli
• PC - processing in response to human/batching
What are some resource constraints for embedded systems? correct answers • Size/Form Factor
• Memory Capacity
• Disk Capacity
• Display
• Energy
• Environment (vibration, temperature, radiation)
• Cost!
,What is the difference between hard-real time and soft-real time? correct answers • Soft Real-
Time - Failure to meet time constraint = Degraded
performance
• Hard Real-Time - Failure to meet time constraint = Failure
Name three types of processors that may be used for embedded systems correct answers •
Microcontrollers (e.g. MSP430, PIC, Atmel)
• Digital Signal Processor Controllers
• Microcomputers
• FPGAs
• ASICs
What is a microcontroller? correct answers A microcomputer on a single chip. It brings together
the
microprocessor core and a rich collection of peripherals and
I/O capability
Why are microcontrollers used for most embedded systems? correct answers Peripheral Loaded
• ADCs, DACs, GPIOs, Serial, Timers, etc...
Cheap
• ∼ $1 for 8-bit processor
Low Power
• ∼ 300µA operation (AA battery for 275 days)
• < 300µA sleep (AA battery for 225 years)
Programmable - Usually Assembly, C, C++
What is the most predominant language for embedded systems? correct answers C/C++ are still
the dominant languages
Why is C the most predominant language? correct answers C/C++ are built into development
environments and compilers, industry standard, not likely to go away!
What is the compilation flow? correct answers (Pre-processor, compiler, assembler, linker)
Preprocessor correct answers Prepares file for compiler, handles processing
macros, source selection, preprocessor directives, and file includes
Compiler correct answers Converts (nearly) machine independent C code to
machine dependent assembly code
Assembler correct answers Converts assembly language to machine language of
an object relocatable file (addresses not all resolved)
, Linker correct answers - Combines all object files and resolves addressing issues
Loader correct answers When executed, loads executable into memory
What is a cross-compiler? correct answers A compiler that runs on one platform but outputs
code for another target machine (e.g. Intel compilation of microcontroller code to run on
embedded architecture)
What is cross compiling is important? correct answers It's a very useful technique, for instance
when the target system is too small to host the compiler and all relevant files.
A cross compiler is necessary to compile for multiple platforms from one machine. A platform
could be infeasible for a compiler to run on, such as for the microcontroller of an embedded
system because those systems contain no operating system.
What is an identifier? correct answers name of function or variable
How is identifier different from a variable name? correct answers ...Identifier particularly names
a 'variable, function, structure, enum, class etc'. An identifier distinctly identifies an entity in a
program while its execution. Two identifiers cannot have the same name in a program.
Variable is a "name given to a distinct memory location". This named memory location contains
a value which may be modified while program gets executed. In C, variable must be declared at
the beginning of a program whereas, in C++, a variable could be declared anywhere in a
program.
Variables can be 'local', 'global' or 'reference' . Local variables are declared inside a function;
global variables are declared outside a function. Reference variables are those which provide an
"alternate name" for the previously defined variable.
If a variable is referenced to another variable, both the variables can be used alternately to
represent that variable. If a variable accepts the value of an argument in a function, these
variables are called 'formal parameter'.
Are identifiers case sensitive? correct answers YES
• CASE SENSITIVE!
• First character must be alphabetical or underscore
• May NOT be a C keyword (e.g. int, return, this)
• No length limit imposed by standard (but may have compiler
limitation)
What is the difference between declaration, definition, and initialization? correct answers
Declaration - Puts the variables name into the namespace
Definition - Allocates memory