This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28P550SJ: Building and Running can_flash_programmer Using Visual Studio for TMS320F28P550SJ Board

Part Number: TMS320F28P550SJ
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi Team,

I am working on modifying the CAN Flash Programmer script in Visual Studio for the IXXAT CAN Analyzer. By default, the script is configured for the PCAN module.

Currently, I am using the example package located at:
C:\ti\C2000Ware_5_04_00_00\utilities\flash_programmers\can_flash_programmer\can_flash_programmer

I am facing the following issues;

  1. I am unable to compile the entire project.

  2. How can I compile and run the project in debug mode?

  3. If running in debug mode is not possible, what is the procedure to create an executable or application file?

  4. Are there any guidelines or datasheets available for this? If so, could you please share them?

    I hope to hear from you soon!


    With Regards,
    Nibesh 

  • Hi Nibesh,

    You should be able to compile and run the entire project within the Visual Studio IDE. After compiling in the IDE, a new EXE will be created in the Debug folder of the project. Are you seeing errors when compiling?

    Kind regards,

    Skyler

  • Hi Skyler,

    Firstly, the Debug Folder is not there. Will it come after compiling?
    I am using this command (g++ can_flash_programmer.cpp -o main) to compile the cpp file, Is this the correct command, Skyler?
    I also need your support to change the PCAN API to support the IXXAT CAN API.


    With Regards,
    Nibesh

  • Hi Nibesh,

    You should be able to compile through the Visual Studio IDE by clicking Build -> can_flash_programmer. The Debug folder will appear after a successful build. The output of the build process will tell you the exact filepath of the generated exe.

    Kind regards,

    Skyler

  • Hi Skyler,

    I’m currently using the Ctrl + Shift + B shortcut to compile the entire project.
    However, I’m unable to see any Debug folder after compilation.

    Could you please provide the appropriate command or guide me through the next steps?


    With Regards,
    Nibesh

  • Hi Nibesh,

    Are you using Visual Studio?

    Kind regards,

    Skyler

  • Hi Skyler,

    Yes, I am using Visual Studio.

    Actually, there was a mistake on my part—I'm using Visual Studio Code, not Microsoft Visual Studio.

    I've now downloaded Microsoft Visual Studio, and I'm able to compile the project. After compiling, I get the application file in the Debug folder.

    I'm using serial_flash_programmer.exe to upload the code with the following command:

    serial_flash_programmer.exe -d f28004x -k flashapi_ex2_sci_kernel.txt -a led_ex1_blinky.txt -b 9600 -p COM3

    However, it's unable to detect and upload the program.

    What could be the issue?


  • Hi Nibesh,

    Are you sure that is the correct COM port? Have you put the F28004x in the SCI boot mode? Are you connected to the proper GPIOs configured during the SCI boot mode?

    Kind regards,
    Skyler

  • Hi Skyler,

    The COM port is correct.
    I have not configured the GPIO for SCI Boot mode.
    Is it necessary?

    I am following the datasheet SPRUIU8A – March 2020 (Revised August 2021). According to this document, SCI bootloading does not require switching the GPIO pins. It seems to work without changing the boot mode.

    In SPRUIU8A, they are using the following command for the operation:

    serial_flash_programmer_appln.exe -d f28004x -k flashapi_ex2_sci_kernel.txt -a led_ex1_blinky.txt -b 9600 -p COM3

    However, after compiling the project using Microsoft Visual Studio, we are getting an executable named serial_flash_programmer.exe, not serial_flash_programmer_appln.exe.

    Could you please explain the difference between these two application files?

    I look forward to your response.

    Thanks and regards,
    Nibesh

  • Hi Nibesh,

    When configuring the SCI boot mode, the F28004x sets some GPIOs as SCITX and SCIRX as part of the SCI boot flow. You need to make sure that you are sending the data to the proper pins on the board such that they match the configured GPIOs. From table 4-29: SCI Boot Options in the TRM, you can see that the default SCI boot pins are FPIO29 and GPIO 28. I recommend taking a look at this application note to get familiar with these concepts. 

    However, after compiling the project using Microsoft Visual Studio, we are getting an executable named serial_flash_programmer.exe, not serial_flash_programmer_appln.exe.

    Could you please explain the difference between these two application files?

    The serial_flash_programmer_appIn.exe is simply the serial_flash_programmer project compiled with the #kernel macro commented out on line 242 of serial_flash_programmer.cpp. By commenting this macro out, the programmer will not send the kernel file over SCI and will assume that the kernel/bootloader is already loaded and running on the device. We rename the exe in the SDK to differentiate the two executables.

    Kind regards,

    Skyler

  • Hi Skyler,

    Thanks a lot for clearing my doubts perfectly.
    I hope to ask more if I get any doubts in near future.


    Thank and Regards
    Nibesh