Connecting P2 to Raspberry Pi Zero W

bulletI think I need to use OpenVG for 2D graphics: https://www.khronos.org/openvg/
bulletThere is also OpenGL ES for 3D graphics
bulletIn order to leave memory for graphics, need to use the "Lite" version of Raspbian.
bulletSteps I took to get started over WiFi (no keyboard or monitor):
bulletFollowing guide here to install "Lite" version of OS on RPi Zero W:  https://thisdavej.com/create-a-lightweight-raspberry-pi-system-with-raspbian-lite/
bulletFlashed the lite version of Raspbian with Etcher
bulletAdded two files to root folder ("boot" drive in Windows) to enable ssh connection over WiFi
bulletFollowed rest of instructions (but, don't need to add wifi and ssh because did it with those two files already).
bulletI wasn't able to change the keyboard layout, but don't think it maters...
bulletFor "memory split" setting, left at 64 MB.  May actually want to increase this later for more 2D graphics memory...
bullet For some reason, updates didn't work at first, had to do "sudo mount -o remount, rw /" as described here
bulletInstalled Samba, following directions
bulletUsed Visual Studio 2019 to blink LED over SSH
bulletHad to run VS installer to add Linux project type
bulletUsed the Blink example to toggle pin#17
bulletHad to install "wiringPi" on rpi before this worked
bulletAlso had to remount like above as file system became write protected again somehow
bullet Figured out that BCM pin number is not same as WiringPi pin# .  Not exactly sure why this code uses BCM pin# when we are using WiringPi, but verified that BCM pin is actually toggling!
bullet Trying to complile an OpenVG example program:
bullet  Installed GIT:  sudo apt-get install wget git-core
bulletget openvg:  git clone git://github.com/ajstarks/openvg
bulletcontinute to make it using rest of these instructions
bulletGot an error about the font, had to do this:  sudo apt-get install ttf-dejavu
bulletget error making example due to no jpeglib.h, so doing this:  sudo apt-get install libjpeg-dev
bulletcompiler can't find the VG/openvg.h file, giving error
bulletHad to add to Project Properties ->C/C++->Additional Include Directories and make it like this:  %(ClCompile.AdditionalIncludeDirectories);/opt/vc/include
bullet/opt/vc/include is where the VG headers are ... 
bulletAlso, need to add to linker...
bulletUnder Linker ->Additional dependencies at this:  wiringPi;pthread;rt;shapes  
bulletLooks like I need to start over due to uSD card corruption.  Going to use Win32 Disk Imager to backup rpi's uSD card, once I get it all set up and don't need to remount and Samba works again
bulletProblems with disk imager...  First, image is 60 GB, second when zipped it didn't work with Etcher...  Need to figure this out
bulletInstalling VNC on headless RPi.  Needed to update all first it seems...  Only been a week since OS installed, but VNC wouldn't install via "sudo raspi-config" until updated
bulletHad to go back into raspi-config to set screen resolution before VNC would work...
bulletThat didn't work, tried this:  "sudo apt-get install --reinstall lxsession"   Maybe this is because installed "lite" version of Raspian...  This one takes a long time to install...
bulletIt works!  Took a while for desktop to load at first...
bulletNow, to try FlexGui...  Need git...  "sudo apt-get install git"
bulletThen, get FlexGui : "git clone https://github.com/totalspectrum/flexgui.git "
bulletSeems we need Tk...  Trying " sudo apt-get install python-tk "  Didn't work...
bulletTrying this: 
bullet sudo apt-get install tcl8.5
bullet sudo apt-get install tk8.5
bulletHave to create symbolic link to wish  "ln -s wish8.4 wish"
bulletIt works!  run or type "FlexGui.tcl" to run.  But, can't compile...  Seems fastspin is not included...
bulletCopying over fastspin source code using Windows Samba share.  I should have copied over the tarball instead of individual files, I think...
bulletYes, much faster... do "gunzip spin2cpp-4.0.3.tar.gz" then do "tar -xvf spin2cpp-4.0.3.tar".  Then use GUI to move files back into spin2cpp folder.
bulletSeems we need Bison to compile Fastspin...  doing " sudo apt-get install bison"
bulletOk, now it compiles.  Now, create "bin" folder and move fastspin there (it's in a hidden folder named "build")
bulletNow we can compile.  But, can't load...  Seems we need xterm.
bulletOk, now we need loadp2.  Have to download and compile as did for fastspin...
bulletDo "git clone https://github.com/totalspectrum/loadp2.git"
bulletthe linux build script doesn't seem to work as can't find Mainloader.h...
bulletTrying "make" instead...  That doesn't work because can't find fastspin...  
bulletSo, edited makefile and changed this line to point to the bin "PASM=../bin/fastspin -2"
bulletdoes more, but then get error: loadp2.c:425:25: error: ‘MainLoader_bin’ undeclared (first use in this function);
bulletEditted loadp2.c and commented out the guts of the  loadfileFPGA routine where that error is because not using FPGA here...
bulletIt worked!  now, copy loadp2 from build over to flexgui\bin\
bulletWe're very close now!  Some examples work...  But, get "Unable to open file `spin/SmartSerial': No such file or directory".  Need to copy these over...
bulletWhere does "include" folder belong?  Using the flexgui interface, found it should be in the flexgui folder.
bulletCan now compile and download to P2b wirelessly!
bullet VNC Compile P2 on Pi zero