Embedded Freaks..

October 1, 2008

Using jEdit as NesC’s Editor

Filed under: embedded-tips — Tags: — kunilkuda @ 3:41 pm

What’s the thing that I don’t like from NesC ? Well, it doesn’t have any of IDE. I heard that Eclipse has plugin for NesC/TinyOS, but I’m too lazy to download and install whole 210MB of Eclipse, just to have NesC’s IDE.

My solution was to use simple editor, such as jEdit, then add some plugin to execute Makefile and highlight the NesC/TinyOS syntax.

Here’s the how to

Syntax Highlighting

  1. Download the archived files from here
  2. Find the jEdit local settings directory. In linux, it will be $HOME/.jedit
  3. Check whether $HOME/.jedit/catalog fle is empty or not.
  4. If it is empty, untar the file in $HOME/.jedit/modes directory
  5. If it is not empty, copy the nc.xml into $HOME/.jedit/modes directory. Thus, add this line in the $HOME/.jedit/modes/catalog file: <MODE NAME=”nesc” FILE=”nc.xml” FILE_NAME_GLOB=”*.nc” />
  6. Restart jEdit

Additional notes:

  • Some NesC files that have been opened before this mode is added will not be highlighted. Delete the recent.xml and history file in $HOME/.jedit
  • You can have this syntax highlight as global (affected all the jEdit users in the system), by replacing the path of $HOME/.jedit to <your_jEdit_installation_directory>
  • This howto is tested using jEdit 4.3pre15, and Java 1.6.0

Makefile Execution

> Coming up very soon

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: