MATLAB Answers

Use C-caller with Custom Libraries from texas C2000 (c28x_vcu0​_library_f​pu32.lib)

16 ビュー (過去 30 日間)
Jerem_F
Jerem_F 2019 年 10 月 22 日
コメント済み: Jerem_F 2019 年 10 月 23 日
Hello,
I’m trying to use a c-caller block in order to use the custom FFT function developed by texas for the C2000 µC family.
Before Simulink, I try the custom FFT function in Code Composer Studio (CCS is IDE from texas) and it works well:
Note: the linker need the library "c28x_vcu0_library_fpu32.lib" to be included in the project proprieties of CCS.
The custom FFT function are not described in a .c source file but in a .lib library.
In Simulink I include the library "c28x_vcu0_library_fpu32.lib" in
Model Configuration Parameters > Simulation Target > Libraries
But it causes errors:
### Build procedure for model: 'c28x_CAN_Tx_Ccaller_Memoshare' aborted due to an error.
Error(s) encountered while building custom code simulation target for model 'c28x_CAN_Tx_Ccaller_Memoshare'. Fix the errors in your custom code or disable 'Import custom code' if your custom code has incompatibilities.
Caused by:
  • c:\ti\c2000\c2000ware_2_00_00_02\libraries\dsp\vcu\c28\lib\c28x_vcu0_library_fpu32.lib: member c:\ti\c2000\c2000ware_2_00_00_02\libraries\dsp\vcu\c28\lib\c28x_vcu0_library_fpu32.lib(crc_16_alt.obj) in archive is not an object collect2.exe: error: ld returned 1 exit status
Someone can help me please?
Thanks,
Jeremie

  0 件のコメント

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

採用された回答

Venkatesh Chilapur
Venkatesh Chilapur 2019 年 10 月 23 日
Hi,
Attached is one approach using MATLAB function block to invoke the FFT routine as shipped from TI from within the MATLAB/Simulink.
We define FFT structure containing pointers (as needed by TI API's) and pass the same after populating the pointers with appropriate references.
We implement a wrapper function which will do this assignment to pointers.
Please refer the attached files for the same.
Note: Update the MATLAB function code for header and source file path as appropriate.
HTH,
Venkatesh C

  1 件のコメント

Jerem_F
Jerem_F 2019 年 10 月 23 日
Hi,
I m working with 2018b, could you please send me a new attachement that works with Simulink 2018b.
many thanks
Jeremie

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

その他の回答 (1 件)

Venkatesh Chilapur
Venkatesh Chilapur 2019 年 10 月 23 日
Hi,
Please find the same.
Regards,
Venkatesh C

  1 件のコメント

Jerem_F
Jerem_F 2019 年 10 月 23 日
Finally the FFT will be done in C code without Simulink.
So now you can close the this threads.
Many Thanks for your support.
Kind regards
Jérémie

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

Community Treasure Hunt

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

Start Hunting!

Translated by