Home
People
Publications
Events
Teaching
Projects
Resources
Contact
Community
Blog







Tutorials
Software
Docs

:: Research Group Embedded Interaction :: Media Informatics :: Ludwig-Maximilians-University Munich


Particle Programming with EditPlus

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.

EditPlus - Custom Tool Configuration and Integration of User defined Commands

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!

Menu Text Compile Learning Cube
Command "C:\Program Files\PICC\Ccsc.exe"
Argument +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"
Initial Directory C:\svn\Particles\applications\learning cube

You can also define a command that always compiles the current file. The arguments then would like this:

Command "C:\Program Files\PICC\Ccsc.exe"
Argument +STDOUT +FH +LN +T -A +M +Z +Y=0 +EA I="C:\PROGRAM FILES\PICC\devices;C:\PROGRAM FILES\PICC\drivers;C:\svn\Particles" "$(FilePath)"
Initial Directory $(FileDir)

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:

Command C:\Program Files\PICC\icd.exe
Argument -T$(FileNameNoExt).hex
Initial Directory $(FileDir)

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!

 

Please see also our other how-to pages:

How-Tos