Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: spinosa on April 16, 2015, 12:04:31 PM
-
Hi.
I am using a RPi2 with piCore-6.1beta1_v7-SSH for RPi2. So far I got everything set up and running to successfully compile my C program which uses the WiringPi lib to access SPI (it is running perfectly on Raspbian).
However, when I run the program I get the message "Unable to open SPI device: No such file or directory".
The command sudo modprobe spidev.ko
gives modprobe: module spidev.ko not found in modules.dep
When I try sudo gpio load spi
I get modprobe: module spidev not found in modules.dep
modprobe: can't load module spi_bcm2708 (kernel/drivers/spi/spi-bcm2708.ko.gz): No such device
gpio: Unable to load spi_bcm2708
Does SPI generally work with that piCore image for RPi2 or is it missing?
Can I load the module somehow?
Thanks!
-
Hi
spidev.ko is built into the kernel, no need for modprobe. SPI must be enabled in config.txt explicitely. Add the following line:
dtparam=spi=on
Please read /mnt/mmcblk0p1/overlays/README about Device Tree config. This can be useful too:
https://www.raspberrypi.org/forums/viewtopic.php?t=97314
-
Thanks! Works like a charm!
It is impressive how big the performance difference is between Raspbian and piCore. On piCore my application needs around ten times less resoucres and runs like pseudo real-time. Impossible on Raspbian.