Skip to content

Latest commit

 

History

History
105 lines (68 loc) · 4.85 KB

CommandLine.md

File metadata and controls

105 lines (68 loc) · 4.85 KB

PNut-TS - Command Line

Project Maintenance

License

NodeJS

Release

GitHub issues

Everyday Use of PNut-TS

Our new PNut-TS compiler will show you the following when you speicfy -h or --help:

PNut-TS: Usage: pnut-ts [optons] filename

Propeller Spin2 compiler - v1.43.3

Options:
  -V, --version               Output the version number
  -d, --debug                 Compile with DEBUG
  -l, --list                  Generate listing files (.lst) from compilation
  -v, --verbose               Output verbose messages
  -a, --altbin                Use alternate `.binary` suffix vs. `.bin`
  -o, --output <name>         Specify output file basename
  -i, --intermediate          Generate *-pre.spin2 after preprocessing
  -q, --quiet                 Quiet mode (suppress banner and non-error text)
  -O, --obj                   Generate object files (.obj) from compilation
  -D, --Define <symbol...>    Define (add) preprocessor symbol(s)
  -U, --Undefine <symbol...>  Undefine (remove) preprocessor symbol(s)
  -I, --Include <dir...>      Add preprocessor include directories
  -h, --help                  display help for command

      Example:
         $ pnut-ts my-top-level.spin2         # compile leaving .bin file
         $ pnut-ts -l my-top-level.spin2      # compile file leaving .bin and .lst files


pnut-ts: * Propeller Spin2/PASM2 Compiler 'pnut_ts' (c) 2024 Iron Sheep Productions, LLC., Parallax Inc.
pnut-ts: * Version 1.43.3,  Build date: 12/14/24

These options should already make sense but here's a light-weight recap:

Option forms Description
-O, --obj,
-l, --list
control the generation of the additional listing and object files
-V, --version shows the compiler version information
-o {filename}, --output {filename}
allows you to provide a specific filename for the .bin output file
-a, --altbin use alternate .binary suffix vs. .bin
-q, --quiet,
-v, --verbose
control how little or how much extra messaging is output from the compiler
-I <dir...>, --Include <dir...>,
-U <symbol...>, --Undefine <symbol...>,
-D <symbol...>, --Define <symbol...>
Are all proprocessor directives where -I adds search directories

And of course -h or --help produces the output as shown above.

For PNut-TS developer use

There are a couple of additional options we use when testing or validating PNut_TS:

  -i, --intermediate          Generate *-pre.spin2 after preprocessing
  --log <objectName...>       objectName (choices: "all", "outline", "compiler", "elementizer", "parser", "preproc", "resolver")
  --regression <testName...>  testName (choices: "element", "tables", "resolver", "preproc")
  --pass <passName...>        Stop after passName (choices: "preprocess", "elementize", "con-block")

The -i, or --intermediate Option causes the post preprocessed source file to be saved in case you want to inspect what was passed on to the compiler. This output file has a -pre suffix inserted before the .spin2 extension but otherwise has the same name as your compiled file. E.G., If you compiled blink.spin2 your intermediate output file would be blink-pre.spin2.

The --log {option(s)} produce very detailed output from different sections of the compiler.

The --regression {option(s)} produce additional reports we use for testing/verifing the compiler.

and

The --pass {option(s)} are how we instruct the compiler to end after a given pass.


If you like my work and/or this has helped you in some way then feel free to help me out for a couple of ☕'s or 🍕 slices or support my work by contributing at Patreon!

coffee    -OR-    PatreonPatreon.com/IronSheep


License

Licensed under the MIT License.

Follow these links for more information: