Lecture1.2_Introduction to Embbeded System Design
Lecture1.2_Introduction to Embbeded System Design
2
Objectives
4
Outline
• Embedded System Development with
Platform
• Microcontroller-based Embedded
System Design
• Summary
5
What is necessary to develop embedded
systems?
6
Development Environments
• Host system: a computer running programming tools for development.
Use a host system to
– prepare software for target system
– load programs into the target;
– start and stop program execution on the target; and
– examine memory and CPU registers
• Target System: the HW on which code will run
serial line
Host system
7
Designing with Platform
10
Designing with Platform
What is needed to start (1):
• Development tool suites:
– STM32CubeIDE
– Keil ARM-MDK
11
Designing with Platform
What is needed to start (2):
• Development board:
– Development boards usually have the same
CPU as the end product and provide many
IO peripherals for the developed software
to use as if it were running on the
real end product
– Designed by CPU manufacturer or others.
– Includes CPU, memory, some I/O devices.
– May include prototyping section.
– CPU manufacturer often gives out
reference design---can be used as starting
point for your custom board design.
12
Designing with Platform
What is needed to start (3):
• Debug Adapter
– To download and debug your program code on the
microcontroller
– Debug adaptor products vs. built-in USB debug adaptor
13
Designing with Platform
14
Choosing a platform
Hardware
• CPU: choice of instruction sets, features (e.g. clock
speed, bus data width, integrated peripherals), etc.
• Bus determines available I/O devices, system
performance.
– To pay attention to the required data bandwidths to be sure
that the bus can handle the traffic
• Memory: size (for data and code), speed (determining
system performance ), cost.
• I/O devices vary in performance, cost.
15
Choosing a platform
Software
• Software Support:
– Run-time components: code libraries, OS, File System,…
– Development Environment, debugging tools, …
16
Intellectual property
17
Debugging Techniques
How to validate code
• Run on host system.
– Run in instruction-level simulator.
– Run on cycle-accurate simulator.
• Run in hardware/software co-simulation
environment.
– In-circuit emulator: is a specialized hardware tool that
can help debug software in a working embedded system
• Run on target system.
18
Breakpoints
19
ARM breakpoints
0x400 MUL r4,r6,r6 0x400 MUL r4,r6,r6
0x404 ADD r2,r2,r4 0x404 ADD r2,r2,r4
0x408 ADD r0,r0,#1 0x408 ADD r0,r0,#1
0x40c B loop 0x40c BL bkpoint
• Save registers.
• Allow user to examine machine.
• Before returning, restore system state.
20
LEDs (Light-Emitting Diodes)
21
In-circuit emulators
22
In-circuit emulators
23
Logic analyzers
• A logic analyzer is an array of low-grade oscilloscopes:
– can sample many different signals simultaneously
– Two sampling modes:
• Timing mode uses an internal clock that is fast enough to take several samples
per clock period in a typical system(greater resolution, detecting glitches)
• State mode, on the other hand, uses the system’s own clock to control
sampling, so it samples each signal only once per clock cycle.
24
Outline
• Embedded System Development with
Platform
• Microcontroller-based Embedded
System Design
• Summary
26
Microcontroller-based project development
SW Development Environment
Schematic
PCB Layout
PCB Board
29
Summary
• What we Learned
– Basic concepts of Embedded System-on-Chips
– Necessary things to develop embedded systems
– The embedded system design process and different
abstract levels for describing Embedded Computing
Systems
30