Professional Documents
Culture Documents
An embedded system is not a microprocessor used in a traditional computing application desktop laptop workstation An embedded system is a microprocessor used as a component in another piece of technology cell phone digital camera
5-Programming in
The files are organized as source or header files. The latter consists of declarations and the former definitions and code. Header files: #include <stdio.h>
#include test.h Main start (input) point: void main(void) int main(int argc, char * argv[ ])
6- C preprocessor
#include includes the specified file #define Conditional compiling - #ifdef, #ifndef, #else, ... Macros #define MUL10(x) (10 * (x))
9-Toolchain
In software, a toolchain is the set of programming tools that are used to create a product (typically another computer program or system of programs). A simple software development toolchain consists of a text editor for editing source code, a compiler, an assembler and a linker to transform the source code into an executable program, libraries to provide interfaces to the operating system, and a debugger. The GNU toolchain for example contains a compiler, linker, debugger and build tools.
Build Process: The build process is a critical element for all software development projects. Do not be tempted to get by without one particularly in a team development environment.
Data type modifiers Size modifiers short, long Sign modifiers unsigned, signed Special static, extern, const volatile, register const volatile 5. Storage class 6. Pointer modifier 7. Function modifier 8. Interrupt
#define SCC_INTACK (void *) 0x70001000 #define FLASH_BASE (void *) 0xC0000000 #define EPROM_BASE (void *) 0xE0000000
14-Assensing I/O
Input / Output Addressing I/O with macros and pointers Making pin HIGH PADDR |= 0x0A Making bit LOW PADDR &= 0xF5 PADDR &= ~0x0A Testing bit STATE (PADDR & 0x03 == 0x03) ? state=1 : state=0; Bit-fields struct _bitfield { unsigned flagA : 1; unsigned flagB : 1; unsigned flagC : 2; unsigned nybbA : 4; unsigned byteA : 8; } x; x.flagA = 1; x.flagB = 0; x.flagC = 2; // b'10' x.nybbA = 100; // It actually writes 0x04 x.byteA = 0xfff; // It actually writes 0x3ff
16- Interrupts
Used for signalling the proccessor for a event; Allow prioritisation of events` service; Peripheral devices; Error handling and recovery; Timers. They are serviced by a special routines ISR; Types of Interrups: Hardware or Software; Maskable or Non-maskable.
17-Memory Testing
Testing the data bus we test writing and subsecuent read from a random address. Testing the address bus checking wether different addresses overlap or not. Testing the memory chip writing '0' then '1' in every memory cell (address).
This is the Code&Fix realization with early separation of the software and hardware design. At every step a prototype is produced and is tested to the specification. The problem is the synchronization between the teams integration engineers should work with every team at every step.
20- V-model
This is teh solution to the problems in the Code & Fix Defines 3 main parts design, implementation, testing. Design is made from System level to Module level. At every step the test vectors are defined and the expected results. First the system is designed, then the software components, then the hardware. It allows a new V-model to be defined for the subsystems for each software and hardware component. V-Model: Verification Requirements analysis System Design Architecture Design Module Design V-Model: Validation Unit Testing Integration Testing System Testing User Acceptance Testing Release Testing