I am trying to get my head around the process to use VCode on my PC, write a ‘hello world’ in C/C++, compile it, and run it on the RPi.
I tried adding the RPi as new platform to setup a new project in VScode/PIO and I got to an error box and solution suggestion. One of the suggestions was to PIO REMOTE AGENT.
After following it I found I was able to get the remote agent working on the RPi.
So if I open a PIO terminal in VScode on the PC I can see my remote machine :
PLC-Dev\Software\Prototype\Sandpit\rpiDev1\helloworld> pio remote device list
Agent rpiDev1
/dev/ttyAMA0
Hardware ID: 20201000.serial
Description: ttyAMA0
But what is the process from here ? I could not find any examples or documentation about compiling and running. Could someone run me through the bit I am missing ?
I am guessing the required process is that the source code needs to be downloaded to the RPi from the VScode and compiled there and run from there. This is the process that works for me with ‘Clion’.