Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSD1331 demo failing #136

Open
sgjava opened this issue Dec 11, 2021 · 4 comments
Open

SSD1331 demo failing #136

sgjava opened this issue Dec 11, 2021 · 4 comments

Comments

@sgjava
Copy link

sgjava commented Dec 11, 2021

make: Entering directory '/home/servadmin/ssd1306/examples'
make -C ../src -f Makefile.linux MCU= SDL_EMULATION= \
                     ADAFRUIT=
make[1]: Entering directory '/home/servadmin/ssd1306/src'
make[1]: Nothing to be done for 'default'.
make[1]: Leaving directory '/home/servadmin/ssd1306/src'
mkdir -p ../bld/demos/
cc -o ../bld/demos/ssd1331_demo.out -g -Os -w -ffreestanding -MD -g -Os -w -ffreestanding -I./demos/ssd1331_demo -I../src -Wall -Werror -Wl,--gc-sections -ffunction-sections -fdata-sections  ../bld/main.o ../bld/demos/ssd1331_demo/sova.o ../bld/demos/ssd1331_demo/ssd1331_demo.o -L../bld -lssd1306
../bld/demos/ssd1331_demo.out
Failed to initialize SPI: No such file or directory!
^Cmake: *** [Makefile.linux:52: flash] Interrupt

I assume there's a way to set SPI device and pins for DC and RESET? Also I shouldn't have to run as root as I have the permissions set for non-root user on SPI device.

@lexus2k
Copy link
Owner

lexus2k commented Jan 6, 2022

Do you have spidev kernel module loaded?
Does the application have access privileges to kernel module driver?
What is the configuration of the target system?

@sgjava
Copy link
Author

sgjava commented Jan 6, 2022

Doesn't it use spidev from userspace?

@lexus2k
Copy link
Owner

lexus2k commented Mar 10, 2022

Yes, it use spidev from userspace, but accessing to spi char devices requires root privileges

@sgjava
Copy link
Author

sgjava commented Mar 10, 2022

I just use a script to set permissions https://github.com/sgjava/javauio/blob/main/scripts/uio-permissions.sh I mean I use u8g2 fine with https://github.com/olikraus/u8g2/tree/master/sys/arm-linux You can see where I committed changes to use c-periphery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants