Lecture 7 - Tools for embedded programming Flashcards

1
Q

What are static analysers?

A

Analyzes source code for potential errors.
Looks at every possible code-path,
Out of bound read/writes
Null pointer dereferences
Memory allocation/deallocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Run-time analysers

A

Out of bound read/writes
Memory allocation/deallocation
Use of uninitialised variables
Track of what code is running
measure cache misses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are unit tests?

A

Known input compared agains expected output

Check error handling

Test corner cases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are integration tests?

A

Test real-world scenarios
Wrong input - error handling
Regression tests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are performance tests?

A

Speed (throughput, latency)
Memory usage
IO bandwidth usage
Cache misses
power efficiency
Scalability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What do you need to be aware of when doing performance testing?

A

Make sure test is not optimized away by compiler

Measure only interesting parts

Run long enough to give stable result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can you evaluate code coverage?

A

All functions are tested

All lines are tested

All branch conditions are tested

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are some tools that are useful when writing software

A

IDEs
Compilers
Build systems
Version control

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What can IDEs provide?

A

syntax highlighting, tab-completion, navigation, build system integration, debugger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does build systems do?

A

Invokes compiler and other tools

Start builds, tests, packaging, flashing

Avoid repeating unecessary steps

Allow configurable builds (debug, release)

find dependencies

Takes care of platform differences

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does version control tools do?

A

Keeps track of changes made

Allow multiple people working on the same code

Branching/merging

Synch with remote code repositories

run tools on change (CI)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does debuggers do?

A

Breakpoints

watching variables

Stepping through code
read/write memory
call functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a limitation of embedded system in regards to debuggers?

A

Might not be enough memory to run debugger itself

No direct access to memory from outside

No usable I/O lines

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What can be used to debug embedded systems?

A

JTAG: standard protocol for debugging a chip using a few wires

Functionality:
Boundary scan
R/W to registers and mem
Stop/start/step the CPU
Flashing

Drawbacks:
Limited functionality
Standard signalling but (often) proprietary commands
Requires special hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a stub debugger?

A

Requires a spare seriel port

  • Minimum code to read/write mem and reg
  • Requires Kbs of flash mem
  • Needs acces to UART or SPI communication
  • Needs to hook into some interrupts

A real debugger on PC will interface with th stub debugger

Drawbacks:
-limited func.
- Needs modification of your embedded software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does simulators do?

A

If you run your code in a simulator, a debugger can connect to it

Pros:
- unlimited debug power
- no hardware needed
- can run faster than real hardware
- easy to automate

Cons:
- May not be perfectly accurate
- No access to peripherals
- system as a whole is different than the real system

17
Q

What is the goal of continuous integration?

A

Automate as much as possible

Always keep project in a releasable state