PIC microcontroller uses HitechC compiler in MPLAB-IDE

Publisher:zonhenyLatest update time:2019-11-20 Source: 51hei Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Using C language for PIC microcontroller (I)

Using HitechC compiler in MPLAB-IDE 1. Load the compiler:

1. Start MPLAB-IDE and select Project-》Install Language Tool as shown below

2. In the pop-up Install Language Tool dialog box, the "Language Suite" option now shows Microchip. Click the arrow behind it to select the language. 


The tool I use is HI-TECH PICCME, so I choose "HI-TECH PICC".


3. Next, select the calling path of the compiler component in "Tool Name". There are three items, "PICC Compiler" (C compiler), "PICC Assembler" (assembler) and "PICC Linker" (linker) that need to be set.

Use "Browse" to select the calling path, and set the calling files of the above three components to PICC.EXE. Click "OK" to complete the setting.

2. Choose a compiler:     

1. Create a new project. The default "Language Tool Suite" column in the Edit Project dialog box is "Microchip". Change it to "HI-TECH PICC".

2. Click "flasha[.hex]" in the project file box, and the "Node Properties" button will light up. Click to enter. 

3. Set node properties. Since FLASHA.C has other related source programs that need to be added, "PICC Linker" should be selected in the "Language Tool" column. 
Usually we can choose:

1) Generate debug info: Display debug information;

2) Create map file: After selecting this option, we will see the usage of ROM and RAM;

3) Error file: displays error information;

4) Compile for MPLAB ICD: If you do not use ICD, you do not need to select this item.  


4. After the settings are completed, click "Add Node" to add a node. 
This project has two nodes: fla.c and flasha.c. After selecting the node, click "Node Properties" or double-click the node to enter the node property settings.

5. The tool for the node file should be "PICC Compiler" (C compiler). The 4 items in the blue circle are: 1) Display debug information; 2) Local optimization; 3) Global optimization; 4) ICD compilation accessories. Selecting optimization will make the program code more reasonable and reduce the resource usage. Similarly, if you are not using ICD, the 4th item should not be selected. 


6. After all the above settings are completed, you can compile. The figure below is the compilation interface. 
The following is the interface of successful compilation: the blue box is the compilation success information; the red box is the resource usage display.


Reference address:PIC microcontroller uses HitechC compiler in MPLAB-IDE

Previous article:PIC microcontroller boot loader design
Next article:How to use the RC oscillator built into the PIC as the system clock source?

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号