Simulink仿真模型生成代码时这样报错

12 vues (au cours des 30 derniers jours)
Zoey
Zoey le 1 Nov 2025 à 3:59
Réponse apportée : Anmol le 4 Nov 2025 à 8:23

Réponses (1)

Anmol
Anmol le 4 Nov 2025 à 8:23
Hi Zoey,
I understand that you are trying to generate Embedded C code for a Simulink model, and the code generation is failing. The error reason shown is: The code replacement library specified in the model: TI C28x, is incompatible with the Hardware Implementation: MATLAB Host. Hardware that are compatible with this library are: Texas Instruments - C2000.
The error is occurring because there is a mismatch between your selected code replacement library and your target hardware.
You can refer to these MATLAB answer posts for possible workarounds.
  1. https://www.mathworks.com/matlabcentral/answers/505303-hardware-incompatibility-error-with-c2000-and-matlab-2019a
  2. https://www.mathworks.com/matlabcentral/answers/2176981-how-do-i-resolve-the-code-replacement-library-error-incompatible-with-hardware-implementation-whe
For more information regarding hardware settings and Model Configuration Parameters, you can refer to this MathWorks documentation.
I hope, it helps.

Catégories

En savoir plus sur Texas Instruments C2000 Processors dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!