|
|
|
![]() :: Research Group Embedded Interaction :: Media Informatics :: Ludwig-Maximilians-University Munich IDEs and ToolsATTENTION: Please see the links on the Particle How to get started page. This page is no longer maintained! Please see also our other how-to pages:
This page is dedicated to the various tools and IDEs we use. CCS and ICD-U Integration MPLAB is a nice IDE for PIC programming - if it would not crash that often. So, if you have enough of MPLAB, why not use a standard editor for programming and downloading of the PIC code? If you have an alternative programmer, such as the ICD-U from CCS, you can do the whole development in another IDE or editor.
CCS Compiler To use the CCS C compiler from the command line, you have to issue the following command: PATH_TO_CCSC.EXE ARGUMENTS PATH_TO_C_FILE An example call for compiling Smart-Its code (all in one line) could look like this (on my computer): C:\Program Files\PICC\Ccsc.exe +FH +LN +T -A +M +Z +Y=9 +EA I="C:\PROGRAM FILES\PICC\devices;C:\PROGRAM FILES\PICC\drivers;C:\svn\SmartITs\headers" C:\svn\SmartITs\pic-general\template.c An example call for compiling particle code (all in one line) could look like this (on my computer): +STDOUT +FH +LN +T -A +M +Z +Y=9 +EA I=C:\PROGRAM FILES\PICC\devices;C:\PROGRAM FILES\PICC\drivers;C:\svn\Particles "C:\svn\Particles\applications\learning cube\learningcube.c" Please note that, if there are spaces in your path to the files, you have to use double quotes around the string.
ICD-U Programmer To use the ICD-U from the command line, you have to issue the following command: PATH_TO_ICD.EXE -TPATH_TO_HEX_OR_COFF_FILE An example call could look like this (on my computer): C:\Program Files\PICC\Icd.exe -TC:\svn\SmartITs\pic-general\template.hex Here are two examples of how to integrate these programs in two editors.
UltraEdit32 - Tool Integration Custom tools can be integrated under the menu item 'Advanced', 'Tool Configuration'. Make sure to completely enclose the command in double quotes (") so that all parameters are correctly handed over to the executing shell. As UltraEdit32 is capable of handling any output generated by the executed command, add a +STDOUT to the CCSC command so that the compilation output is not stored in a .err-file but given to the standard output and then transferred to UltraEdit. See the picture below for the available fields and options. There are a lot of helpful shortcuts / variables that can be used instead of typing in the filename that should be compiled. They can be found in the help of UltraEdit. Some important of them are: %R
This may be used for the full path/name of the project (%r for long name, %R
for short name) After filling out the fields click on 'Insert' to insert your new command to the menu. You can click on the command for re-opening the dialog, e.g. if you need to change your parameters. Confirm your changes by clicking on 'OK'. Proceed like this for the integration of the ICD-U.
EditPlus - Tool Integration Custom tools can be integrated under the menu item 'Tools', 'Configure User Tools'. Again, add +STDOUT to the CCSC compilation command. In contrast to the configuration for UltraEdit32, here you separate command and command arguments. You need not to enclose any parameters here. Activate the checkbox 'Capture output' to display the command's output in EditPlus. Make sure to display the user tool bar! In EditPlus click 'View', 'Toolbars/Views' and finally on 'User Toolbar'. Proceed as described for the integration of the ICD-U.
In EditPlus, you can define an output pattern. This pattern identifies (parts of) the output. By using this feature, you can make EditPlus interpret the text that was outputted by your user tool. In our case, this output is the output of the c compiler. Click on Output Pattern (see picture above). Attention: Do not forget the compiler options in the 'Argument' text field. Here is an example of what you would have to enter. Please adapt the paths and files to your needs. Please note the '"' around the paths!
You can also define a command that always compiles the current file. The arguments then would like this:
See the EditPlus help under the topic 'Argument Macros'. Unselect the check box 'Use default output pattern'. Now enter the following string in the text field: \*\*\* Error [0-9]+ \"(.+\.[ch])\" Line ([0-9]+)\(([0-9]+),[0-9]+\): .* See the picture below. All so-called patterns identified by your regular expressions are embraced in normal braces ( for starting, ) for ending. The first matched part of the above regular expression is the filename (either a .c or a .h file). The second matched pattern is the line in which the compiler error occurred. The third pattern matches the column of the error. Make sure to select the matched expressions by setting this in the three drop down boxes in the window.
Here are some sample error messages. *** Error 12 "C:\svn\SmartITs\projects\distscroll\distance-test.c" Line 158(5,6): Undefined identifier d *** Error 12 "C:\svn\SmartITs\projects\distscroll\distance-test.c" Line 140(1,4): Undefined identifier asd I just entered a 'd' on line 12. This caused the compiler error. You can easily verify that the above regular expression matches this error format. You can make this easily using a open-source regular expression builder. Here is a screenshot of this fine program. I used the regex as input and the two sample compiler errors as test texts.
If you want to integrate the ICD-U into EditPlus, define a user tool as follows:
If you plan to develop code with the CCS C Compiler, please configure EditPlus with the following syntax file (under menu item 'preferences'). The syntax file is called ccsc.stx and can be downloaded here. Please make sure that the other fields are filled out as for the c/cpp syntax.
Do not forget to set the tab/indent settings:
Known Problems with EditPlus If the compiler called by EditPlus generates too many errors (e.g. duplicate define in the code, which causes several errors per line), you can only quit EditPlus to stop the program. Make sure that there is no running instance of the CCSC Compiler in the list of running processes. Otherwise it is possible that a new call to the compiler from EditPlus will reproduce only the old error messages! Links
Files
|
||||||||||||||||||||