W1.1 Introduction To Embedded System
W1.1 Introduction To Embedded System
Embedded System
An Embedded System (ES) is ….
• …
Embedded Systems?
http://www.imm.dtu.dk/~jbjo/cps.html https://www.flickr.com/photos/wilgengebroed/8249565455
Embedded Systems vs General Purpose Computers
[https://en.wikipedia.org/wiki/Digital_audio]
Properties of Embedded Systems
[https://www.efxkits.us/classification-of-embedded-systems]
Timing characteristics
Other SoC
• Qualcomm - Snapdragon • Google - Tensor
• Samsung - Exynos • Broadcom - BCM series
• Huawei - Kirin (used in Raspberry Pi)
• MediaTek - Dimensity, Helio • Intel - Atom, Movidius
• Apple - A-series (e.g., A16 • AMD - Ryzen Embedded
Bionic), M-series (e.g., M1, • Rockchip - RK series
M2) • Unisoc - Tiger series
• NVIDIA - Tegra • Allwinner - A-series
Microcontroller SoC
FPGA
512
512
262,144 pixels!!
Different Embedded Systems Hardware Options
https://xkcd.com/303/
‘Typical’ Product Development Process
• Requirements (ISO/IEC/IEEE 29148:2011)
• Constraints
• Specifications • Block Diagrams (UML)
• Constraints High level • Data Flow Graph
Analyze Design
the problem
Engineering
• New requirements Design
• New constraints
Not done
Done
• System Hardware
Deployment Testing • Code Software
Implementation • Call graph
• Data structures
• I/O interfaces (e.g. drivers)
• Low-level language
• good for squeezing the best performance from the underlying hardware
• Code abstraction
• Portable
Assembly C
Loader /
LINKER Locator
assembler
• Compiler
• Translate programs written in human-readable language into an
equivalent set of opcode for a particular processor
• Native compiling - compiling for the same architecture you're running under
Loader /
LINKER Locator
assembler
• A small block of assembly language code that prepares the way for the execution of
software written in a high-level language.
• Most cross-compilers for embedded systems include an assembly language file called
startup.asm or crt0.s (short for C runtime).
• Typical startup code:
• Disable interrupt
• Copy data into RAM
• Zero uninitialized data area
• Allocate space and initialize the stack
• Create and initialize the heap
• Enable interrupt
• Call main
C/Assembly Code into Binary File
C Library (.a) / C-SDK
compiler
Loader /
LINKER Locator
assembler
• every link is controlled by a linker script, that describes how the executable are mapped
onto the memory during execution.
Prof, Explain It to Me in Plain English
C SDK Compiler Bootloader
The C SDK (Software Development Kit) for The compiler is a tool that translates the user's The bootloader is a small program pre-installed
the Raspberry Pi Pico provides a collection C source code into machine code (binary) that on the Raspberry Pi Pico. It is responsible for
of libraries, functions, and tools that simplify the Raspberry Pi Pico can understand. The loading the compiled binary into the
hardware interaction. It abstracts the low- compiler processes the source code, linking it microcontroller's flash memory and executing it.
level details of the microcontroller, allowing with the necessary libraries from the C SDK, When the Raspberry Pi Pico is powered on or
the user to focus on writing high-level and generates an executable binary file. This reset, the bootloader checks for the presence of
application code. The SDK offers pre-written binary file is typically in the form of a .uf2 or .bin a new binary file (e.g., via USB) and writes it to
code to manage peripherals, such as GPIO, file. flash memory if found. If no new binary is
PWM, UART, and others. detected, it simply runs the existing program