Difference between revisions of "Microchip tools"

From DIDEAS Wiki
Jump to: navigation, search
m (Tool chain setup)
m (Tool chain setup)
Line 5: Line 5:
 
=PIC32 tools setup=
 
=PIC32 tools setup=
  
=Tool chain setup=
+
=Install software=
 
*Install [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002 MPLAB IDE]  [http://web.media.mit.edu/~cbarn/dspic/microchip/  Microchip tools] [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002]
 
*Install [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002 MPLAB IDE]  [http://web.media.mit.edu/~cbarn/dspic/microchip/  Microchip tools] [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002]
 
*Install Microchip C compiler:  
 
*Install Microchip C compiler:  
**for dsPIC33 and PIC24 : C30 C compiler V2.05 and then license, then install the C compiler V3.23
+
**for dsPIC33 and PIC24 : C30 C compiler V2.05 and then license, then install the [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065 C compiler V3.23]
 
**for PIC32, install [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2615&dDocName=en532454 C32 compiler]
 
**for PIC32, install [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2615&dDocName=en532454 C32 compiler]
  
Line 17: Line 17:
 
*[http://www.media.mit.edu/~cbarn/dspic Top level tools]
 
*[http://www.media.mit.edu/~cbarn/dspic Top level tools]
 
*Install [http://www.ftdichip.com/Drivers/CDM/CDM20600.exe drivers for FTDI CHIP FT2232H] [http://www.ftdichip.com/Drivers/CDM/CDM20600.exe]
 
*Install [http://www.ftdichip.com/Drivers/CDM/CDM20600.exe drivers for FTDI CHIP FT2232H] [http://www.ftdichip.com/Drivers/CDM/CDM20600.exe]
 
+
=config=
 
==mplab IDE config==
 
==mplab IDE config==
 
*This IDE can be used to both edit and compile/build/program
 
*This IDE can be used to both edit and compile/build/program

Revision as of 18:24, 21 September 2010

  • Microchip Tools For Coding, Programming

Edit


PIC32 tools setup

Install software

config

mplab IDE config

  • This IDE can be used to both edit and compile/build/program

To load a PF project, the default settings of the MPLAB IDE need to be changed:

  1. open "MPLAB IDE"
  2. Under Configure -> Settings select the "projects" tab
  3. Uncheck the "use one-to-one project-workspace model"

Some other suggested changes:

  • From the "other" tab, select "automatically reload"
  • From the "workspace" tab, select "no", "reload last workspace", and "always show full path"

Some programmer settings could also be changedLLLLL9

  • Select Programmer -> settings and then "Program after successful build"

After this works, try to open and compile a workspace/project.

  1. From MPLAB IDE, select "File, Open Workspace"
  2. Navigate to "trunk/StateController" and open "sc_workspace_mit.mcw" (or similar)
  3. Ignore complaint about files having been relocated.
  4. after it opens, press "Ctrl F10" to do a "make clean" followed by "make all"

python config

A file that describes the directory structure of the project needs to be placed in c:\

  • Edit the file "support_scripts\python_paths.py", so that variables point the root of your project tree.
  • The root of your project tree the directory that contains the directories "support_scripts" and "pf_python"
  • the string "c:\ceb\0svn" is replaced with your root.
  • Afterward, copy it to c:\

The python interpreter needs to be added to the system path:

  • Ctrl click "My Computer" and then select "Properties"
  • From the new object, select the "Advanced" tab
  • Select "Environment Variables"
  • To the "PATH" variable, append "c:\python25;"
    • The path variable may exist under "user variable" or "system variables"
  • Verify that python is in the system path by starting a DOS prompt and running python

make a wifi connection

From the support scripts folder run :

  • FOR S3 : wifi_fast.py -i 216 -F -f xx -V dataport
  • FOR S5 : wifi_fast.py -i 218 -F -f xx -V dataport


dataport

  • in the SC file "dataport.c" there is the statement : switch(sc_dp.dataport_select)
    • for each case, there are a number of assignment of robot variables to variables of the form "pf[n]".
    • the special command "157" is used to set the value of the variable "sc_dp.dataport_select"
    • thus the command "do_command.py -i IP_ADDRESS -s 157 1" sets dataport select to 1.