Difference between revisions of "Microchip MPLAB-X - Integration on Windows"

From ERIKA WIKI
Jump to: navigation, search
(MPLAB-X IDE Standalone Project)
(MPLAB-X IDE Standalone Project)
Line 267: Line 267:
 
* The build project process starts as shown in the following figure:
 
* The build project process starts as shown in the following figure:
  
[[File:Mplab x tutorial 12.png|thumb|center|Figure 12: MPLAB-X IDE Build Project Process.]]
+
[[File:Mplab x tutorial 42.png|thumb|center|Figure 42: MPLAB-X IDE Build Project Process.]]
  
 
* Finally the build process ends successfully as shown in the following figure:
 
* Finally the build process ends successfully as shown in the following figure:
  
[[File:Mplab x tutorial 13.png|thumb|center|Figure 13: MPLAB-X IDE Project Built Successfully.]]
+
[[File:Mplab x tutorial 43.png|thumb|center|Figure 43: MPLAB-X IDE Project Built Successfully.]]
  
 
* To debug the ERIKA Enterprise v3 example click on ''Debug->Debug Main Project'' menu entry as shown in the following figure:
 
* To debug the ERIKA Enterprise v3 example click on ''Debug->Debug Main Project'' menu entry as shown in the following figure:
  
[[File:Mplab x tutorial 14.png|thumb|center|Figure 14: MPLAB-X IDE Debug Main Project.]]
+
[[File:Mplab x tutorial 44.png|thumb|center|Figure 44: MPLAB-X IDE Debug Main Project.]]
  
 
* The build project process starts as shown in the following figure:
 
* The build project process starts as shown in the following figure:
  
[[File:Mplab x tutorial 12.png|thumb|center|Figure 12: MPLAB-X IDE Build Project Process.]]
+
[[File:Mplab x tutorial 42.png|thumb|center|Figure 42: MPLAB-X IDE Build Project Process.]]
  
 
* The build process ends successfully as shown in the following figure:
 
* The build process ends successfully as shown in the following figure:
  
[[File:Mplab x tutorial 13.png|thumb|center|Figure 13: MPLAB-X IDE Project Built Successfully.]]
+
[[File:Mplab x tutorial 43.png|thumb|center|Figure 43: MPLAB-X IDE Project Built Successfully.]]
  
 
* The Device Voltage dialog window may appear as shown in the in the following figure:
 
* The Device Voltage dialog window may appear as shown in the in the following figure:
Line 291: Line 291:
 
* Click on the ''OK'' button to let program the device as shown in the following figure:
 
* Click on the ''OK'' button to let program the device as shown in the following figure:
  
[[File:Mplab x tutorial 16.png|thumb|center|Figure 16: MPLAB-X IDE Device Programming.]]
+
[[File:Mplab x tutorial 45.png|thumb|center|Figure 45: MPLAB-X IDE Device Programming.]]
  
 
* Finally the programming process ends successfully and the application runs as shown in the following figure:
 
* Finally the programming process ends successfully and the application runs as shown in the following figure:
  
[[File:Mplab x tutorial 17.png|thumb|center|Figure 17: MPLAB-X IDE Application Running.]]
+
[[File:Mplab x tutorial 46.png|thumb|center|Figure 46: MPLAB-X IDE Application Running.]]
  
 
* Click into ''Pause'' button to debug the application as shown in the following figure:
 
* Click into ''Pause'' button to debug the application as shown in the following figure:
  
[[File:Mplab x tutorial 18.png|thumb|center|Figure 18: MPLAB-X IDE Application Debug.]]
+
[[File:Mplab x tutorial 47.png|thumb|center|Figure 47: MPLAB-X IDE Application Debug.]]
  
 
= Additional Notes =
 
= Additional Notes =

Revision as of 14:50, 24 May 2018

Synopsys

This guide illustrates how to integrate ERIKA Enterprise v3 in Microchip MPLAB-X IDE.

Preconditions

MPLAB-X IDE User Makefile Project

  • Click on File->New Project... menu entry as shown in the following figure:
Figure 1: MPLAB-X IDE New Project.
  • The MPLAB-X IDE Project Wizard will open as shown in the following figure:
Figure 2: MPLAB-X IDE Project Wizard.
  • Select Microchip Embedded folder into Categories Panel.
  • Select User Makefile Project project into Projects Panel.
  • Click on Next > button.
  • The wizard will show the window to select the Device as shown in the following figure:
Figure 3: MPLAB-X IDE Device Selection.
  • Select the correct device: 16-bit DSCs (dsPIC33) and dsPIC33EV256GM106.
  • Click on Next > button to let the Wizard to show the available debugging tools as shown in the following figure:
Figure 4: MPLAB-X IDE Tool Selection.
  • Select the correct tool: PICKit 3 Starter Kit....
  • Click on Next > button to let the Wizard to show the project name and folder as shown in the following figure:
Figure 5: MPLAB-X IDE Project Name and Folder Selection.
  • Fill the Project Name field (e.g erika3app).
  • Browse the Project Loaction (e.g. C:\Evidence\MPLABXProjects)
  • Click on Next > button to create User Makefile as shown in the following figure:
Figure 6: MPLAB-X IDE User Makefile Creation.
  • Fill Working Directory field with . (dot).
  • Fill Build command and Debug build command fields with ee3_app.bat.
  • Fill Clean command" field with ee3_clean.bat.
  • Fill Image name and Debug image name fields with out/erika3app.elf.
  • Finally, click on the Finish button to instantiate the MPLAB-X IDE Project from with chosen options as shown in the following figure:
Figure 7: MPLAB-X IDE Project.
  • Click on Files tab-sheet of the upper-left panel to show the Project Files as shown in the following figure:
Figure 8: MPLAB-X IDE Project Files.
  • Copy the following script files from C:\Evidence\erika3\mplabx folder into project folder as shown in the following figure:
    • ee3_app.bat
    • ee3_cfg.bat
    • ee3_clean.bat
Figure 9: MPLAB-X IDE Script Files.
  • Copy example source files from any C:\Evidence\erika3\examples sub-folder into project folder as shown in the following figure:
Figure 10: MPLAB-X IDE Example Source Files.
  • To build the ERIKA Enterprise v3 example click on Production->Build Main Project menu entry as shown in the following figure:
Figure 11: MPLAB-X IDE Build Main Project.
  • The build project process starts as shown in the following figure:
Figure 12: MPLAB-X IDE Build Project Process.
  • Finally the build process ends successfully as shown in the following figure:
Figure 13: MPLAB-X IDE Project Built Successfully.
  • To debug the ERIKA Enterprise v3 example click on Debug->Debug Main Project menu entry as shown in the following figure:
Figure 14: MPLAB-X IDE Debug Main Project.
  • The build project process starts as shown in the following figure:
Figure 12: MPLAB-X IDE Build Project Process.
  • The build process ends successfully as shown in the following figure:
Figure 13: MPLAB-X IDE Project Built Successfully.
  • The Device Voltage dialog window may appear as shown in the in the following figure:
Figure 15: MPLAB-X IDE Device Voltage Dialog.
  • Click on the OK button to let program the device as shown in the following figure:
Figure 16: MPLAB-X IDE Device Programming.
  • Finally the programming process ends successfully and the application runs as shown in the following figure:
Figure 17: MPLAB-X IDE Application Running.
  • Click into Pause button to debug the application as shown in the following figure:
Figure 18: MPLAB-X IDE Application Debug.

MPLAB-X IDE Standalone Project

  • Click on File->New Project... menu entry as shown in the following figure:
Figure 1: MPLAB-X IDE New Project.
  • The MPLAB-X IDE Project Wizard will open as shown in the following figure:
Figure 19: MPLAB-X IDE Project Wizard.
  • Select Microchip Embedded folder into Categories Panel.
  • Select Standalone Project project into Projects Panel.
  • Click on Next > button.
  • The wizard will show the window to select the Device as shown in the following figure:
Figure 3: MPLAB-X IDE Device Selection.
  • Select the correct device: 16-bit DSCs (dsPIC33) and dsPIC33EV256GM106.
  • Click on Next > button to let the Wizard to show the available debugging tools as shown in the following figure:
Figure 4: MPLAB-X IDE Tool Selection.
  • Select the correct tool: PICKit 3 Starter Kit....
  • Click on Next > button to let the Wizard to show the available compilers as shown in the following figure:
Figure 20: MPLAB-X IDE Compiler Selection.
  • Select the correct compiler: XC16 (v1.33).
  • Click on Next > button to let the Wizard to show the project name and folder as shown in the following figure:
Figure 21: MPLAB-X IDE Project Name and Folder Selection.
  • Fill the Project Name field (e.g erika3app).
  • Browse the Project Loaction (e.g. C:\Evidence\MPLABXProjects)
  • Finally, click on the Finish button to instantiate the MPLAB-X IDE Project from with chosen options as shown in the following figure:
Figure 22: MPLAB-X IDE Standalone Project.
  • Click on Files tab-sheet of the upper-left panel to show the Project Files as shown in the following figure:
Figure 8: MPLAB-X IDE Project Files.
  • Copy the following script files from C:\Evidence\erika3\mplabx folder into project folder as shown in the following figure:
    • ee3_pull.bat
    • ee3_cfg.bat
    • ee3_clean.bat
Figure 23: MPLAB-X IDE Script Files.
  • Copy example source files from any C:\Evidence\erika3\examples sub-folder into project folder as shown in the following figure:
Figure 24: MPLAB-X IDE Example Source Files.
  • Right-Click on the ee_pull.bat file in the project and select Run context-menu entry to pull ERIKA Enterprise v3 into project as shown in the following figure:
Figure 25: MPLAB-X IDE ERIKA Pull Run.
  • The pull process starts as shown in the following figure:
Figure 26: MPLAB-X IDE ERIKA Pull Process.
  • The pull process ends successfully as shown in the following figure:
Figure 27: MPLAB-X IDE ERIKA Pull Successfully.
  • Click on Projects tab-sheet of the upper-left panel to show the Project Folders.
  • Right-Click on the Source Files folder in the project and select Add Existing Item... context-menu entry to add source files into project build system as shown in the following figure:
Figure 28: MPLAB-X IDE Project Source Files Add Existing Item...
  • From the project root select application source files and then click Select button as shown in the following figure:
Figure 29: MPLAB-X IDE Project Application Source Files Adding...
  • The application source files will be added to project source files folder as shown in the following figure:
Figure 30: MPLAB-X IDE Project Application Source Files Added.
  • Right-Click on the Source Files folder in the project and select Add Existing Item... context-menu entry to add source files into project build system as shown in the following figure:
Figure 28: MPLAB-X IDE Project Source Files Add Existing Item...
  • From the project out sub-folder select ee_applcfg.c source files and then click Select button as shown in the following figure:
Figure 31: MPLAB-X IDE Project Application Configuration File Adding...
  • The application configuration source files will be added to project source files folder as shown in the following figure:
Figure 32: MPLAB-X IDE Project Application Configuration Source Files Added.
  • Right-Click on the Source Files" folder in the project and select Add Existing Item... context-menu entry to add source files into project build system as shown in the following figure:
Figure 28: MPLAB-X IDE Project Source Files Add Existing Item...

From the project erika/src sub-folder select all *.c and all *.S source files and then click Select button as shown in the following figure:

Figure 33: MPLAB-X IDE Project ERIKA v3 Source File Adding...
  • The ERIKA Enterprise v3 source files will be added to project source files folder as shown in the following figure:
Figure 34: MPLAB-X IDE Project ERIKA v3 Source Files Added.
  • Right-Click on the project and select Properties context-menu entry as shown in the following figure:
Figure 35: MPLAB-X IDE Project Properties...
  • The Project Properties dialog window will open as shown in the following figure:
Figure 36: MPLAB-X IDE Project Properties Dialog Window.
  • Select XC16 (Global Options) from the Categories: panel.
  • Select Global Options from the Option categories:".
  • Click on the '...' button of Common include dirs as shown in the following figure:
Figure 37: MPLAB-X IDE Project XC16 Global Options.
  • The Common include dirs dialog window will appear as shown in the following figure:
Figure 38: MPLAB-X IDE Project Common Include Dirs.
  • Click on the Browse... button to add the followings include dirs:
    • out
    • erika\src
    • erika\inc
  • Then click on the OK' button as shown in the following figure:
Figure 39: MPLAB-X IDE Project ERIKA v3 Include Dirs.
  • The ERIKA v3 include dirs will be added, then click OK to confirm as shown in the following figure:
Figure 40: MPLAB-X IDE Project ERIKA v3 Include Dirs Confirmation.
  • To build the ERIKA Enterprise v3 example click on Production->Build Main Project menu entry as shown in the following figure:
Figure 41: MPLAB-X IDE Build Main Project.
  • The build project process starts as shown in the following figure:
Figure 42: MPLAB-X IDE Build Project Process.
  • Finally the build process ends successfully as shown in the following figure:
Figure 43: MPLAB-X IDE Project Built Successfully.
  • To debug the ERIKA Enterprise v3 example click on Debug->Debug Main Project menu entry as shown in the following figure:
Figure 44: MPLAB-X IDE Debug Main Project.
  • The build project process starts as shown in the following figure:
Figure 42: MPLAB-X IDE Build Project Process.
  • The build process ends successfully as shown in the following figure:
Figure 43: MPLAB-X IDE Project Built Successfully.
  • The Device Voltage dialog window may appear as shown in the in the following figure:
Figure 15: MPLAB-X IDE Device Voltage Dialog.
  • Click on the OK button to let program the device as shown in the following figure:
Figure 45: MPLAB-X IDE Device Programming.
  • Finally the programming process ends successfully and the application runs as shown in the following figure:
Figure 46: MPLAB-X IDE Application Running.
  • Click into Pause button to debug the application as shown in the following figure:
Figure 47: MPLAB-X IDE Application Debug.

Additional Notes

T.B.D.