VIC™ - A compiler for Microchip’s PIC® Microcontrollers

Project sponsored by Selective Intellect Hosted on GitHub Pages — Theme by mattgraham

Table of Contents Prev  Next

Commandline Options

The vic compiler can accept commandline options that mainly allow the user to reuse code for other Microchip’s PIC® MCUs and modify the pragma statements on the fly.

Here is a list of the commandline options currently supported in both short and long form:

Here is an example of the pin diagram of the PIC16F631 chip.

                    Vdd ---|1           20|--- Vss
                           |              |
   RA5/T1CKI/OSC1/CLKIN ---|2           19|--- RA0/C1N+/ICSPDAT/ULPWU
                           |              |
    RA4/T1G/OSC2/CLKOUT ---|3           18|--- RA1/C12IN0-/ICSPCLK
                           |              |
           RA3/MCLR/Vpp ---|4           17|--- RA2/T0CKI/INT/C1OUT
                           |              |
                    RC5 ---|5           16|--- RC0/C2IN+
                           |              |
                           |   P16F631    |
                           |              |
              RC4/C2OUT ---|6           15|--- RC1/C12IN1-
                           |              |
            RC3/C12IN3- ---|7           14|--- RC2/C12IN2-
                           |              |
                    RC6 ---|8           13|--- RB4
                           |              |
                    RC7 ---|9           12|--- RB5
                           |              |
                    RB7 ---|10          11|--- RB6
                           |              |

Based on these options here are some sample examples on how to use them:

# to print the compiler version
$ vic -V
# to print the help message
$ vic -h
# to compile to a hex file
$ vic -o helloworld.hex helloworld.vic
# to compile to assembly
$ vic -o helloworld.asm helloworld.vic
# to compile to a hex file but override the chip in the code
$ vic -p p16f631 -o helloworld.hex helloworld.vic
# to compile only to assembly with intermediate code and not to a hex file
$ vic -i -o helloworld.asm helloworld.vic
$ vic -i -o helloworld.hex --no-hex helloworld.vic
# to compile to a hex file and simulate the code
$ vic -o helloworld.hex --simulate helloworld.vic
# to list the chips supported
$ vic --list-chips
# to list the simulators supported
$ vic --list-simulators
# to check if the chip is supported
$ vic --supports P12F683
# to list the chip's features
$ vic --list-chip-features P16F685
# to print the chip's pin diagram
$ vic --chip-pinout P16F631
# to print the locations of the gputils tools
$ vic --list-gputils

Now that we have learned enough about using the vic compiler, let us move on to studying the various available in-built functions for VIC™.

Table of Contents Prev  Next

Vikas N Kumar (@vikasnkumar) is the author of VIC™. All copyrights belong to the author and Selective Intellect LLC.

VIC™ is licensed under the license terms of Perl.
The development of VIC™ is sponsored by Selective Intellect LLC.

This page was last updated on 2014-12-02 10:39:14 -0500.