5.3 run AVIL programs on your PC



If you are interested in understand how the AVIL interpreter works or you're just trying to debug something wrong in an AVIL program (or in the interpreter itself) you can compile and run the interpreter on your PC.
Opening the AVIL folder you prevoùiously installed in your Aduino libraries folder you'll find a file called "AVIL.pro":

AVIL.pro is the QT Project file for AVIL, so, if you have QTCreator installed on your PC you can open it as a plain C++ project (you can do this on Windows or on any linux distro where you can install QT)

Change the compot.h file as follow: (comment line 14 and uncomment line 13)

At this point you can write a small C++ program using an AVIL interpreter object in the main.cpp file (in the same way you would do it in an Arduino sketch)

Obviously the "blink" AVIL program's file must be placed in the top level of the build directory of your QT project:

You can then run the interpreter with debug options, add breakpoints, step by step execution, see variables value...ecc.

Obviously when running on a PC you can't really execute the calls related to I/O's read/write, so they have been replaced by text output for an easier debug!