SPI on mangOH Green


This is the command that you want to run when building the spisvc kernel module: make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-


I have tried it
it fails with error:

make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-
make -C /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel M=/home/shpp-admin/kmodule modules
make[1]: Entering directory '/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel’
make[1]: arm-poky-linux-gnueabi-gcc: Command not found
CC [M] /home/shpp-admin/kmodule/spisvc.o
/bin/sh: 1: arm-poky-linux-gnueabi-gcc: not found
scripts/Makefile.build:314: recipe for target ‘/home/shpp-admin/kmodule/spisvc.o’ failed
make[2]: *** [/home/shpp-admin/kmodule/spisvc.o] Error 127
Makefile:1276: recipe for target ‘module/home/shpp-admin/kmodule’ failed
make[1]: *** [module/home/shpp-admin/kmodule] Error 2
make[1]: Leaving directory '/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel’
Makefile:16: recipe for target ‘all’ failed
make: *** [all] Error 2

sudo make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-:

sudo_error_2.txt (56.0 KB)


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.

SPI on mangoH green: spisvc

Thanks! it worked for me.
Actually i did it before, when upsetting toolchain but something went wrong.
I will try this .ko file tomorow on target.


Had anybody success using the SPI Service to communicate on the mangOH through SPI?

Can’t get it to work, but I don’t know where the problem could be.

Already posted it on the legato forum but I am not sure if it is maybe a mangOH issue?
Anyway, here is the link to my post:



i had something similar when forgot to turt on spi (see link Setup SPI)
it,s only needed when you have Release 16.10 and higher of Legato


Hello kent1ukr,

what do you mean with turning the spi on? The kernelmodules are installed and loaded, the spi device is visible through /dev/spidev0.0 and the spiservice is running. But can’t send or receive any data through the spi.
What doesn’t work from the docs is the step to start the app “spisvc”:

root@swi-mdm9x15:~/ktest_dir# app start spisvc
Application ‘spisvc’ is not installed.

But I think that should be the spiSerivce?


what comes when you do lsmod ?


spisvc and spidev are up:

root@swi-mdm9x15:~# lsmod | grep spi
spisvc 694 0 - Live 0xbf07b000 (O)
spidev 6076 0 - Live 0xbf076000

Futhermore, I just realized, that the loopback (MISO MOSI) is working when read/writing in fullduplex by using le_spi_WriteReadFD. I think, that is a good sign :slight_smile:


Can you verify that both ends of the SPI bus are expecting the same voltage? I think the WP module’s SPI bus is 1v8 and a lot of chips might be expecting 3v3.


The final problem was the breakout board, which was connected to the wrong pins… Now it is working.
Thanks everybody!