Coder.ceval on Raspberry Pi: Undefined reference error

2 次查看(过去 30 天)
Hi,
I have a C function "callit_ss.c" called from a Matlab function block with coder.ceval. It runs successfull on normal Simulink mode and also on the Arduino target.
On Raspberry Pi target, make gives the following error:
Error executing SSH command: make:
[...]
undefined reference to `callit_ss' collect2: ld returned 1 exit status
[...]
The .h and .c files are referenced in the Simulink Settings > Custom Code > Header File
and in ...>Include list of additional: Source files
Do I assume correctly that when the Simulink model is tried to be compiled on the Raspberry Pi, the references got lost somehow? what do I need to set up to be able to run that C code on the Raspberry Pi target?
Thanks, Dennis
  1 个评论
Murat Belge
Murat Belge 2016-1-6
Any include files or sources added to the model using Custom Code are normally packaged and transferred to the Raspberry Pi for compilation. There are several examples that use exactly this approach to create device drivers in "Device Drivers" MATLAB File Exchange submission. There is a section dedicated to MATLAB function block and coder.ceval. You can find several examples for Raspberry Pi.
Also, make sure that when specifying files in the Custom Code pane of the Model Configuration Parameters, specify the absolute path for the files.

请先登录,再进行评论。

回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by