Search this site (www.microchipC.com).





CCS C Compiler for Microchip PIC micros

Your ad here

 


How to integrate MPLab and an editor such as UltraEdit

There are 2 methods - the automatic method, by hooking into MPLab, and the manual method, by calling PICC directly.

If you are going to use UltraEdit, the UltraEdit Tips for more info.

Automatic Method


1. Get build.exe at
http://www.digital-pickle.dyndns.org/embedded/pic/pic.html. It has been tested with MPLab v5.2 and v5.3.

2. When this program is executed, it finds the MPLAB IDE and inserts a menu command for 'F10 - Build All' into MPLAB's message loop.

How to integrate build.exe into UltraEdit

1. Open UltraEdit to edit a file in the directory of your MPlab project.

2. Select 'Advanced >> Tool Confguration'.

3. Put the build.exe path and filename in the 'Command Line' edit box (ie, C:\tool\build.exe).

4. 'Working Directory' can be left blank.

5. Put a descriptor like 'MPLAB Build Tool' in the 'Menu Item Name' edit box.

6. Check the 'Check if Windows Program' checkbox.

7. Click the 'Insert'.

8. Click 'OK'.

Now when you examine the 'Advanced' menu inside UltraEdit32, you'll see an extra option for 'MPLAB Build Tool'. Click it or press ctrl-shift-0, and build.exe finds the MPLAB IDE and inserts a menu command for 'F10 - Build All' into MPLAB's message loop.

Assign 'F10' key in UltraEdit (optional)

1. Select 'Advanced >> Configuration >> Key Mapping'

2. Select the 'commands' box, then press 'A' repeatedly to scroll down to 'AdvancedUserTool1'.

3. In the 'Press New Key' box press F10, then click 'Assign'

4. Click 'OK'.

5. Now, pressing F10 within UltraEdit will be equivalent to pressing F10 within MPLab to compile a project.

Finished.

Manual Method

To add a hook into Hi-Tech C

1. Select 'Advanced >> Tool Configuration'

2. In command line box, browse and point to PICC.EXE (mine is c:\hi-tech\bin\picc.exe)

3. Add the command line parameters after this. eg. PIC16F876 ... then add %F (this will pass the current filename to the compiler).

4. In 'Working directory' place "%P" this points to path where file is.

5. Give it a name 'PICC'.

6. Check 'Capture Output'.

7. Click 'Insert' to add item.

8. Go back to 'Advanced' and check 'Alternate Capture Method'.

9. Now the PICC item should appear in the 'Advanced' menu pullldown.

10. Click it and it should compile you current document and generate an OUTPUT window.

11. You will need to close the output window after each build to see the new results.

12. Note that you can find the command line options for PICC from Mplab. Select ''Project >> Edit Project >> then 'Node Properties'

Finished.

UltraEdit Tips

If you're going to use UltraEdit as your editor, use it exclusively for editing. Dont ever edit a file in MPLab, as this creates problems with files not being updated, etc.

After debugging, close all open files in MPLab with ctrl-F4, until only the assembly memory windows and/or watch windows are left open. Of course, MPLab will save all its files on a compile, so you will lose file changes made in UltraEdit if a file is automatically opened while being debugged in MPLab, left open in MPLab, edited with UltraEdit, and then overwritten by MPLab on a file compile.



This site is non-profit. Ad revenue almost covers hosting costs.

We welcome any suggesions or comments! Send them to Shane Tolmie on support@microchipc.com. This site is a completely separate site to www.microchip.com, and is maintained independently of Microchip Ltd., manufacturers of the PIC micro. All code on this site is free for non-commercial use, unless stated otherwise. Commercial use normally free, however, it is prohibited without contacting support@microchipc.com for permission. All content on this site created by Shane Tolmie is copyrighted by Shane Tolmie 1999-2009. Click to advertise on this website - $29.90 for a banner ad which will reach 55,000 user sessions per month. One months free trial!