I’m working on a port of unicorn-hat to Java (don’t ask!) and am having some trouble with compiling ws2812. At least that’s where I think I’m at. I appreciate this is a little left-field for the forum, so feel free to say you can’t help ;)
Anyway, I can run the recent Pi 2 fix ok (some examples from the pyhton folder crash for me occasionally but I’m assuming that’s to be expected). However, when I do anything with my hand compiled and JNI linked
.so, it crashes. No output.
Can you sense check my SWIG /
gcc steps please? I suspect the
.so produced isn’t right somehow. I’m basing it all on the Pimoroni mods to ws2812 (including the
.i as input into SWIG);
swig -java -package bad.robot.unicorn.neopixel ws2812-RPi.i gcc -fPIC -c ws2812-RPi.c ws2812-RPi_wrap.c -DPERI_BASE=0x3F000000 -DRPI2 -I/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/include -I/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/include/linux gcc -shared ws2812-RPi.o ws2812-RPi_wrap.o -o libws2812-RPi.so
The crash report doesn’t reveal much to me but it goes wrong when I try and call
# Problematic frame: # C [libws2812-RPi.so+0x4d84] show+0x308
The full log is here.
Any tips welcome!