EPOS4 Maxon Group and beaglebone programmed from Simulink

9 ビュー (過去 30 日間)
PEDRO HENRIQUE Ulhoa
PEDRO HENRIQUE Ulhoa 2020 年 12 月 28 日
I am trying to integrate EposCommandLibrary(shared library for linux applications) from MaxonGroup with simulink environment. My main goal is to put some c++ code in s-function builder block with some functions of EPOSCommandLibrary, and then this code is going to be deployed in my beaglebone black board with Embedded Coder. But i am getting some errors because my simulink model is not recognizing EPOSCommandLibrary and its functions. When you compile from linux terminal(beaglebone) you need to use gcc main.cpp -lEposCmd. As you can see, i need this parameter in the gcc compile command. I was wondering if i can compile my c++ code in simulink with gcc and put manually this flag.
Thank you for reading this!

採用された回答

Aghamarsh Varanasi
Aghamarsh Varanasi 2020 年 12 月 31 日
Hi,
You can add compile time flags to your build environment of Embedded Coder using the 'addCompileFlags' function.
For Example,
myModelBuildInfo = RTW.BuildInfo;
addCompileFlags(myModelBuildInfo,'-lEposCmd');
Hope this helps.
  8 件のコメント
Aghamarsh Varanasi
Aghamarsh Varanasi 2021 年 1 月 5 日
Hi,
You can add '.dll' files to the build environment by using the 'addNonBuildFiles' function.
Syntax:
addNonBuildFiles(buildinfo,filenames,paths,groups)
Here, groups is an optional argument.
Example:
myModelBuildInfo = RTW.BuildInfo;
addNonBuildFiles(myModelBuildInfo, ...
{'myutility1.dll' 'myutility2.dll'}, ...
'/proj/dlls');
You can customise the build process by using the Build Process Customisation.
PEDRO HENRIQUE Ulhoa
PEDRO HENRIQUE Ulhoa 2021 年 1 月 5 日
i tried hat and still it's not working... The diagnostic:
"mycode.c:(.text+0x200): undefined reference to 'VCS_opendevice' "
I am using S-function to call some C files that uses EposCmd library. When i build, this "undefined reference" error appears. It's not recognizing the library.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by