필터 지우기
필터 지우기

Matlab Function Driver: Undefined reference to wrapper function

조회 수: 2 (최근 30일)
jakkesprinter
jakkesprinter 2016년 12월 7일
hey guys, i am using the matlab function block approach to implement a driver for external hardware on the raspi. As written in matlab's driver guide, i use the matlab function block to call two functions, say init_func() and output_func(). The latter functions are wrapper functions that enclose the actual c code which should be compiled and downloaded to the raspi. The c-code (with the wrapper functions) lies in an external c-file. As said in the guide, I added this C-file as a custom source with the set_param command. I also wrote an extra h-file which declares my wrapper functions. I included this h-file in my c-file. I also added this h-file as a custom source with the set_param command. When I build the model, Matlab gets so far that it generates the c-File for the simulink block but it errors: MySimulinkBlock.c:(.text+0x1c): undefined reference to `init_func' MySimulinkBlock.c:(.text+0x2f8): undefined reference to `output_func'
This means that my wrapper functions are somehow not found. Any ideas? Thanks!

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by