Вы находитесь на странице: 1из 18

OpenCPU GCC Eclipse

User Guide

GPS/GPRS Module Series

Rev. OpenCPU_GCC_Eclipse_User_Guide_V1.0_Preliminary

Date: 2014-10-13

www.quectel.com
GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Our aim is to provide customers with timely and comprehensive service. For any
assistance, please contact our company headquarters:

Quectel Wireless Solutions Co., Ltd.


Office 501, Building 13, No.99, Tianzhou Road, Shanghai, China, 200233
Tel: +86 21 5108 6236
Mail: info@quectel.com

Or our local office, for more information, please visit:


http://www.quectel.com/support/salesupport.aspx

For technical support, to report documentation errors, please visit:


http://www.quectel.com/support/techsupport.aspx

GENERAL NOTES
QUECTEL OFFERS THIS INFORMATION AS A SERVICE TO ITS CUSTOMERS. THE INFORMATION
PROVIDED IS BASED UPON CUSTOMERS’ REQUIREMENTS. QUECTEL MAKES EVERY EFFORT
TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE. QUECTEL DOES NOT
MAKE ANY WARRANTY AS TO THE INFORMATION CONTAINED HEREIN, AND DOES NOT ACCEPT
ANY LIABILITY FOR ANY INJURY, LOSS OR DAMAGE OF ANY KIND INCURRED BY USE OF OR
RELIANCE UPON THE INFORMATION. ALL INFORMATION SUPPLIED HEREIN IS SUBJECT TO
CHANGE WITHOUT PRIOR NOTICE.

COPYRIGHT
THIS INFORMATION CONTAINED HERE IS PROPRIETARY TECHNICAL INFORMATION OF
QUECTEL CO., LTD. TRANSMITTABLE, REPRODUCTION, DISSEMINATION AND EDITING OF THIS
DOCUMENT AS WELL AS UTILIZATION OF THIS CONTENTS ARE FORBIDDEN WITHOUT
PERMISSION. OFFENDERS WILL BE HELD LIABLE FOR PAYMENT OF DAMAGES. ALL RIGHTS
ARE RESERVED IN THE EVENT OF A PATENT GRANT OR REGISTRATION OF A UTILITY MODEL
OR DESIGN.

Copyright © Quectel Wireless Solutions Co., Ltd. 2014. All rights reserved.

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 1 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

About the Document

History
Revision Date Author Description

1.0 2014-03-21 Stanley YONG Create.

1.0 2014-9-16 Stanley YONG Simplify installation procedure.

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 3 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Contents

About the Document ................................................................................................................................... 3


Contents ....................................................................................................................................................... 4
Table Index ................................................................................................................................................... 5
Figure Index ................................................................................................................................................. 6
1 Introduction .......................................................................................................................................... 7
2 Installation ............................................................................................................................................ 8
2.1. System Requirements ............................................................................................................. 8
2.2. Installing JRE ........................................................................................................................... 8
2.3. Installing GCC Compiler (Sourcery G++ Lite Edition for ARM) .............................................. 8
2.4. Get Eclipse Software Package ................................................................................................ 8
3 Work with Eclipse ................................................................................................................................ 9
3.1. Import OpenCPU Project......................................................................................................... 9
3.2. Configuration ......................................................................................................................... 11
3.2.1. Set Active Build Configuration ...................................................................................... 11
3.2.2. Some Native Configurations ......................................................................................... 11
3.3. Compilation............................................................................................................................ 13
3.3.1. Compiling Commands .................................................................................................. 13
3.3.2. Makefile ......................................................................................................................... 15
3.3.3. Compiling Output .......................................................................................................... 15
4 Appendix ............................................................................................................................................. 18

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 4 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Table Index

TABLE 1: REFERENCE DOCUMENT .............................................................................................................. 18

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 5 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Figure Index

FIGURE 1: CREATE NEW PROJECT ................................................................................................................ 9


FIGURE 2: IMPORT OPENCPU SDK ............................................................................................................... 10
FIGURE 3: OPENCPU SDK PROJECT ............................................................................................................. 11
FIGURE 4: SET GCC PATH .............................................................................................................................. 12
FIGURE 5: ADD OR MODIFY “PREPROCESSOR MACRO” ........................................................................... 12
FIGURE 6: ADD “INCLUDE PATH” ................................................................................................................... 13
FIGURE 7: START “BUILD PROJECT” ............................................................................................................. 14
FIGURE 8: ENTER “MAKE TARGET BUILD” ................................................................................................... 14
FIGURE 9: START “MAKE TARGET BUILD” .................................................................................................... 15
FIGURE 10: CONSOLE PANEL ........................................................................................................................ 15
FIGURE 11: PROBLEMS PANEL ...................................................................................................................... 16
FIGURE 12: BUILD RESULT IMAGE ................................................................................................................ 16
FIGURE 13: FINAL BIN OUTPUT ..................................................................................................................... 17

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 6 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

1 Introduction
This document introduces how to set up the IDE (Integrated Development Environment) for OpenCPU with
GCC and Eclipse.

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 7 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

2 Installation

2.1. System Requirements


The following host operating systems and architectures are supported:
Microsoft Windows XP (SP1 or later)
Windows Vista
Windows 7 systems using IA32, AMD64, and Intel 64 processors
In order to install and use Sourcery CodeBench Lite, you must have at least 512MB of available memory.

2.2. Installing JRE

JRE is Java Runtime Environment. Since Eclipse is developed by Java, so Java is necessary.

You are free to get the Java setup from: http://www.java.com

2.3. Installing GCC Compiler (Sourcery G++ Lite Edition for ARM)
Please refer to the 2nd section of the document [1] to install GCC compiler. (The 3rd and 4th section are
for command line user)

2.4. Get Eclipse Software Package


You can get the installation-free software package of Eclipse from Quectel technical channel. The Eclipse
software package is based on Eclipse Kepler Sr2, and built-ins the necessary plug-ins.

Windows 32-BIT and 64-BIT systems have the respective version of Eclipse. Please tell your system type
when asking for Eclipse software package.

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 8 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

3 Work with Eclipse


3.1. Import OpenCPU Project
Open the import panel from menu following the steps: [File]  [Import].

Figure 1: Create New Project

Choose “Existing Projects into Workspace” and go next step.

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 9 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Figure 2: Import OpenCPU SDK

Specify the released OpenCPU SDK and click [Finish] to finish import processing.

If you successfully import the released OpenCPU SDK, you will watch the figure below.

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 10 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Figure 3: OpenCPU SDK Project

3.2. Configuration

3.2.1. Set Active Build Configuration

Set the active build configuration from menu following the steps: [Project]  [Build Configurations] 
[Set Active]  [Release].

3.2.2. Some Native Configurations

Click the project root and open the “project properties” by one of the ways below.
- From menu following the steps: [Project]  [Properties]
- From the right key of mouse
- By the shortcut keys: [Alt]+[Enter]

3.2.2.1. Specify the GCC Installation Path

Specify the GCC installation path that is done in section 2.3.

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 11 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Figure 4: Set GCC Path

Up to now, the GCC Eclipse IDE environment and project are set up. Other configurations for IDE
environment and project have been done before released. Now you can directly start to build the project.
By default, the custom\main.c is compiled and linked.

3.2.2.2. Other Customization Configurations (Optional)

Add or modify “Preprocessor Macro”

Figure 5: Add or modify “Preprocessor Macro”

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 12 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Add “Include Path”

Figure 6: Add “Include Path”

3.3. Compilation

3.3.1. Compiling Commands

The main compiling commands are “Clean“ and “Build Project”, and the incremental build is supported.
Besides, before downloading the application to module, you need to do “Make Target”. Please see below.

3.3.1.1. Clean and Build

The most-frequently executed commands are “Clean” and “Build Project”. You can launch the operation
from project menu or the right key of mouse.

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 13 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Figure 7: Start “Build Project”

3.3.1.2. Make Target

Before downloading the application to module, you need to do “Make Target Build” to add some basic
information about the application into the app bin file. You can launch the operation from project menu or
the right key of mouse, or by the shortcut “Shift+F9”.

Figure 8: Enter “Make Target Build”

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 14 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

Figure 9: Start “Make Target Build”

3.3.2. Makefile

in Eclipse, makefile is generated automatically, and all source codes files in Eclipse project are compiled.

3.3.3. Compiling Output

3.3.3.1. Processing Output

In Eclipse, the build log is output to the “Console” panel including the build warnings and errors. Double
clicking the error log can locate the error code line.

Figure 10: Console Panel

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 15 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

3.3.3.2. Problem Output

All build errors and warnings are listed in the “Problems” panel.

Figure 11: Problems Panel

3.3.3.3. Image Bin Output

The image bin is ultimately generated in “Release” directory.

Figure 12: Build Result Image

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 16 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

3.3.3.4. Final Bin Output

The image bin will be updated after executing “Make Target”.

Figure 13: Final Bin Output

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 17 / 33


GSM/GPRS Module Series
OpenCPU GCC Eclipse User Guide

4 Appendix

Table 1: Reference Document

SN Document Name

[1] Quectel_OpenCPU_GCC_Installation_Guide

[2] Quectel_OpenCPU_Quick_Start_Application_Note

OpenCPU_GCC_Eclipse_User_Guide Confidential / Released 18 / 33

Вам также может понравиться