MTK development-software compilation learning tutorial

Source: Internet
Author: User

MTK DevelopmentSoftwareCompileThe course is the content to be introduced in this article.MTK DevelopmentHow can we implement software?Compile. For details, refer to this article.

Open the dos edit window and start-> Run-> cmd). Find the root directory of the project code, such as/opt/MTK6217.CompileBatch Processing command:

Format:

 
 
  1. make[custom="projectName"]"project" "action"["modules"]  
  2. Example:  make custom=mtk6217  gprs  new 

Give MTK the make Method

The following modules are similar to those of nucleus. You do not need to write them. In addition to the mtk6217 project name, you can write them as needed. The mtk6217 project name can be found in your source

The make directory of the Code contains a project file name. For example, in my example, mtk6217_gprs s.mak. You can replace your file. In addition, in addition to the above-mentioned perl mentioned above, we also need 5. **, I use a ActivePerl-5 [1]. 6.1.631. You can find and download it and package it with ARMAR as static LIB.

MTK software compilation

Compilation tools and auxiliary tools:

 
 
  1. ADS1.2  
  2. ADS12_update_842.exe  
  3. MSYS-1.0.10.exe  
  4. MinGW-3.1.0-1.exe  
  5. ImageMagick-6.2.5-5-Q16-windows-dll.exe  
  6. 7z313.exe 

Start Compilation:

Switch to the project root directory and run the following command in the command line:

Make custom = proj gprs new

The command can be clean, update, and remake.

Target file:

The generated target file is the. binfile, which is located inMTK/// Build // under the proj directory, the build directory is the generated directory.

Log File:

The Log file, like the. binfile, is located in the build directory. IfCompileIf an error occurs, you can view the error module in the command line and find the corresponding log file in the build directory.

Simulation Environment:

The project file PixtelMMI. dsw is located in the directoryMTK// Under plutommi // mmi, you can enter the simulation environment.

Program:

The Flash_tool.exe tool can be used to program the program.

The tool mainly sets the Comport and target file location.

Download argent and scatter file can be used with their own. After these two items are selected, the ROM option will appear, and you can select the. binfile after clicking.

After setting the above parameters, connect to the phone, power off the phone, and press the power on key to burn the program.

Trace Tool

Tracetool ---catcher.exe needs to be used to perform tracetrace operations on the mobile phone.

The trace interface is kal_prompt_trace on the mobile phone, just like GSMprinf on agere.

Use Catcher.exe,

You must set the DataBase first. The file is inCompileIs a binary file without an extension, which is located in // MTK/tst // database_classb, for example, BPLGU...

In Catcher.exe, the method for setting the DataBase is config à set database path.

Second, you must set the mode to logging so that the following settings can be performed.

This setting is in control à mode à logging

Third, set the comport.

Fourth, turn on the connection switch, indicating that Catcher.exe is on standby.

Fifth, set filter. This filters out some logs that you do not need. Sometimes the log does not appear for half a day. In this case, selecting filter again will solve the problem.

Set the Filter path to "control à set filter ".

Catcher.exe uses the same connection line for the program.

Save log:

In the log area, select the log you want to save (shift + mouse available), right-click and choose save...

Sometimes, to facilitate testing, trace is disabled by default and can be enabled as needed.

This setting is in engineering mode.

Set UART to TST Config and set the UART port. For example, UART1 can be traced.

Compilation error:

Sometimes there may be some inexplicable errors during compilation. For example, if the code can be compiled just now, but not now ,.

The above is the basic environment and basic process for project development.

The following content is specific development details.

Add file:

DevelopmentIn the process, addition and subtraction are indispensable. Deleting a file is actually the opposite process of adding a file, so it is skipped.

MTKMany lst and pth files are set for users to add files, all of which are in the make folder. You can add modules by yourself or use the original lst and pth files. The following uses the MTK/make/plutommi field as an example.

Add the header file path:

 
 
  1. plutommi.inc 

Add the path to this module:

 
 
  1. plutommi.pth 

Add source file path:

Pl

 
 
  1. utommi.lis 

After the files are added, they can be compiled.

Add switch:

The switch is really a good thing. Relying on it, you can instantly block unvaluable functions, and enable the functions we need but are shelved. What a social law can be like a person who can't.

The add switch is in the. mak file under the make folder.

Note:

Some people like to imitate the original MTK practice and use one switch in the. mak file to hold another switch. The two switches must not have the same name. Otherwise, the switches cannot be switched off.

Add a string resource:

1. Add ID in GlobalDefs. h

2. Associate ID and string in population. c.

3. You can use the preceding three steps to add the ID and text in various languages in plutommi // Customer // CustResource // PLUTO_MMI // ref_list.txt.

After compilation, a new CustStrMap. c and CustStrRes. c files are generated under plutommi // Customer // CustResource, which contain the newly added string resources.

 
 
  1. <!--[if !supportLineBreakNewLine]--> 
  2. <!--[endif]--> 

Add image:

1. Add ID in GlobalDefs. h

2. Associate ID and string in population. c.

3. Add images to the decompressed package. After adding images, package them. Plutommi // Customer // Images // the folder in PLUTO176X220 is generated and can be seen as private on cc.

4. After the folder is added, it will be packed. If it is added only to the folder, it will be cleared. If no image file is found, the mobile phone displays a red * when adding an image, note that the PATH uses 4 bars

Add a member to NVRam:

You need to add an ID to indicate the size of each block, the total number of blocks, and the default value.

The size of each block is preferably an even number.

Modify the following file:

 
 
  1. Nvram_user_defs.h: ID, size, and number
  2. NVRAMEnum. h
  3. Nvram_user_config.c
  4. Custom_nvram_editor_data_item.h

It is compiled in the Dos environment and can be made into a batch processing file, which is more convenient.

MTK Compilation:

1. Resource Compilation:

1) Situations where resources need to be compiled:

You need to re-compile the resource with the following modifications:

A. modified the files in the. plutommi // Customer // CustResource // PLUTO_MMI // directory, such as the font file.

(FontRes. c, L _ **. h file), MMI configuration file (MMI_featuresPLUTO.h), string resource file

(Ref_list.txt;

B. Modified .. plutommi // Customer // CustResource // PLUTO_MMI // files under the Res_MMI directory. All files under this directory are Res _*. * The resource configuration file of each AP or module, including the configuration of menus, images, and string resources;

Note: The Cust *. * file is generated by resource compilation and cannot be modified manually.

2) compilation method:

Go to the. // plutommi/Customer directory and run remakeResource. bat to process the file.

After compilation, some Cust *. * files will be generated in the // plutommi // Customer // CustResource directory, and these files will be compiled when the code is compiled;

If the compilation fails, go to the build directory to view the log file à res_gen.txt. The error message is displayed.

3) when we change the resource and want to see the modification effect on the PC simulation, we also need to execute the above resource compilation command and then build the resource in the VC environment, you can see the effect.

2. code compilation:

There are the following compilation commands:

 
 
  1. make custom=xxx gprs new  
  2. make custom=xxx gprs update  
  3. make custom=xxx gprs remake  
  4. make custom=xxx gprs clean 

These compilation commands can be used as batch file build. bat. You can enter the corresponding options.

After the compilation is successful, all. obj files are generated under the build directory, the information log files are compiled, and the. binfiles are downloaded;

When compilation fails, you can view the corresponding log file in the build directory to see the error information.

Several keywords are explained as follows:

1) xxx, Project name, corresponds to the xxx_upls.mak file under the make directory;

2) Last Keyword:

A. new:

Recompile all resources and codes regardless of changes;

B. update:

Scan resource and code changes, recompile the changes, and do not edit the changes;

C. remake:

Do not scan resources, only scan for code changes, change re-encoding, and unedit resources and unchanged code;

D. clean:

Clear all contents in the build directory and keep the directory structure.

Summary: The MTK development software compilation course has been introduced. I hope this article will help you!

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.