SPI on mangOH Green

Did you do this?
export PATH=$PATH:/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi

Because it seems like the compiler isn’t in your path. Also, please verify that the directory /opt/swi/y17-ext exists and contains the toolchain.