EnglishFrenchSpanish

OnWorks favicon

ncc - Online in the Cloud

Run ncc in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command ncc that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


ncc - nesC compiler for TinyOS

SYNOPSIS


ncc [-target=pc|mica|mica2|mica2dot|...] [-tossim]
[-board=micasb|basicsb|micawb|...]
[-tosdir=dir] [-tosscheduler=...] [-nostdinc]
[--version] [-print-tosdir] [-print-platforms] [-print-target]
[any nescc option] [any gcc option] files...

DESCRIPTION


ncc is an extension to nescc that knows how to compile nesC applications for a TinyOS
environment. If invoked on regular C files, it behaves like gcc. When invoked on a nesC
component or interface (.nc extension) file it compiles and links (except if the usual -c,
-S, -E or -fsyntax-only options are used) that component with the other files specified on
the command line.

ncc just invokes nescc with extra options based on the selected platform and
sensorboard(s). And nescc itself just invokes gcc. Thus, for a full understanding of
possible ncc options you should read the nescc and gcc man pages.

OPTIONS


ncc accepts all gcc and nescc options, and some additional TinyOS specific options:

-target=X
Specify the target architecture for this compilation. If -tossim is also specified,
the compilation uses the tossim environment and produces a locally executable file.
The default target is specified in the .default-platform file in your TinyOS
directory (see -tosdir option), and defaults to mica if that file is absent. A
platform that is not in the TinyOS distribution can be used if its directory is
specified with an explicit -I directive (the platform name is taken from the
directory's name, platform directories are recognised by the presence of a
.platform file).

-tosdir=dir
Specify the location of TinyOS. This location can also be specified with the TOSDIR
environment variable. If the variable and the option are both given, ncc uses the
value specified with the option. If neither the environment variable or option are
specified, ncc uses its compiled-in TinyOS directory.

-tosscheduler=component,unique-string,interface-name,interface-definition,run-event,post-
command
By default, nesC compiles uses of task void taskname() ... to void taskname(),
and post taskname() to TOS_post(taskname).

With this option, each task gets its own interface-definition interface, the
task implementation is transformed into a run-event event and posts becomes a call
to the post-command command. This per-task interface is automatically connected
to the parameterised interface-name interface of scheduler component component.
The parameter id for the connection is chosen with unique("unique-string").

If this option is not set explicity, its parameters are assigned by default as
follows:

-tosscheduler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask

-tossim
Compile for the TOSSIM environment rather than a native platform. Every directory
in the search path will be duplicated, with the first copy having /sim appended to
it.

-print-tosdir
Print the TinyOS directory to be used and exit, taking into account the -tosdir
option and TOSDIR environment variable. No compilation occurs when -print-tosdir is
used.

-print-platforms
Print the valid TinyOS platforms, including those made available by explicit -I
directives (see -target option).

-print-target
Print the name of the selected target. Most useful when -target is not specified.

-nostdinc
Do not automatically include the TinyOS directories in the search path. See the
discussion of search paths below for more details.

-board=Y
Specify one (or more) sensor boards. This effects the search path and preprocessor
symbols. The set of boards is set by the TinyOS distribution (see the
tos/sensorboards directory). As with targets, a sensorboard directory can be made
available via an explicit -I directive (sensorboard directories are recognised by
the presence of a .sensor file).

--version
Print the version of ncc, nescc and of the gcc compiler used for the selected
target.

EXAMPLES


If you wish to compile a component Bar.nc to a C file, you can do:

ncc -c -o /dev/null -fnesc-cfile=Bar.c Bar.nc

SEARCH PATH


ncc performs the following substitutions on the directories specified with the -I option:
%T is replaced by the TinyOS directory, %p is replaced by the selected target, %P is
replaced by the target's platform directory, %% is replaced by %.

Except when -nostdinc is specified, the search path for nesC components is as follows,
where tosdir is the TinyOS directory requested and target is the selected target:

* The current directory

* -I directives (in option order)

* %T/sensorboards/boardname, for each -board=boardname option specified (in option
order) - except if the sensorboard was found via an explicit -I directive

* %T/platform/%p - except if the platform was found via an explicit -I directive

* Additional directories requested by the selected target (e.g., %T/platform/avrmote
for the mica target)

* %T/interfaces

* %T/system

* %T/lib

* NESCPATH environment variable directories (note that %T and %p subsitution is not
performed on these directories).

When -nostdinc is specified, the search path is simply:

* The current directory

* -I directives

* NESCPATH environment variable directories

PREPROCESSOR SYMBOLS


In addition to the preprocessor symbols defined by gcc and nescc, ncc defines:

PLATFORM_target
where target is the selected target name, converted to upper case

BOARD_boardname
for each -board=boardname option (the boardname is converted to upper case)

ENVIRONMENT VARIABLES


TOSDIR If the -tosdir=dir option is not used, the TOSDIR environment variable specifies
the location of TinyOS.

Use ncc online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    KompoZer
    KompoZer
    KompoZer is a wysiwyg HTML editor using
    the Mozilla Composer codebase. As
    Nvu's development has been stopped
    in 2005, KompoZer fixes many bugs and
    adds a f...
    Download KompoZer
  • 2
    Free Manga Downloader
    Free Manga Downloader
    The Free Manga Downloader (FMD) is an
    open source application written in
    Object-Pascal for managing and
    downloading manga from various websites.
    This is a mirr...
    Download Free Manga Downloader
  • 3
    UNetbootin
    UNetbootin
    UNetbootin allows you to create bootable
    Live USB drives for Ubuntu, Fedora, and
    other Linux distributions without
    burning a CD. It runs on Windows, Linux,
    and ...
    Download UNetbootin
  • 4
    Dolibarr ERP - CRM
    Dolibarr ERP - CRM
    Dolibarr ERP - CRM is an easy to use
    ERP and CRM open source software package
    (run with a web php server or as
    standalone software) for businesses,
    foundations...
    Download Dolibarr ERP - CRM
  • 5
    SQuirreL SQL Client
    SQuirreL SQL Client
    SQuirreL SQL Client is a graphical SQL
    client written in Java that will allow
    you to view the structure of a JDBC
    compliant database, browse the data in
    tables...
    Download SQuirreL SQL Client
  • 6
    Brackets
    Brackets
    Brackets is a free, modern open-source
    text editor made especially for Web
    Development. Written in HTML, CSS, and
    JavaScript with focused visual tools and
    prepr...
    Download Brackets
  • More »

Linux commands

Ad