0% found this document useful (0 votes)
3 views

Lecture1.2_Introduction to Embbeded System Design

The lecture introduces the fundamentals of embedded system design, covering the development process and necessary tools. Key topics include the roles of host and target systems, hardware and software platforms, and debugging techniques. It emphasizes the importance of understanding microcontroller-based project development and the various components involved in creating embedded systems.

Uploaded by

22022165
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lecture1.2_Introduction to Embbeded System Design

The lecture introduces the fundamentals of embedded system design, covering the development process and necessary tools. Key topics include the roles of host and target systems, hardware and software platforms, and debugging techniques. It emphasizes the importance of understanding microcontroller-based project development and the various components involved in creating embedded systems.

Uploaded by

22022165
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

VietNam National University

University of Engineering and Technology

EMBEDDED SYSTEM FUNDAMENTALS


(ELT3240, NHẬP MÔN HỆ THỐNG NHÚNG)

Dr. Nguyễn Kiêm Hùng


Email: [email protected]
Lecture 2:
Introduction to Embedded System Design

2
Objectives

In this lecture you will be introduced to:


– The embedded system design process.

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

Software to talk the host


Cross-Compiler Debugger
Debugger target
Testbench program system

serial line
Host system
7
Designing with Platform

• Platform provides the environment in which we can


develop our embedded applications quickly.
• Before real hardware is built, software can be
developed and tested using platform
• It encompasses both hardware and software
components
8
Designing with Platform: Hardware

• DMA provides direct memory access.


• Timers used by OS, devices.
• Multiple busses connect CPU and memory to devices.
– low-speed: provides an inexpensive way to connect simpler devices
– high-speed: allows fast devices to communicate efficiently
• Multiple buses serve two purposes:
– reduce the overall load and increase the utilization of the buses
– low-speed buses provide simpler and cheaper interfaces than high-speed buses
9
Designing with Platform: Software
• Hardware vendors
generally provide a
software platform to
encourage use of their
hardware.
• Software Platform
provides core functions,
utilities.
• Low-level functions
depend on architecture-
--interrupt vectors, etc.

Software layers for an embedded system

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

What is needed to start (4):


• Hardware Abstraction Layer (HAL)
– Definitions of peripheral registers
• Device Driver
– Functions for configuring and accessing the peripherals
• Documents and other resources
– some example code
– user manuals, application notes

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

• Intellectual property (IP) is something that we


can own but not touch
– Hardware designs, source or object code,
schematics, netlists, etc.
• Used at all levels of design:
– Schematics for hardware reference design.
– Drivers and run-time libraries.
– Software development environments.

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

• Breakpoint is the important debugging tool that


specify an address at which the program’s execution
is to break.
• A breakpoint allows the user to stop execution,
examine system state, and change state.
• Replace the breakpointed instruction with a
subroutine call to the monitor program.

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

uninstrumented code code with breakpoint

• Save registers.
• Allow user to examine machine.
• Before returning, restore system state.
20
LEDs (Light-Emitting Diodes)

• Used to indicate the system state (such as


error condition, idle state, …) even if they will
not normally used in applications.

21
In-circuit emulators

• A microprocessor in-circuit emulator is a


specially-instrumented microprocessor.
• Allows you to stop execution, examine CPU
state, modify registers in a working
embedded system.

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

Editor KeilTM uVision®


Simulated Processor
Source code Start Microcontroller
Start
; direction register Debug
LDR R1,=GPIO_PORTD_DIR_R Session Memory
LDR R0,[R1]
ORR R0,R0,#0x0F
; make PD3-0 output I/O
STR R0, [R1]

Build Target (F7)

Object code Real Processor


Microcontroller
0x00000142
0x00000144
4912
6808
Download
0x00000146 F040000F Memory
0x0000014A 6008 Start
Debug
Session I/O
Address Data

SW Development Environment

The Program Development Cycle 27


Microcontroller-based project development

Schematic

PCB Layout

PCB Board

Program development cycle 28


Outline
• Embedded System Development with
Platform
• Microcontroller-based Embedded
System Design
• Summary

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

You might also like