Unable to Compile C2000

Hi,
I was trying to exercise PWM operation for a C2000 operation. I tried to build but I am facing compilation issues. The build fails at compile step10 with a compilation error. I tried to run a LED blinker and received the same error. Do you have any idea why it’s not compiling?

Compilation failure
Blinker.mk:284: recipe for target ‘output_TI2837x_cpu1/Blinker_hal.obj’ failed
make[1]: Leaving directory ‘C:/Software/C2000/Blinker’
Blinker.mk:161: recipe for target ‘all’ failed

“Blinker_hal.c”, line 9: fatal error: cannot open source file “plx_hal.h”
1 catastrophic error detected in the compilation of “Blinker_hal.c”.
Compilation terminated.
make[1]: *** [output_TI2837x_cpu1/Blinker_hal.obj] Error 1
make: *** [all] Error 2

Regards,
Sarang Gupta

A few questions:

  • Was code generation ever working or is this your first time using it?
  • How did you install the Target Support Package? Have you tried reinstalling it?
  • Can you share which version of PLECS and TI C2000 TSP are using? You can check the TSP version from the File + PLECS Preferences + Coder tab.
  • Is C:/Software/C2000/Blinker the full path to the folder where your model is saved?

Hello Bryan,
Thanks for the revert. Below is my response to your questions:

  1. Was code generation ever working or is this your first time using it?
    [Sarang Gupta]: Yes, this is my first time generating code on this machine.

  2. How did you install the Target Support Package? Have you tried reinstalling it?
    [Sarang Gupta]: I am following the instructions given in https://www.plexim.com/sites/default/files/c2000manual.pdf. I have installed both the C2000 Code Gen Tools (CGT) and UniFlash thorugh the single executable given in TI C2000 Code Generation | Plexim.
    I did not tried reinstalling.
    Under PLECS Preferecnes > Coder > I see no errors under installed targets. Both the external tools (TI codegen tools and TI Uniflash) are pointing the correct directory.

  3. Can you share which version of PLECS and TI C2000 TSP are using? You can check the TSP version from the File + PLECS Preferences + Coder tab.
    [Sarang Gupta]: The TSP version is 1.8.1 & the PLECS version is 4.8.9 (64bit).

  4. Is C:/Software/C2000/Blinker the full path to the folder where your model is saved?
    [Sarang Gupta]: Correct

Thanks for the additional details Sarang. Can you also confirm if the TSPs are installed in a Microsoft OneDrive folder? This can lead to undefined/unreliable behavior. Unfortunately OneDrive folders are often the default install location in Windows.

Please reinstall the target support package in a local hard-drive folder and report back. To do so, you can first navigate back to the PLECS Preferences + Coder tab and change the target support packages path to a local folder on your C drive. Then you can go through the re-installation process by clicking the cloud icon.

Hello Brian,
I checked the TSPs are installed in the locally and not in the OneDrive folder.
I reinstalled the TSPs, but no improvement.

Hello Brian,
Anything else you want me to try?
How can we get this going. Thanks.

Regards,
Sarang Gupta

Sarang,

After our initial discussion you also reached out to support where my colleague Jimmy responded to you. Since there was no feedback there I assumed your issue was resolved. Did you try his recommendations?

Let’s take this discussion off the forum so we can talk more specifics about your setup.

Regards,
Bryan

EDIT: Sarang and I resolved his issue. It had to do with special characters in his TSP installation directory.