---
name: "ncg"
section: "1"
platform: "linux"
package: "tinyos-tools"
version: "1.4.2-3+b1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/ncg"
---

# ncg(1)

extract constants from TinyOS files

## NAME

ncg - extract constants from TinyOS files

## SYNOPSIS

**ncg** \[any ncc option\] \[tool-specific options\]\
     \[**-o** *output-file*\]\
     *tool* *nesC-file* *filenames-or-constant-names...*

## DESCRIPTION

**nescc-ncg** is a tool to extract constants from TinyOS files for use with other applications. It is typically used in conjunction with **mig** (which generates code to process TinyOS messages) to extract constants that are used in particular messages (e.g., constants representing various commands).

**ncg** *options* is equivalent to **nescc-ncg -nescc=ncc** *options*. For details on **ncg**'s output and options, please read see the **nescc-ncg** man page.

## EXAMPLE

    APPDIR=\`ncc -print-tosdir\`/lib/FS\<br\>\
     ncg -I%T/lib/FS -java-classname=net.tinyos.matchbox.FS \\\
       java $APPDIR/Remote.nc Matchbox.h Remote.h -oFS.java

## SEE ALSO

[*ncc*(1)](/ncc/1.md), [*nescc-ncg*(1)](/nescc-ncg/1.md), [*mig*(1)](/mig/1.md)
