Embedded Systems: Introduction
An embedded system is a noncomputerized system that is purpose-built for its application. It has a narrower mission than a computer and has less support for things that are unrelated to accomplishing the job at hand. Some systems require software is fault-tolerant, and other systems require software to cease operation at a fault.
The software must act exactly at the same time with hardware, or fast enough for the hardware to react. Embedded Systems must also be able to provide errors for these systems.
Embedded Systems creates cross-compilers, and they create code that does not run on the desktop or the laptop computer. The code needs to run on the processor, but the vendor usually cells a cross compiler, or provides a cross compiler to compile code. They often only support C or C/C++.
We want to make the software robust, maintainable and flexible using these design principles:
Encapsulation - Encapsulation is the bundling of data on a pill as classes, methods, and variables,
Modularity - A software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.
Data Abstraction - removing physical, spatial, or temporal details or attributes in the study of objects or systems to focus attention on details of greater importance.
Remember, good design principles transcend language.
There are difficulties in developing embedded systems. We need to debug, so we also need a cross-debugger on top of a cross-compiler. The debugger lets something eavesdrop on the processor and is called JTAG, and here is the info:
However, adding debug code takes away space from the processor. "Stop here" requires the modification of memory-loaded code. If running out of flash though, the processor has to set internal register breakpoint and compare it at each cycle to the address being run, stopping when there is a match.
In circuit emulators (ICEs) or JTAG adapters communicate between the PC and the processor.
Emulator is specific to a processor. This is why many systems perform embedding using the printf operation. However, this can also unfortunately change the timing on the system, which is why writing software for embedded systems can be tricky. Now, we have to make software debuggable in a somewhat hostile environment.
Embedded systems are designed to perform specific tasks, and include
Memory (RAM)
Code Space (ROM/Flash)
Processor cycles or speed
Power Consumption
Process Peripherals
We might be able to create an interface in software IO lines and life cycles.
Other challenges is coming with working with hardware. Unfortunately the software you build can debug the hardware. Hardware engineers and Embedded engineers have to create a system that can be manufactured for a reasonable cost. Supporting manufacturing helps with this.
The needs of processes change over time, and your initial building will not overlap with your final building.
The steps are:
Conception
Prototyping
Board Bring-Up
Debugging
Testing
Release
Maintenance
Repeat
We need to be flexible enough to meet product demand while dealing with resource constraints and other challenges.
Modularity means separating functionality into subsystems and hide date. Encapsulation creates interfaces between the systems so they don't know much about each other.
We can test submodules by breaking them into objects. The earlier bugs are caught, the cheaper they are to fix.
Don't optimize code right away. Implement features, make them work, test them out, and make them smaller if needed. Focus on where I can get better results by looking at the bigger resources. Premature optimization is the root of all evil.




Comments
Post a Comment