One detail that I will mention in case someone else comes along and reads this set of posts:
- the touch program opens the device /dev/spidev1.0, which indicates CS=0, so the fbtft_device driver needs to be loaded with CS=1 on the command line. These parameters are not the actual CS lines, which are instead GPIOs specified using this structure -
static struct pxa2xx_spi_chip cln_ffrd_spi_1_cs_0 = {.gpio_cs = 10};
The CS in this case is more of a index into the list of SPI devices attached to the SPI port. And the SPI driver requires each device to have unique CS.
If the Intel silicon had CS lines in the SPI port block then these parameters would correspond to physical lines.
Otherwise, the comments in touch.cpp.zip tell the whole story of configuring the GPIO being used as actual CS.
Once you create and install the Cross-compile toolchain (See Chap 7 in BSP Guide), the compile is done by
source /opt/clanton-tiny/1.4.2/environment-setup-x86_32-poky-linux
${CXX} -std=c++11 touch.cpp -o touch