Code Generating for Usrp Receiver Block for Raspberry Pi

4 views (last 30 days)
Hi,
When generating embedded code to run on raspberry pi 2, I get the following build error:
./libmwusrp_uhd_capi.lib: error adding symbols: File format not recognized
collect2: ld returned 1 exit status
The simulink model includes only Sdru Receiver block and a spectrum analyzer.
The lib file was installed with hardware support package. Any ideas to solve this problem?
The whole error message is as follows:
The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
Error executing SSH command: make: Entering directory '/home/pi/bs_rec_001_rtt'
"gcc" -I"./" -O3 -D"MODEL=bs_rec_001" -D"NUMST=1" -D"NCSTATES=0" -D"HAVESTDIO=" -D"ON_TARGET_WAIT_FOR_START=1" -D"ONESTEPFCN=0" -D"EXT_MODE=1" -D"TERMFCN=1" -D"MAT_FILE=0" -D"MULTI_INSTANCE_CODE=0" -D"INTEGER_CODE=0" -D"MT=0" -D"CLASSIC_INTERFACE=0" -D"ALLOCATIONFCN=0" -D"TID01EQ=0" -D"_USE_TARGET_UDP_=" -D"_RUNONTARGETHARDWARE_BUILD_=" -D"EXIT_FAILURE=1" -D"EXTMODE_DISABLETESTING=" -c ./linuxUDP.c ./bs_rec_001.c ./bs_rec_001_data.c ./ert_main.c ./ext_svr.c ./ext_work.c ./rtiostream_interface.c ./updown.c ./rtiostream_tcpip.c ./rtiostream_utils.c
./bs_rec_001.c: In function ‘bs_rec_001_output’:
./bs_rec_001.c:52:5: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]
./bs_rec_001.c: In function ‘bs_rec_001_initialize’:
./bs_rec_001.c:163:5: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]
./bs_rec_001.c: In function ‘bs_rec_001_terminate’:
./bs_rec_001.c:175:5: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]
"gcc" ./linuxUDP.o ./bs_rec_001.o ./bs_rec_001_data.o ./ert_main.o ./ext_svr.o ./ext_work.o ./rtiostream_interface.o ./updown.o ./rtiostream_tcpip.o ./rtiostream_utils.o ./libmwusrp_uhd_capi.lib -lm -ldl -lpthread -lrt -o ./MW/bs_rec_001
./libmwusrp_uhd_capi.lib: error adding symbols: File format not recognized
collect2: ld returned 1 exit status
_bs_rec_001.mk:122: recipe for target 'MW/bs_rec_001' failed
make: *** [MW/bs_rec_001] Error 1
make: Leaving directory '/home/pi/bs_rec_001_rtt'

Answers (1)

Ethem
Ethem on 22 Apr 2015
The libmwusrp_uhd_capi.lib library is compiled for a desktop Linux distribution. As a result, you cannot link it to another executable compiled for a Raspberry Pi 2. As of R2015a release, USRP support package can be used on Windows, Linux, and Mac OS X desktop configuration. Regards, Ethem
  2 Comments
Marcelo Segura
Marcelo Segura on 15 Sep 2017
Hi Ethem I have a similar problem, I don't really get what you mean on your answer. I want to run my model on a RPi which has connected a B200 with UHD drivers working on it. PLease let me know if that is possible.
Ethem
Ethem on 21 Sep 2017
USRP support package does not support Raspberry Pi targeting. libmwusrp_uhd_capi.lib is a library that is used to make UHD library accessible to MATLAB. That library is only provided for Windows, Mac OS and Linux (desktop) but not for Raspberry Pi.

Sign in to comment.

Categories

Find more on MATLAB Support Package for Raspberry Pi Hardware in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!