0% found this document useful (0 votes)
172 views21 pages

Open CPU Project Building in MC60/M66: Ratan Yadav

Uploaded by

jijo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
172 views21 pages

Open CPU Project Building in MC60/M66: Ratan Yadav

Uploaded by

jijo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Open CPU project building in MC60/M66

Ratan Yadav

May 2018

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


Requirements

Eclipse Kepler installed on your PC .


GCC compiler installed in PC
Latest SDK
M66/MC60 Evaluation Board .
Basic knowledge of C and working with SDK

You can get latest tools and SDK from below links for M66 and MC60 .

M66 OCPU: http://www.quectel.com/Qdownload/M66_OpenCPU_SDK.html

MC60 OCPU: http://www.quectel.com/Qdownload/MC60_OpenCPU_SDK.html

M66-DS OCPU: http://www.quectel.com/Qdownload/M66-DS_OpenCPU_SDK.html

MC60-E OCPU: http://www.quectel.com/Qdownload/MC60-E_OpenCPU_SDK.html

@ Quectel Wireless Solutions | June, 2017 | Page 2


Compiler installation and Eclipse Set up

Please refer below documents For doing initial setups for compiler and eclipse from
documentation folder .

OpenCPU_GCC_Installation_Guide_V1.0
OpenCPU_GCC_Eclipse_User_Guide_V1 0_Preliminary

@ Quectel Wireless Solutions | June, 2017 | Page 3


Beginning ……..

First of all , Rename the project name in file named .project in your Eclipse SDK .
This will make you able to import multiple project in Eclipse SDK .
Like I renamed OpenCPU_SDK to GreenArk_MC60_1.4 where (1.4 is SDK version )

@ Quectel Wireless Solutions | June, 2017 | Page 4


Import Project in Eclipse

Click file in Eclipse and select import Existing project into workspace next
Projectpath Finish

@ Quectel Wireless Solutions | June, 2017 | Page 5


Now Project is there for your work .

Note : Project name in IDE will be same as you have given in .project file .

@ Quectel Wireless Solutions | June, 2017 | Page 6


Do initial settings Required for project building

Please do initial configuration settings provided in document


OpenCPU_GCC_Eclipse_User_Guide_V1 0_Preliminary

Refer section 3.2 of this document .

Now you are ready to make your own customized project with multiple task and multiple
source and include files .

@ Quectel Wireless Solutions | June, 2017 | Page 7


My Task

My Client needs his project to do following .

GPIO blinking at every 5 Seconds in one subtask and separate C file


Sending SMS and Receiving it in separate C file .
UART sending Data at every 5 Seconds and receive data incoming to UART2 in separate
Task
My Requirements :

To fulfill above requirement , I need to have


Two subtask for GPIO blinking and Sending and Receiving UART DATA
4 .C files for

1. Main task with sms send receive


2. LED blinking task
3. UART task
4. SMS source and header files .

@ Quectel Wireless Solutions | June, 2017 | Page 8


First define subtask in file named custom_task_cfg.h

Open file custom_task_cfg.h and define the subtask and provide them ID .
Task name provided is proc_ledtask and proc_uarttask

@ Quectel Wireless Solutions | June, 2017 | Page 9


Add SRC and INC folder for your project

For ease of my use , I created folder src and inc for source and header files in my project .
These folders are created in Custom Folder .
Right click on custom folder and click new and select folder option

@ Quectel Wireless Solutions | June, 2017 | Page 10


Project Architecture .

After Dragging main.c file in src folder , SDK will look like below .

Add your source file and header files in src and inc folder .
Right click on src and new source file

@ Quectel Wireless Solutions | June, 2017 | Page 11


Adding .c and .h files in SRC and INC folders .

@ Quectel Wireless Solutions | June, 2017 | Page 12


Adding main.h for all headers file .

@ Quectel Wireless Solutions | June, 2017 | Page 13


Include inc folder in project

Now we do need to include inc folder in our include directory of GCC C compiler or else it
will not be recognized .
Click Project properties C/C++ Build Settings ARM Windows GCC C Compiler
(sourcery Lite Bare) Directories

@ Quectel Wireless Solutions | June, 2017 | Page 14


Include inc folder in project

At right side pane Just click on

@ Quectel Wireless Solutions | June, 2017 | Page 15


“inc” folder is now added in project .

Now inc folder is part of project and you can see same as below .

@ Quectel Wireless Solutions | June, 2017 | Page 16


Lookout of your Project .

Now you can add your .c files and .h files in src and inc folder .
You can add as much as you want after right click on folder and follow the steps
mentioned above .
I have added four .c files and one .h file so look for my project is as below .

@ Quectel Wireless Solutions | June, 2017 | Page 17


Improve the Build speed of project

Go in project properties C/C++ Build and add paralled build as shown below .

@ Quectel Wireless Solutions | June, 2017 | Page 18


Project Outputs

Main task which is able to send and receive SMS and intercommunication of task
Blink NETLIGHT at every 5 seconds
Send Some data on UART PORT 2 at every 5 Seconds
Receive AT command from main port and give response
Receive data on UART PORT2 and show received data on UART_PORT 1 which is also
acting as debug port .

You can get complete project SDK from below link .

https://mega.nz/#F!zIxVhapA!rUu9z-BM8oGZwTaxbD1yLg

@ Quectel Wireless Solutions | June, 2017 | Page 19


Make New Project in M66

Now you just need to copy src and inc folder of previous project and paste it in new SDK
After this just make changes in custom_task_cfg.h or copy previoud one and replance in
new SDK .
Just add inc folder in include paths (-I) as we had done previously .
Now you are ready with new Project .
So if customer have developed his code in MC60 then he can easily migrate to M66 after
copying his src and inc folder only .
Please do have M66 based Project from below link .

https://mega.nz/#F!zIxVhapA!rUu9z-BM8oGZwTaxbD1yLg

@ Quectel Wireless Solutions | June, 2017 | Page 20


www.quectel.com

Thank you!
7th Floor, Hongye Building, No.1801 Hongmei Road, Xuhui District, Shanghai
200233, China
Tel: +86-21-5108 6236 Fax: +86-21-5445 3668
Email: [email protected] Website: www.quectel.com

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

You might also like