Error in compile modeling on raspberry pi

2 次查看(过去 30 天)
when i want to compile rtl-sdr spectrum on raspberry pi it returns errors:
### Starting build procedure for model: FMTEST
Code Generation 1
Elapsed: 14 sec
### Generating code into build folder: C:\Users\root\Desktop\ghi\FMTEST_ert_rtw
### Invoking Target Language Compiler on FMTEST.rtw
### Using System Target File: K:\MATLAB\R2016a\rtw\c\ert\ert.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file FMTEST.h
### Writing header file FMTEST_types.h
### Writing header file rtwtypes.h
.
### Writing source file FMTEST.c
### Writing header file FMTEST_private.h
### Writing source file FMTEST_data.c
### Writing header file rtmodel.h
### Writing source file ert_main.c
.
### TLC code generation complete.
### Creating project marker file: rtw_proj.tmw
### WARNING: Unable to run 'rtwmakecfg' file in directory: 'C:\MATLAB\SupportPackages\R2016a\toolbox\shared\sdr\sdrr\sdrrmex' due to error: 'An active connection to 169.254.0.2 already exists. You cannot create another connection.'
### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: GNU GCC Raspberry Pi v1.0 | gmake (64-bit Windows)
### Creating 'C:\Users\root\Desktop\ghi\FMTEST_ert_rtw\FMTEST.mk' ...
### Building 'FMTEST': make -f FMTEST.mk all
### Build procedure for model: 'FMTEST' aborted due to an error.
Error executing command "touch -c /home/pi/FMTEST_ert_rtw/*.*;make -f FMTEST.mk all -C /home/pi/FMTEST_ert_rtw". Details:
STDERR: In file included from FMTEST.c:2:0:
FMTEST.h:11:26: fatal error: sdrrdriver.hpp: No such file or directory
#include "sdrrdriver.hpp"
^
compilation terminated.
make: *** [FMTEST.c.o] Error 1
STDOUT: make: Entering directory '/home/pi/FMTEST_ert_rtw'
gcc -c -MMD -MP -MF"FMTEST.c.dep" -MT"FMTEST.c.o" -O0 -DMODEL=FMTEST -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DRT -DSTACK_SIZE=64 -DMODEL=FMTEST -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -I./ -o "FMTEST.c.o" "FMTEST.c"
FMTEST.mk:415: recipe for target 'FMTEST.c.o' failed
make: Leaving directory '/home/pi/FMTEST_ert_rtw'
  3 个评论
Bakthavachalam Ramprabhu
Facing the same issue while compiling the model for White space detection using MATLAB on Raspberry Pi.
### Build procedure for model: 'sdrrTVWhiteSpaceMonitorRPiExample' aborted due to an error. Error executing command "touch -c /home/pi/sdrrTVWhiteSpaceMonitorRPiExample_ert_rtw/*.*;make -f sdrrTVWhiteSpaceMonitorRPiExample.mk all -C /home/pi/sdrrTVWhiteSpaceMonitorRPiExample_ert_rtw". Details:
STDERR: In file included from sdrrTVWhiteSpaceMonitorRPiExample.c:17:0: sdrrTVWhiteSpaceMonitorRPiExample.h:34:26: fatal error: sdrrdriver.hpp: No such file or directory #include "sdrrdriver.hpp"
Got any solution for this?

请先登录,再进行评论。

回答(1 个)

Ethem
Ethem 2017-9-21
The important line for this kind of error is here:
WARNING: Unable to run 'rtwmakecfg' file in directory: 'C:\MATLAB\SupportPackages\R2016a\toolbox\shared\sdr\sdrr\sdrrmex' due to error: 'An active connection to 169.254.0.2 already exists. You cannot create another connection.'
The actual error message that caused this failure is "An active connection to 169.254.0.2 already exists. You cannot create another connection." which means that the model is trying to use the same Raspberry Pi at address 169.254.0.2 and there is already an active connection to that Raspberry Pi. This may happen if you created a connection using the "<https://www.mathworks.com/help/supportpkg/raspberrypiio/ref/raspi.raspi.html raspi>" command. You need to clear the variable as described in the link. Then try running the model again.

类别

Help CenterFile Exchange 中查找有关 MATLAB Support Package for Raspberry Pi Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by