Sunteți pe pagina 1din 15

Embedded Software Essentials

Embedded Software Engineering


C1 M1 V3
Flow Diagram
No
Algorithm Based sleep()
UART Packet
Received?

Yes
Shows functional behavior
process_serial_data()

Conditional Decisions
No Full Message
Received?
High Level Function Calls
Yes

process_message()
Software Block Diagram
C-Files are modules

nrf24.c
Device nrf_write_reg() nrf_read_reg()
Specific

Many definitions
spi_write_n() spi_read_n()

spi.c
Functions interact Firmware spi_write() spi_read()
with other modules

port.c
set_pin()
Eventually interact
with Hardware Hardware SPI Peripheral Module
Layer
GPIO Hardware
Software in Layers

Device Drivers
Interface to hardware layers Applications
HAL Hardware Abstraction Layer
Middleware Libs
Code Booting
Operating System
Operation System (OS)
Abstracts High from Low levels
Scheduling Drivers Bootloader
Resource management
Hardware
Libraries for shared code
Hardware Abstraction

Bare-Metal Firmware (FW)


Low Level Control
High Level Software Application Level

Hardware Abstraction Layer (HAL)


Bare- spi_write_n() spi_read_n()
Platform Independence Metal

spi.c
Firmware

port.c
set_pin() spi_write() spi_read()
Portable Interface
SPI Peripheral Module
Hardware
Layer GPIO Hardware
Software Components
Freedom Freescale KL25z

Control_Lib (Version 2) Control_Lib (Version 1)

Nordic_Lib
UART_Lib
New Component SPI_Lib Older
can slide in LED_Lib Component is
utilizing the same SPI FW KL25z UART FW KL25z removed and
interface with becomes legacy
SPI Peripheral UART Peripheral
lower Levels
Module Module
GPIO HW

GPIO SPI UART


3 Bus

RGB nRF24L01+
LED Module Off-Board
Software Engineer Tools
Simulators

Emulators

Compilers

Installers

Debuggers
Software Engineer Tools
Simulators
Require a host system
Emulators and software
applications to run these
tools
Compilers

Installers

Debuggers
Software Engineer Tools
Programmer/Debuggers
Simulators

Emulators

Compilers

Installers Might be combined


into a Single
Hardware Solution
Debuggers
Principles of High Quality Software
Build and Design Embedded Software that is:
Maintainable
Testable
Portable
Robust
Efficient
Consistent
Principles of High Quality Software
Build and Design Embedded Software that is:
Maintainable
Testable
Portable
Goals for the course
Robust
Efficient
Consistent
Advanced hardware cannot make up for inefficient and
buggy code!!!
Embedded Software Popularity
Many Languages
C
C++
Java
Ada

C-Programming is most used for


embedded software
Embedded Software
Market Share1
Embedded C-Features:
Efficient Memory Management
Timing Centric Operations
Direction Hardware/IO Control
Code Size Constraints
Optimized Execution
Optimum Features with minimum space and time

S-ar putea să vă placă și