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
    archlabs_repo
    archlabs_repo
    Package repo for ArchLabs This is an
    application that can also be fetched
    from
    https://sourceforge.net/projects/archlabs-repo/.
    It has been hosted in OnWorks in...
    Download archlabs_repo
  • 2
    Zephyr Project
    Zephyr Project
    The Zephyr Project is a new generation
    real-time operating system (RTOS) that
    supports multiple hardware
    architectures. It is based on a
    small-footprint kernel...
    Download Zephyr Project
  • 3
    SCons
    SCons
    SCons is a software construction tool
    that is a superior alternative to the
    classic "Make" build tool that
    we all know and love. SCons is
    implemented a...
    Download SCons
  • 4
    PSeInt
    PSeInt
    PSeInt is a pseudo-code interpreter for
    spanish-speaking programming students.
    Its main purpose is to be a tool for
    learning and understanding the basic
    concep...
    Download PSeInt
  • 5
    oStorybook
    oStorybook
    oStorybook l'outil privil�gi� des
    �crivains. ATTENTION : voir sur
    http://ostorybook.tuxfamily.org/v5/
    --en_EN oStorybook the right tool for
    writers. WARNIN...
    Download oStorybook
  • 6
    Asuswrt-Merlin
    Asuswrt-Merlin
    Asuswrt-Merlin is a third party
    firmware for select Asus wireless
    routers. Based on the Asuswrt firmware
    developed by Asus, it brings tweaks, new
    features and ...
    Download Asuswrt-Merlin
  • More »

Linux commands

  • 1
    aafigure
    aafigure
    aafigure - convert ASCII art to an
    image ...
    Run aafigure
  • 2
    aafire
    aafire
    aafire, aainfo, aasavefont, aatest -
    aalib example programs ...
    Run aafire
  • 3
    coqtop.opt
    coqtop.opt
    coqtop.opt - The native-code Coq
    toplevel ...
    Run coqtop.opt
  • 4
    coqwc
    coqwc
    coqwc - print the number of
    specification, proof and comment lines
    in Coq files ...
    Run coqwc
  • 5
    g15composer
    g15composer
    g15composer - Scriptable command
    interface to libg15render(3) drawing
    functions DESCRIPTION: G15composer is a
    scriptable command interface to the
    libg15render ...
    Run g15composer
  • 6
    g15daemon
    g15daemon
    g15daemon - provides access to extra
    keys and the LCD available on the
    logitech G15 keyboard. DESCRIPTION:
    G15Daemon allows users access to all
    extra keys by d...
    Run g15daemon
  • More »

Ad