360 likes | 366 Views
This article explores the challenges faced by embedded systems, including limited OS support for programming, secondary memory, processing power, and interaction with hardware. It also discusses the fundamental components of embedded systems such as computational power, memory, and real-time capabilities.
E N D
Embedded system is defined as “A microprocessor based system that does not look like a computer”
Smart devices following the attributes • Computational power • Memory • Real time • Communication • Dynamic decisions
Challenges for ES • Limited OS for support for programming • Limited secondary memory • Limited Random Access Memory – RAM • Limited processing power • Inter action with hardware • Absence of standard I/O devices
Fundamental components of ES • Computational/Processing power • Memory • Real time • Hard real time system Missing a deadline could cause drastic results that could lead to loss of life or / property • Soft real time system few missed deadlines may not cause any significant inconvenience to user • Communication elements – Bluetooth, Wlan, HiperLAN, GPRS, CDMA/WCDMA • Soft parameters - Cost, Reliability, Lifetime, power conception
Computational/Processing power User I/P Processing O/P Envir • User I/P example – Music system • Environment I/P example – Air conditioner
Languages for ES • Assembly language • C, C++ • Ada • Java • UML & SDL
The Build process for ES The steps that are involved in transforming the source code to the final executable format are • Preprocessing • Compiling • Linking • Locating
Preprocessing • This is the first step in the building process • The whole of the building process accomplished by a set of executables (cc or bcc32) • Preprocessing is accomplished using an executable called cpp and cpp32.exe • The preprocessor is automatically invoked cc and its o/p is temporary file, which is deleted at end of the compilation process • It does the following job • Strips the command • Expands including files • Expands MACROs
Compiling The steps involved in compilation process are • Parsing • Object code generation • In compiler parlance each source file is called Translation Unit(TU) • An object file is created for every TU • TU is typically preprocessed file produced by preprocessor
Cross compiling It is defined as a compiler that produces object code for the processor in the target(board) rather than the host in which the compiler is executing • IDE – Integrated Development Environment
linking • All the objects file are linked together to a single executable file, the address assign to all those variables must be unique. • Code in a file may also refer to a function in some other file. The linker fills these addresses of the functions. • Then the code for a particular function may be in library, linker will search the library and link appropriate code with the application. • The output of the linker is a single executable file
Locating • The final step that should be done is called “Locating”. • The dedicated OS on the target that loads the executable to the memory. • The programmer must explicitly provide the hardware specific information of location of Rom and RAM and their sizes • The locator may be available as a separate program or to be bundled together with the linker
Memories • Most ES use memories in various ways. • Memory is required inside the ES for a variety of reasons. • To store executable code. • To load the instructions to be executed as well as the associated data. • To save important information that can be changed by user during sessions.
Basically ES require memory to store the following classes of data • Data related to executable code in machine instruction format (burnt - ROM) • Data storing the current context of execution. This data is usually the variables being used by programs and their stack (RAM) 3. Configuration data (Non volatile and changeable)
Direct Memory Access (DMA) • I/O devices need to transfer the data of other systems to the memory addresses in a system . • A system may need to transfer data to the I/O devices to be transmitted to other devices. • A DMA is required when a multi – byte data set or a block of data set is to be transferred between two systems without the CPU intervening, except at the start and at the end.
Modes of DMA Operation Three modes • Single transfer at a time and then release of the hold on the system bus. 2. Burst transfer at a time and then release of the hold on the system bus. (few kB) 3. Bulk transfer and then release of the hold on the system bus after the transfer is completed.
DMA Controller (DMAC) • DMA transfer is facilitated by the DMAC. • Data transfer occurs efficiently between I/O devices and system memory . • The system address & data buses become unavailable to the µp and available to the I/O device that connects DMAC. • It may provide memory access to multiple channels with separate set of registers for programming for each channels. • A multi channel DMAC provides DMA action from system memories to 2 or more I/O devices.
The 80x86 µp does not have on-chip DMAC. • The 8051 family members 83c152JA,JB,JC & JD have 2 DMA channels on –chip • The 80196KC has PTS (Peripheral Transaction Server) that support DMA functions.(only single & bulk mode) • The MC68340 µc has 2 DMA channel chip. • The 80960CA has 4 channel DMAC on chip with a mode called demand transfer mode
Timer & Counting Devices • At least one hardware timer device is a must in a system
Uses of Timer Devices • Real time system clocks • Initiating an event after a preset delay time • Initiating an event or pair or chain of event • Capturing the count value at the timer on an event • Finding the time interval between two event • Wait for a message from a queue or mailbox or semaphore for a preset time when using RTOS • Watchdog timer • Baud or bit rate control for serial communication on a line or network • Input pulse counting when using a timer, which is giving non periodic i/p instead of the clock i/p • Scheduling of various task • Time slicing of various task • Time Division Multiplexing (TDM)