Compile SPIN code from Flexprop
disha_sudra
Posts: 43
Hello,
How can I call SPIN function in CPP file in Flexprop?
How to compile any sample SPIN code in Flexprop?
I'm trying to compile sample code given in below link.
https://github.com/totalspectrum/flexprop/blob/master/samples/blink1.spin2
Comments
That demo you cite is Spin2, and works as-is (I just tested). Here's a similar program for the P1 -- if you have a FLiP or PAB you can run without any other hardware.
Load the Spin file into a C struct, something like:
Just use File > Open to open the Spin file in the editor, and then Compile & Run (for P1 or P2 as appropriate). The language used is based on the file extension: .spin for Spin1, .spin2 for Spin2, .bas for BASIC, .c for C, .cpp for C++ (which is only partly supported).
Thank you.
I think flexprop can compile spin2 code for P1, is that right?
Yes, as long as no P2 specific hardware features are used.