Knowledge points for Embedded Software Engineers

Source: Internet
Author: User
Tags posix
Embedded Software Engineers apply for modification of browsing permissions |
Delete

Common knowledge points of data structure (c:

1. Local variable energy, global variable, and static variable

2. Heap and stack

3. Usage of const, volatile, define, and typedef

4. Linked List (such as insertion, deletion, and sorting of linked lists)

5. Sorting (check for more bubble methods)

6. reentrant and malloc Functions

7. pointer (common function pointer, function pointer, array pointer, pointer array and other applications), struct and shared body

8. The difference between # include <FILENAME. h> and # include "filename. H.

Common knowledge points of the operating system:

1. interruptions and exceptions

2. Processes and threads

3. Process Synchronization Mechanism, Process Communication and deadlock

4. priority inversion and Priority Inheritance

5. makefile

Some embedded development websites:

Overseas sites

Linux Device website, created and maintained by Rick lehrbaum, is an embedded Linux entry-level website that includes

Embedded Linux Industry Daily News, complete series of quick reference guides, a large number of articles written by important developers

And an interactive forum.

Http://www.linuxdevices.com/

A good place to download the embedded Linux cross-compilation tool chain

Snapgear embedded Linux distribution Home Page

Http://www.snapgear.org/snapgear/index.html

Http://www.uclinux.org/pub/uClinux/...lf-tools/gcc-3/

The embedded Linux Alliance (ELC), a non-profit manufacturer-neutral trade union, aims

Linux is developed and promoted in the application and device market.

Www.embedded-linux.org

Beyond logic home page provides many embedded Linux system development materials.

Http://www.beyondlogic.org

Embedded Linux Journal (elj, embedded Linux Journal) focuses on Embedded Linux and other open-source software

Applications in the inbound system. Many industry leaders write articles for elj.

Embedded.linuxjournal.com

There are several books written in the embedded Linux System

Http://www.embeddedlogic.com/ELSweb/booklinks.html

Embedded PowerPC System

Www.mvista.com

Www.denx.de/e/index1.php

Ixp4xx open source developers Guide

Http://ixp4xx-osdg.sourceforge.net/

UClinux/ARM Project

Http://adam.kaist.ac.kr /~ Hschoe/notice.html

Personal Homepage

The personal homepage of a hobbyist on behalf of Li Zhou has been put into practice.

Http://www.lomx.net/index.htm

D_j embedded personal homepage, with a lot of information!

Http://staff.ustc.edu.cn /~ Wangzhuo/index.html

Renbagshoes's personal homepage. You may use some information!

Http://timity.nease.net

Embedded Linux operating system

Small embedded Linux version

UClinux-Linux running on a system without MMU. Currently supports Motorola 68 K, mcf5206, and

Mcf5207 ColdFire microprocessor.

Http://www.uclinux.org/index.html

Etlinux-designed to run fully on Small Industrial Computers, especially on PC/104 modules

Distribution Edition

Http://www.prosa.it/etlinux/index.html

Tiny Linux-a Linux distribution version that runs on 386.

Http://tiny.seul.org/en/

Thinlinux-dedicated camera servers, X-10 controllers, MP3 players, and other similar

The minimal Linux distribution for inbound applications.

Www.thinlinux.org

LRP (Linux Route Project)

Http://www.linuxrouter.org

Peeweelinux: A small embedded Linux release

Http://freshmeat.net/projects/peeweelinux

Embedded Linux version with real-time extension

RT-Linux Homepage

Http://www.fsmlabs.com

Http://www.rtlinux.com

Rtai

Http://www.rtai.org

El/IX

Srt-Linux

Embedded GUI

Microwindows is a public source code (lgpl) developed by Greg haerr, CEO of century software.

Project. Microwindows is committed to providing a modern graphic Window environment for some small devices and platforms. Microwindow

S supports many hardware platforms with high portability. One of the main purposes of Microwindows is to run in the embedded linu

X, and provides two sets of API Interfaces Based on Win32/X.

Http://www.microwindows.org

Http://microwindows.org

Developed by Mr. Wei Yongming, a former Tsinghua University Instructor, MiniGUI is one of the good free software developed by the Chinese. Mini

GUI is a graphical user interface Support System for embedded systems or real-time systems with open source code (lgpl.

It runs mainly on the Linux console and can actually run in any POSIX compatible system with POSIX Threads.

Unified.

Http://www.minigui.org

MiniGUI project of Apsara Software

Http://www.minigui.com/company/cindex.shtml

QT/Embedded is a well-known QT library developer trolltech's ongoing QT version for embedded systems. QT/em

Bedded provides a complete graphical stack for various hardware interfaces to the GUI toolkit. The APIs of QT/Embedded are the same as those of QT/X11.

It is the same as QT/windows, but it is not based on the X11 library. QT/Embedded is a public source code (lgpl) project.

Http://www.trolltech.com

Opengui is based on an x86 graphics kernel implemented by Assembly and provides a fast, 32-bit, high-level C/C ++

Graphical interface. Opengui is also a public source code (lgpl) project. Opengui provides two-dimensional drawing primitives, messages

Supported driver APIs and BMP file formats.

Http://www.tutok.sk/fastgl

Picogui is a small, portable, and customer-based tool that can work on various hardware, including handheld devices.

/The GUI of the server structure. Like the X Window System, it has the flexibility of the client-server structure, but does not

Similar to the X Window System, it uses fonts, BMP files, controls, and other resources required by some applications.

The source is directly integrated into the server. Although the flexibility of the system is reduced, the speed is greatly improved and

The program size is reduced.

Http://picogui.org

Tiny-X is a compact X Window server developed for embedded systems. Sponsored by SuSE and sponsored by xfree

Development of key member Keith Packard of 86. The goal of tiny-X is to achieve small memory or almost no memory.

Good operation.

Http://www.pps.jussieu.fr /~ Jch/software/kdrive.html

Concave and convex test questions (embedded software development)

2007-02-07

Embedded Software Design Engineer

1. Read the program section and answer questions.

Int main (INT argc, char * argv [])

{

Int c = 9, D = 0;

C = C ++ % 5;

D = C;

Printf ("d = % d \ n", d );

Return 0;

}

A) Write Program output

B) Is this expression risky in a portable system? Why?

# Include "stdio. H"

Int A = 0;

Int B;

Static char C;

Int main (INT argc, char * argv [])

{

Char d = 4;

Static short E;

A ++;

B = 100;

C = (char) ++;

E = (++ d) ++;

Printf ("A = % d, B = % d, c = % D, D = % d, e = % d", a, B, c, d, e );

Return 0;

}

A) Write Program output

B) if the compiler arranges the layout of each variable (A, B, C, D) in the memory (eg. Stack, heap, data section, BSS section), it is best to use a Graphical description.

2. interruption is an important part of embedded systems, which leads to many compilation developers to provide an extension: To interrupt Standard C support, a New Keyword _ interrupt is generated. The following code uses the _ interrupt keyword to define an interrupt service subroutine (ISR). Please comment on the following code.

_ Interrupt double compute_area (double radius)

{

Double area = pI * radius;

Printf ("narea = % F", area );

Return area;

}

3 C/C ++ basic knowledge

A) What is the meaning of the keyword volatile during compilation? Three examples of different use cases are provided (which can be pseudo-code or text description ).

B) What are the specific functions of the static keyword in C language?

C) What is the difference between the following three variable declarations? Please give the specific meaning

Int const * P; P is a pointer to a constant integer variable.

Int * const P; P is a constant governing an integer variable.

Int const * const P;

4 embedded system problems

A) for integer variables A = 0x12345678, draw out how to store them in memory in the little endian and big endian modes.

B) In the arm system, which method does the Parameter Pass when a function is called?

C) What is the difference between an interrupt (interrupt, such as a keyboard interrupt) and an exception (exception, such as a division by zero exception?

5. Set the periodic tasks P1, P2, and P3 to T1, T2, and T3 to 100,150,400 respectively, and the execution time to 20, 40, and 100 respectively. Design a Scheduling Algorithm for task scheduling to meet the task execution cycle and task cycle.

6 priority reversal is a serious problem in embedded systems and must be paid enough attention.

A) First, please explain the priority reversal problem.

B) Many RTOS provide priority inheritance policies (Priority Inheritance) and priority ceiling policies (Priority ceilings) to solve the priority reversal problem. Please discuss these two policies.

Reference answer:

1 5

There is a risk, because C = C ++ % 5; this expression has been modified twice for C, the behavior is undefined, and the value of C is undefined.

Int A = 0; // data section

Int B; // data section

Static char C; // BSS

Int main (INT argc, char * argv [])

{

Char d = 4; // Stack

Static short e; // BSS

A ++;

B = 100;

C = (char) ++;

E = (++ d) ++;

Printf ("A = % d, B = % d, c = % D, D = % d, e = % d", a, B, c, d, e );

Return 0;

}

A = 2, B = 100, c = 2, D = 6, E = 5

2 A) ISR cannot return a value;

B) ISR cannot pass parameters;

C) floating points are generally not reentrant;

D) The printf function has re-entry and performance problems.

3 a) using the volatile keyword to define a variable is equivalent to telling the compiler that the value of this variable will change at any time, and each time you use it, you need to go to the memory.

Reread its value and do not optimize it at will.

We recommend that you use the volatile variable:

(1) Hardware registers of parallel Devices

(2) Non-automatic variables (global variables) that will be accessed in an interrupt service subroutine)

(3) variables shared by several tasks in multi-threaded applications

B) In the function body, a variable declared as static remains unchanged when the function is called.

Within the module (but in the external body of the function), a variable declared as static can be accessed by the function used in the module, but cannot be accessed by other functions outside the module.

Access. It is a local global variable.

In a module, a function declared as static can only be called by other functions in this module. That is, this function is restricted in declaring its

Within the local scope of the module.

What is the difference between static global variables and common global variables? STATIC global variables are only made once to prevent being referenced in other file units;

What is the difference between static local variables and common local variables: static local variables are initialized only once, and the next time is based on the previous result value;

What is the difference between a static function and a common function: a static function has only one copy in the memory, and a normal function maintains one copy in each call.

C) a pointer to a constant integer

A constant pointer to an integer

A constant pointer to a constant integer.

4

A) 0x12345678

Little endian big endian is the opposite

High address --> 0x12 low address --> 0x12

0x34 0x34

0x56 0x56

Low address --> 0x78 high address --> 0x78

B) when the parameter is <= 4 ~ R3 transfer,> 4 pass through the stack Mode

C) exception: synchronization with the CPU clock must be considered during generation. In practice, exceptions are also called synchronization interruptions. When the processor executes a wrong command due to a programming error, or a special situation (such as a page missing) occurs during execution, the processor will generate an exception when it must be processed by the kernel.

Interruption refers to an electrical signal generated by external hardware. It enters from the interrupt pin of the CPU and interrupts the current operation of the CPU;

The so-called exception refers to some events that must be handled during software operation. The CPU automatically generates an event to interrupt the current operation and transfer the event to the exception handling process.

Differences between Asynchronization and Synchronization'

5

6. A high-priority task needs to wait for a low-priority task to release resources, while a low-priority task is waiting for a medium-priority task.

Priority Inheritance: inherits the highest priority of a blocked task as its priority. The task exits from the critical section and recovers

Re-initial priority.

Priority ceilings: Specifies the priority ceiling for semaphores that access critical resources.

The Priority Inheritance policy has little impact on the task execution process, because only the critical resources occupied by the high-priority tasks are applied.

This fact raises the priority of a low-priority task.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.