Just about everything about Red Pitaya
-
ralu
- Posts: 8
- Joined: Wed Jul 08, 2015 8:02 am
Post
by ralu » Mon Aug 24, 2015 7:25 pm
linking against librp.so
code
Code: Select all
#include "rp.h"
#include "stdio.h"
int main(){
printf("vesrion %s\n",rp_GetVersion());
int v = rp_Init();
printf("%d\n",v);
for(int i=RP_LED0;i<RP_LED7 ;++i){
int r = rp_DpinSetState(RP_LED0, i%2);
printf("%d\n",r);
}
return 0;
}
outputs
and then it freeze. Calling rp_Reset and just seeting pins yields Segementaion error.
i have same lib on both sides with md5sum 2d8825845b4abcc0f1aa088899de8b81
Is there any simple hello world using librp.so available?
-
ralu
- Posts: 8
- Joined: Wed Jul 08, 2015 8:02 am
Post
by ralu » Mon Aug 24, 2015 7:47 pm
i have also build and executed
https://github.com/RedPitaya/RedPitaya/ ... nk_diode.c ,
here is output
Code: Select all
HELLO RED PITAYA!
Runtime error: calib_ReadParams(&calib) returned "Failed to Read Calibration Parameters." at calib.c:29
Runtime error: calib_Init() returned "Failed to Read Calibration Parameters." at rp.c:42
Rp api init failed!
init done
Segmentation fault
-
Luka G.
- Posts: 10
- Joined: Mon Dec 08, 2014 12:40 pm
Post
by Luka G. » Mon Aug 31, 2015 11:35 am
Which compiler are you using?
Cheers, Luka.
-
ralu
- Posts: 8
- Joined: Wed Jul 08, 2015 8:02 am
Post
by ralu » Mon Aug 31, 2015 4:41 pm
Code: Select all
arm-linux-gnueabi-gcc-5 -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc-5
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabi/5/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 5.1.1-13' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=c++98 --disable-libstdcxx-dual-abi --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armel-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armel-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armel-cross --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv4t --with-float=soft --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include
Thread model: posix
gcc version 5.1.1 20150706 (Debian 5.1.1-13)
I later figured out what is going on. Issue is with some initialisation. I had to manually reboot RP for make it work. I am now playing with cross-ghc (haskell compiler for arm) but due to lack of source code I am unable to debug librp. It is working somehow fine (first time only) altough it takes like 30s to init. How can I debug issue with init?
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 95 guests