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.
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.
No comments:
Post a Comment