CPE-412-Ch3.pdf

Full Transcript

Embedded System Chapter 3 Basic Software Techniques for Embedded Applications Chapter 3 Basic Software Techniques for Embedded Applications Introduction An embedded system is one kind of a computer system substantially designed to perform several tasks like...

Embedded System Chapter 3 Basic Software Techniques for Embedded Applications Chapter 3 Basic Software Techniques for Embedded Applications Introduction An embedded system is one kind of a computer system substantially designed to perform several tasks like to pierce, process, store and also control the data in colorful electronics- grounded systems. Embedded systems are a combination of tackle and software where software is generally known as firmware that's embedded into the tackle. Embedded systems support to make the work more perfect and accessible. So, we constantly use embedded systems in simple and complex bias too. The operations of embedded systems substantially involve in our real life for several bias like fryer, calculators, Television remote control, home security and neighborhood business control systems, etc. Please follow the below link for Embedded system basics; block illustration, types, and operations. Specific Objectives At the end of the lesson, the students should be able to:  Understand what is an Embedded System and then define it  Look at embedded systems from a historical point of view  Classify embedded systems  Look at certain applications & purposes of embedded systems Duration Sample: Chapter 3: Basic Software Techniques for Embedded = 1 hour Applications (45 minutes discussion; 15 minutes assessment) Lesson Proper Embedded System Software - The software of an embedded system is written to execute a particular function. It is normally written in a high-level setup and then compiled down to offer code that can be stuck within a non-volatile memory in the hardware. An embedded system software is intended to keep in view of the following three limits  Convenience of system memory  Convenience of processor’s speed  When the embedded system runs constantly, there is a necessity to limit power dissipation for actions like run, stop and wake up.  RTOS (Real Time Operating System) A system which is essential to finish its task and send its service on time, then only it said to be a real time operating system. RTOS controls the application software and affords a device to allow the processor run. It is responsible for managing the different hardware resources of a personal computer and also host applications which run on the PC. This operating system is specially designed to run various applications with an exact timing and a huge amount of consistency. Particularly, this can be significant in measurement & industrial automation systems where a delay of a program could cause a safety hazard. Embedded System Characteristics  Generally, an embedded system executes a particular operation and does the similar continually. For instance: A pager is constantly functioning as a pager.  All the computing systems have limitations on design metrics, but those can be especially tight. Design metric is a measure of an execution features like size, power, cost and also performance.  It must perform fast enough and consume less power to increase battery life.  Several embedded systems should constantly react to changes in the system and also calculate particular results in real time without any delay. For instance, a car cruise controller; it continuously displays and responds to speed & brake sensors. It must calculate acceleration/de-accelerations frequently in a limited time; a delayed computation can consequence in letdown to control the car.  It must be based on a microcontroller or microprocessor based.  It must require a memory, as its software generally inserts in ROM. It does not require any secondary memories in the PC.  It must need connected peripherals to attach input & output devices.  An Embedded system is inbuilt with hardware and software where the hardware is used for security and performance and Software is used for more flexibility and features.  Embedded System Applications The applications of an embedded system basics include smart cards, computer networking, satellites, telecommunications, digital consumer electronics, missiles, etc.  Embedded systems in automobiles include motor control, cruise control, body safety, engine safety, robotics in an assembly line, car multimedia, car entertainment, E-com access, mobiles etc.  Embedded systems in telecommunications include networking, mobile computing, and wireless communications, etc.  Embedded systems in smart cards include banking, telephone and security systems.  Embedded Systems in satellites and missiles include defense, communication, and aerospace  Embedded systems in computer networking & peripherals include image processing, networking systems, printers, network cards, monitors and displays  Embedded Systems in digital consumer electronics include set-top boxes, DVDs, high-definition TVs and digital cameras Thus, this is all about the basics of embedded system basics and applications. We all know that embedded systems are extremely fabulous systems that play a vital role in many applications like equipment, industrial instrumentation, etc. Types of Embedded Software Development Tools The following is the list of the types of embedded software development tools with their description.  Editor A text editor is the first tool you need to begin creating an embedded system. It is used to write source code in programming languages C and C++ and save this code as a text file. A good example of a text editor is Geany. This is a small and lightweight environment that uses the GTK+ toolkit. Geany supports C, Java, PHP, HTML, Python, Perl, Pascal and other types of files. Basic functions of Geany: o Syntax highlighting o Code folding o Symbol name auto-completion o Snippets o Auto-closing of XML and HTML tags o Code navigation  Compiler A compiler is a computer program (or a set of programs) that transforms the source code written in a programming language (the source language) into another computer language (normally binary format). The most common reason for conversion is to create an executable program. The name "compiler" is primarily used for programs that translate the source code from a high-level programming language to a low-level language (e.g., assembly language or machine code).  Cross-Compiler If the compiled program can run on a computer having different CPU or operating system than the computer on which the compiler compiled the program, then that compiler is known as a cross-compiler.  Decompiler A program that can translate a program from a low-level language to a high-level language is called a decompiler.  Language Converter A program that translates programs written in different high-level languages is normally called a language translator, source to source translator, or language converter. A compiler is likely to perform the following operations:  Preprocessing  Parsing  Semantic Analysis (Syntax-directed translation)  Code generation  Code optimization  Assemblers An assembler is a program that takes basic computer instructions (called as assembly language) and converts them into a pattern of bits that the computer's processor can use to perform its basic operations. An assembler creates object code by translating assembly instruction mnemonics into opcodes, resolving symbolic names to memory locations. Assembly language uses a mnemonic to represent each low-level machine operation (opcode).  Debugging Tools in an Embedded System Debugging is a methodical process to find and reduce the number of bugs in a computer program or a piece of electronic hardware, so that it works as expected. Debugging is difficult when subsystems are tightly coupled, because a small change in one subsystem can create bugs in another. The debugging tools used in embedded systems differ greatly in terms of their development time and debugging features. We will discuss here the following debugging tools o Simulators o Microcontroller starter kits o Emulator  Simulators Code is tested for the MCU / system by simulating it on the host computer used for code development. Simulators try to model the behavior of the complete microcontroller in software. Functions of Simulators A simulator performs the following functions –  Defines the processor or processing device family as well as its various versions for the target system.  Monitors the detailed information of a source code part with labels and symbolic arguments as the execution goes on for each single step.  Provides the status of RAM and simulated ports of the target system for each single step execution.  Monitor’s system response and determines throughput.  Provides trace of the output of contents of program counter versus the processor registers.  Provides the detailed meaning of the present command.  Monitors the detailed information of the simulator commands as these are entered from the keyboard or selected from the menu.  Supports the conditions (up to 8 or 16 or 32 conditions) and unconditional breakpoints.  Provides breakpoints and the trace which are together the important testing and debugging tool.  Facilitates synchronizing the internal peripherals and delays.  Microcontroller Starter Kit A microcontroller starter kit consists of – o Hardware board (Evaluation board) o In-system programmer o Some software tools like compiler, assembler, linker, etc. o Sometimes, an IDE and code size limited evaluation version of a compiler. A big advantage of these kits over simulators is that they work in real-time and thus allow for easy input/output functionality verification. Starter kits, however, are completely sufficient and the cheapest option to develop simple microcontroller projects.  Emulators An emulator is a hardware kit or a software program or can be both which emulates the functions of one computer system (the guest) in another computer system (the host), different from the first one, so that the emulated behavior closely resembles the behavior of the real system (the guest). Emulation refers to the ability of a computer program in an electronic device to emulate (imitate) another program or device. Emulation focuses on recreating an original computer environment. Emulators have the ability to maintain a closer connection to the authenticity of the digital object. An emulator helps the user to work on any kind of application or operating system on a platform in a similar way as the software runs as in its original environment. Peripheral Devices in Embedded Systems Embedded systems communicate with the outside world via their peripherals, such as following &mins;  Serial Communication Interfaces (SCI) like RS-232, RS-422, RS-485, etc.  Synchronous Serial Communication Interface like I2C, SPI, SSC, and ESSI  Universal Serial Bus (USB)  Multi Media Cards (SD Cards, Compact Flash, etc.)  Networks like Ethernet, LonWorks, etc.  Fieldbuses like CAN-Bus, LIN-Bus, PROFIBUS, etc.  imers like PLL(s), Capture/Compare and Time Processing Units.  Discrete IO aka General-Purpose Input/Output (GPIO)  Analog to Digital/Digital to Analog (ADC/DAC)  Debugging like JTAG, ISP, ICSP, BDM Port, BITP, and DP9 ports Criteria for Choosing Microcontroller While choosing a microcontroller, make sure it meets the task at hand and that it is cost effective. We must see whether an 8-bit, 16-bit or 32-bit microcontroller can best handle the computing needs of a task. In addition, the following points should be kept in mind while choosing a microcontroller –  Speed − What is the highest speed the microcontroller can support?  Packaging − Is it 40-pin DIP (Dual-inline-package) or QFP (Quad flat package)? This is important in terms of space, assembling, and prototyping the end-product.  Power Consumption − This is an important criterion for battery-powered products.  Amount of RAM and ROM on the chip.  Count of I/O pins and Timers on the chip.  Cost per Unit − This is important in terms of final cost of the product in which the microcontroller is to be used. Further, make sure you have tools such as compilers, debuggers, and assemblers, available with the microcontroller. The most important of all, you should purchase a microcontroller from a reliable source. References/Additional Resources/Readings Embedded Systems - Tools & Peripherals. (n.d.). Tutorials Point. https://www.tutorialspoint.com/embedded_systems/es_tools.htm Agarwal, T. (2020, April 14). Introduction To Embedded System Basics and Applications. ElProCus - Electronic Projects for Engineering Students. https://www.elprocus.com/basics-of-embedded-system-and-applications/ Assessment (insert Rubrics) Each question will be graded based on this five (5) point rubric. LEVEL DESCRIPTION Well written and very organized. Excellent grammar mechanics. 5 - Outstanding Clear and concise statements. Excellent effort and presentation with detail. Demonstrates a thorough understanding of the topic. Writes fairly clear. Good grammar mechanics. 4 - Good Good presentation and organization. Sufficient effort and detail. Minimal effort. Minimal grammar mechanics. 3 - Fair Fair presentation. Few supporting details Somewhat unclear. Shows little effort. 2 - Poor Poor grammar mechanics. Confusing and choppy, incomplete sentences. No organization of thoughts. Very poor grammar mechanics. Very unclear. 1 - Very Poor Does not address topic. Limited attempt. Learner’s Feedback Form Name of Student: ___________________________________________________ Program : ___________________________________________________ Year Level : ___________ Section : ___________ Faculty : ___________________________________________________ Schedule : ___________________________________________________ Learning Module : Number: _________ Title : ______________________ How do you feel about the topic or concept presented? □ I completely get it. □ I’m struggling. □ I’ve almost got it. □ I’m lost. In what particular portion of this learning packet, you feel that you are struggling or lost? ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ Did you raise your concern to you instructor? □ Yes □ No If Yes, what did he/she do to help you? ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ If No, state your reason? ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ To further improve this learning packet, what part do you think should be enhanced? ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ How do you want it to be enhanced? ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ NOTE: This is an essential part of course module. This must be submitted to the subject teacher (within the 1st week of the class).

Use Quizgecko on...
Browser
Browser