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.

TMS320F2800157: CAN Flash Programmer run through Command line

Part Number: TMS320F2800157
Other Parts Discussed in Thread: C2000WARE, , LAUNCHXL-F2800157

I am trying CAN Flashing using PCAN-USB 

Following the procedure like below using the cmd line

i

When checking the code it should be initialized but don't know how to initialize it.

Any help is much appreciated. Thanks in Advance.

  • Hi Shankar,

    The can flash programmer expert is currently out of office, so please expect delays.

    However, it looks like from the readme, a few dependencies may be needed and so could be causing the issue shown:

    * can flash kernal project needs to be within C2000Ware (you may need to separately install C2000Ware latest version).

    * the device drivers for PEAK PCAN-USB Pro FD need to be installed too

    * the correct command must be run as mentioned in the readme file, provided below

    * the other step of creating the hex files also must be followed from the readme

      

    Here's the readme txt file from the folder you showed above:

    CAN Flash Programmer for F28003x, F28P65x 
    
    The CAN flash programmer can be used to perform firmware updates via MCAN on the F28003x and F28P65x devices. 
    
    The can_flash_programmer needs to be used with the can flash kernel project available in C2000Ware 
    	- for F28003x device at {C2000Ware_root}/driverlib/f28003x/examples/flash. 
    	- for F28P65x device at {C2000Ware_root}/driverlib/f28p65x/examples/c28x_dual/flash_kernel.
    
    The CAN flash programmer is compatible with the PEAK PCAN-USB Pro FD. The device drivers for this
    device need to be installed first before the can_flash_programmer can be run on the PEAK device. 
    
    Usage of the CAN flash programmer is as follows: 
    
    can_flash_programmer.exe -d f28003x -k <kernel hex file name> -a <firmware hex file name> 
    
    The kernel hex file and firmware hex file can be generated via the hex2000 utility. This file format 
    can even be generated as part of the Code Composer Studio build process by adding a post-build step
    with the following options: 
    
    "${CG_TOOL_HEX}" "${BuildArtifactFileName}" -boot -sci8 -a -o "${BuildArtifactFileBaseName}.txt"
    
    The device needs to be set to MCAN Boot before running this command. The CAN flash programmer 
    will send the kernel file to the device, pause for a few seconds, and then send over the 
    application file. The can_flash_programmer can be closed once the application transfer has finished. 

    Regards,

    Vince

  • Shankar,

        Because of the holiday season, most of the employees are on vacation. Charles will respond to you as soon as he is back in the office. Thank you for your patience.

  • Hi Shankar,

    The device you have listed is the TMS320F2800157. As has been stated, the README states that the F28003x and F28P65x devices can use the CAN Flash programmer by default. It can be modified per compatible device through editing the .sln file.

    Thanks and regards,

    Charles

  • Hi ,

    Thanks for your reply.

    Could you please elaborate on which parameters need to change on the .sln file for F2800157?

  • Hi Shankar,

    Within the can_flash_programmer.cpp file, the following parameters need change/addition: Device name (bool g_bf280015x = false;), bitrate string, sleep_timesetDeviceName

    Thanks,

    Charles

  • Hi ,

    Thanks for your reply.

    Tried the same suggestion mentioned in the previous comment But still facing issues with .exe generation.

    Some definitions are missing it is showing but those definitions are there inside the include/source.

    Need your support to proceed with this further

    Thanks

    Shankar

  • Hi Shankar,

    The .exe is generated through recompiling the project solution (.sln) using Visual Studio for Windows. 

    Thanks,

    Charles

  • Hello Charle,

    We are working with the CAN flashing for the F2800157 controller. I had modified the can_flash_programmer.cpp file as per the F2800157 and generated the can_flash_programmer.exe file. (can_flash_programmer.exe -d f280015x -k <kernel hex file name> -a <firmware hex file name>)  

    But there is no CAN Flash Kernel for the 15x controller. 

    Can we use the flash_kernel_ex4_can_flash_kernel of F28003x for the F280015x devices?

    Any help is much appreciated.

    Thanks,

    Premkumar.T

  • Hi Premkumar T.,

    The F28003x CAN Flash kernel cannot be used on the F280015x and will have to be modified. Some things to consider are it requiring the F280015x linker cmd file and the Flash API for this device. You can look at the F280015x SCI Flash Kernel for a similar example.

    Thanks,

    Charles

  • Hello Charles,

    Thank you for your response.

    I am able to find the flash API file on the F280015x SCI Flash Kernel, but where do I get the F280015x linker cmd file?


    Could you suggest what file I have to load here in place of <kernel hex file name> on this command in the can_flash_programmer cmd line?

    can_flash_programmer.exe -d f28003x -k <kernel hex file name> -a <firmware hex file name>

     

    Thanks,

    Premkumar.T

  • Hi Premkumar,

    The F280015x flash kernel linker cmd file can be found at C2000Ware_Location/device_support/f280015x/common/cmd/280015x_flash_kernel_ram_link. 

    The <kernel hex file name> should be the hex file generated after implementing a CAN flash kernel for the F280015x device. This application note (https://www.ti.com/lit/sprad51) discusses the implementation and usage of the CAN flash kernels for F28003x and F28P65x. Although these kernels do not support the F280015x device by default, understanding the general flow and main ideas from this application note will be helpful for adapting them to the F280015x device.

    Kind regards,

    Skyler

  • Hello Skyler,

    Thank you for your response.

    I created the CAN Flash Kernel for F280015x device using SCI flash kernel. But I am not able to build the file.

    I am getting the following error.


    #10010 errors encountered during linking; "flash_kernel_ex_can_flash_kernel.out" not 
    built.

    Please find the attachment.

    Thanks & Regards,

    Premkumar.T

  • Hi Premkumar,

    Based on your screenshots, it looks like MCAN_Boot is undefined. Have you defined MCAN_Boot? If so, are all the proper header files included in the flash_kernel_ex_can_flash_kernel file? 

    Kind regards,

    Skyler

  • Hello Skyler,

    Thank you for your response.

    I added the flash_kernel_ex_can_flash_kernel file. I am getting the same error.

    Thanks,
    Premkumar.T

  • Hi Premkumar,

    Is MCAN_Boot() defined? In the example project, it is defined in MCAN_Boot.c. I am unfamiliar with your project structure, but it looks like you need to define the symbols the compiler is indicating are unresolved.

    Kind regards,

    Skyler

  • Hi Skyler,

    On the extern void CopyApplication(MCAN_RxBufElement rxMsg);

    Kindly find the attachment of the project structure and error log.

    **** Clean-only build of configuration CPU1_RAM for project flash_kernel_ex_can_flash_kernel ****
    
    "C:\\ti\\ccs1230\\ccs\\utils\\bin\\gmake" -k -j 8 clean -O 
     
    DEL /F  "flash_kernel_ex_can_flash_kernel.txt"  "flash_kernel_ex_can_flash_kernel.out" 
    DEL /F "MCAN_Boot.obj" "dcsm.obj" "flash_kernel_ex3_boot.obj" "flash_kernel_ex3_codestartbranch.obj" "flash_kernel_ex3_erase.obj" "flash_kernel_ex3_verify.obj" "flash_kernel_ex_can_flash_kernel.obj" "device\device.obj" 
    DEL /F "MCAN_Boot.d" "dcsm.d" "flash_kernel_ex3_boot.d" "flash_kernel_ex3_erase.d" "flash_kernel_ex3_verify.d" "flash_kernel_ex_can_flash_kernel.d" "device\device.d" 
    DEL /F "flash_kernel_ex3_codestartbranch.d" 
    Could Not Find D:\Project\TI\Flash_kernel\flash_kernel_ex3_sci_flash_kernel\CPU1_RAM\flash_kernel_ex_can_flash_kernel.txt
    Could Not Find D:\Project\TI\Flash_kernel\flash_kernel_ex3_sci_flash_kernel\CPU1_RAM\flash_kernel_ex3_codestartbranch.d
    Finished clean
     
    
    **** Build Finished ****
    
    **** Build of configuration CPU1_RAM for project flash_kernel_ex_can_flash_kernel ****
    
    "C:\\ti\\ccs1230\\ccs\\utils\\bin\\gmake" -k -j 8 all -O 
     
    Building file: "../flash_kernel_ex3_codestartbranch.asm"
    Invoking: C2000 Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel" --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel/device" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/boot_rom/f280015x/rev0/rom_sources/F280015x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f280015x/include/FlashAPI" --include_path="C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="flash_kernel_ex3_codestartbranch.d_raw"  "../flash_kernel_ex3_codestartbranch.asm"
    Finished building: "../flash_kernel_ex3_codestartbranch.asm"
     
    Building file: "../dcsm.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel" --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel/device" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/boot_rom/f280015x/rev0/rom_sources/F280015x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f280015x/include/FlashAPI" --include_path="C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="dcsm.d_raw"  "../dcsm.c"
    Finished building: "../dcsm.c"
     
    Building file: "../MCAN_Boot.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel" --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel/device" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/boot_rom/f280015x/rev0/rom_sources/F280015x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f280015x/include/FlashAPI" --include_path="C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="MCAN_Boot.d_raw"  "../MCAN_Boot.c"
    Finished building: "../MCAN_Boot.c"
     
    Building file: "../flash_kernel_ex3_erase.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel" --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel/device" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/boot_rom/f280015x/rev0/rom_sources/F280015x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f280015x/include/FlashAPI" --include_path="C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="flash_kernel_ex3_erase.d_raw"  "../flash_kernel_ex3_erase.c"
    Finished building: "../flash_kernel_ex3_erase.c"
     
    Building file: "../flash_kernel_ex3_verify.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel" --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel/device" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/boot_rom/f280015x/rev0/rom_sources/F280015x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f280015x/include/FlashAPI" --include_path="C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="flash_kernel_ex3_verify.d_raw"  "../flash_kernel_ex3_verify.c"
    Finished building: "../flash_kernel_ex3_verify.c"
     
    Building file: "../flash_kernel_ex_can_flash_kernel.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel" --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel/device" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/boot_rom/f280015x/rev0/rom_sources/F280015x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f280015x/include/FlashAPI" --include_path="C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="flash_kernel_ex_can_flash_kernel.d_raw"  "../flash_kernel_ex_can_flash_kernel.c"
    Finished building: "../flash_kernel_ex_can_flash_kernel.c"
     
    Building file: "../device/device.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel" --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel/device" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/boot_rom/f280015x/rev0/rom_sources/F280015x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f280015x/include/FlashAPI" --include_path="C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="device/device.d_raw" --obj_directory="device"  "../device/device.c"
    Finished building: "../device/device.c"
     
    Building file: "../flash_kernel_ex3_boot.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel" --include_path="D:/Project/TI/Flash_kernel/flash_kernel_ex3_sci_flash_kernel/device" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/boot_rom/f280015x/rev0/rom_sources/F280015x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f280015x/include/FlashAPI" --include_path="C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="flash_kernel_ex3_boot.d_raw"  "../flash_kernel_ex3_boot.c"
    Finished building: "../flash_kernel_ex3_boot.c"
     
    Building target: "flash_kernel_ex_can_flash_kernel.out"
    Invoking: C2000 Linker
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi -z -m"flash_kernel_ex_can_flash_kernel.map" --heap_size=0x100 --stack_size=0x200 --warn_sections -i"C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/lib" -i"C:/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f280015x/lib" -i"C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="flash_kernel_ex_can_flash_kernel_linkInfo.xml" --entry_point=code_start --rom_model -o "flash_kernel_ex_can_flash_kernel.out" "./MCAN_Boot.obj" "./dcsm.obj" "./flash_kernel_ex3_boot.obj" "./flash_kernel_ex3_codestartbranch.obj" "./flash_kernel_ex3_erase.obj" "./flash_kernel_ex3_verify.obj" "./flash_kernel_ex_can_flash_kernel.obj" "./device/device.obj" "../280015x_flash_kernel_ram_lnk.cmd" "../FAPI_F280015x_EABI_v2.00.01.lib" "C:/ti/c2000/C2000Ware_5_00_00_00/driverlib/f280015x/driverlib/ccs/Debug/driverlib.lib"  -llibc.a 
    <Linking>
     
     undefined       first referenced
      symbol             in file     
     ---------       ----------------
     CopyApplication ./MCAN_Boot.obj 
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "flash_kernel_ex_can_flash_kernel.out" not built
     
    >> Compilation failure
    makefile:152: recipe for target 'flash_kernel_ex_can_flash_kernel.out' failed
    gmake[1]: *** [flash_kernel_ex_can_flash_kernel.out] Error 1
    gmake[1]: Target 'secondary-outputs' not remade because of errors.
    makefile:148: recipe for target 'all' failed
    gmake: *** [all] Error 2
    
    **** Build Finished ****

    Thanks,

    Premkumar.T

  • Hi Premkumar,

    Thank you for the screenshots! It looks like the MCAN_Boot file is looking for the CopyApplication() function, but in the F28003x MCAN flash kernel example, the functional equivalent of CopyApplication() is CopyData(). If you copied over the F28003x MCAN flash kernel example files, that is likely why there is a mismatch between these function names. 

    Kind regards,

    Skyler

  • Hello Skyler,

    Thank you for your response. I'll check and update you.

    Kind regards,

    Premkumar.T

  • Hi Premkumar,

    Sounds good!

    -Skyler

  • Hello Skyler,

    I added CopyApplication() and related macros. still i am facing follow errors.

    Thank,

    Premkumar.T

  • Hi Premkumar,

    Is this argument being passed to the Fapi_initializeAPI() function? If so, you should be passing the FlashTech_CPU0_BASE_ADDRESS macro defined in the flash_programming_f280015x.h file.

    Kind regards,

    Skyler

  • Hello Skyler,

    I added Base address for F021_Cpu0 and defining all the parameters. I am facing a following new error.

    Thanks and Regards,

    Premkumar.T

  • Hi Premkumar,

    Can you send some information about your project structure and context where you see these errors? It seems like multiple files in your project define "Fapi_FlashStatusType". Also, it seems like there are some syntax errors that could be a result of code blocks being copied/pasted from existing examples. Here is a link that gives advice for common build errors: https://software-dl.ti.com/ccs/esd/documents/sdto_ccs_build-errors.html

    Kind regards,

    Skyler

  • Hi @skyler Baumer,

    We are successfully able to build the code for F2800157 but still have some doubts about the build.

    1)After connecting PCAN-USB it complied successfully but looks like no code is flashed.

     Don't know if this is flashed or not.

    The updated code is attached here for your review. if anything is needed please let me know.flash_kernel_ex_can_F2800157.zip

  • Hi Shankar,

    I believe your last post might have been removed due to the message containing a .zip file. Can you try reposting it without the attachment? Please send the attachment to me via the messaging feature on E2E.

    Kind regards,

    Skyler

  • Hello Skyler,

    Thanks lot for your support. Now we resolved the build error, we can able to without error.

    While flashing via CAN can_flash_progragrammer.exe is not recognised error I am getting.

    Please find the attachment of following error.

    Thank & Regards,

    Premkumar.T

  • Hi Premkumar,

    The executable is located one level back if your project mirrors the C2000Ware setup for Utility->Flash Programmers.

    ex. \can_flash_programmer->can_flash_programmer.exe 

    Can you change the directory path?

    Thanks and regards,

    Skyler

  • Hi Shankar,

    I will take a look over the next few days.

    Thanks,

    Skyler

  • Hi Skyler,

    Thank you for support. After changing the path i am getting Unable to open kernel file flash_kernel_ex_can_F2800157.out. Does it exist?

    Pleas find the attachment.

     

    Thanks & Regards,

    Premkumar.T

  • Hi  Skyler,

    After changing path and adding files .hex and .out, it is not showing any error but that kernel file is not loading.

    Please find the attachment.

  • Hi Premkumar,

    For some instructions on how to use the can_flash_programmer, please refer to this document: www.ti.com/lit/sprad51 
    The kernel file should be supplied in the hex format, not as a text file. The document above shows how it should be generated using the C2000 Hex Utility.

    If you update the kernel file format and continue to see that nothing is being flashed to the device, I encourage you to step through the flow of your flash kernel and discern where it is straying from the expected behavior. This will help us provide better support by giving us more detailed information as to where your code is failing.

    Kind regards,

    Skyler

  • Hi @skyler Baumer,

    Thanks for your Reply.

    We checked and enabled the hex utility for Kernel build files

    But still, Ccs studio generated .out files only and not generated hex files.

    Even tried the same for the existing working project F28003x also the same issues CCS generated. Out files but not hex files.

    This issue we faced only for Kernel project files, not for other project files.

    Meanwhile, Shared updated the Kernal build project to a private message could you please review it and let us know?

    Thanks for your extended support

  • Hi Shankar,

    You are correct, I was mistaken. The files should be passed in as .txt files, so the application file should be passed as .txt as well. I sincerely apologize for the confusion around this topic. To enable the generation of the .txt files, please add this line to the Post-Build steps of the both the kernel and application project:  "${CG_TOOL_HEX}" "${BuildArtifactFileName}" -boot -sci8 -a -o "${BuildArtifactFileBaseName}.txt" (see Section 3 of the www.ti.com/lit/sprad51). 

    I received the project via message and will review it in the next few days. In the meantime, I believe stepping through the code on your side will help you diagnose the issues you are seeing. 

    Kind regards,

    Skyler

  • Hi Skyler,

    I am trying to flash the application file with the command [can_flash_programmer.exe -d f280015x -k flash_kernel_ex4_can_flash_kernel.txt -a launchxl_ex1_f2800157_demo.txt]. It seems to be that, application is loading, but it is not flashed in the controller. 

    please find the attachment,

    Thanks & Regards,

    Premkumar.T

  • Hi Premkumar,

    Can you or Shankar also send me a copy of the modified can_flash_programmer that you are using? 

    When the CAN communication is taking place, is the PEAK-USB device blinking green?

    Kind regards,

    Skyler

  • Hi @Skyler Baumer,

    Yesterday, I shared the code with you right through personal chat same only checked it here.

    Meanwhile, Not seen a message like "Kernal Loaded" and "Application load completed"

  • Hi Shankar,

    I am asking for a copy of the modified host programmer. I received your flash kernel project through personal chat.

    Kind regards,

    Skyler

  • Hi @skyler Baumer,

    Shared updated can_flash_programmer.exe through personal chat

  • Hi Shankar,

    Thank you. Based on my testing from today it seems like there is a timing mismatch between the flash kernel and the host programmer. I see that the kernel is being programmed to RAM properly, but the LED on the PEAK USB device indicates a timing issue when sending the CAN frames containing the application to be programmed to Flash. Is this the behavior you see when you run the programmer as well? 

    I will continue to look into this over the next few days, but please let me know if you are able to resolve the timing issue on your own.

    Thanks,

    Skyler

  • Hi Skyler,

    When the CAN communication is taking place, is the PEAK-USB device blinking red. There is no indication for kernel file loaded and application file loaded, also  while printing it is taking a pause for some time and again it starts printing. In the document I have found to set the data bitrate for 2Mbps. After checking for the timing issue also, while transmitting the PCAN USB device is indicating red. 

    Thanks,

    Premkumar . T

     

  • Hi Premkumar,

    To see more information during the execution of the host programmer, add the -v option to your arguments. Example: can_flash_programmer.exe –d -k -a -v

    This should allow you to discern between the kernel load and application load. The pause in the host programmer execution takes place after the kernel is sent to the F280015x and it is allowing time for the device to boot before sending the application. The PCAN USB device should not be blinking red during the kernel load. If it is, there is likely an error in the GPIO configuration. What configuration are you using? Are you using the Launchpad (LAUNCHXL-f2800157)? Are you using emulation boot mode for this?

    Kind regards,

    Skyler 

  • Hi Skyler,

    We are using the GPIO configuration as 4 and 5. we are using  Launchpad (LAUNCHXL-f2800157). yes, emulation boot mode is used. After checking this, while kernel file is loading, in PCAN USB it is indicating red. Can you check this,

    please find the attachment,

                                                                 

  • Hi Premkumar,

    Thank you for the information! Are you setting the EMU_BOOTPIN_CONFIG and EMU_BOOTDEF registers in the Memory Browser? For MCAN, you should enter 0xFFFF at 0xD00, 0x5AFF at 0xD01, and the corresponding definition in cpu1brom_boot_modes.h that uses GPIO 4 and 5 at 0xD04. Based on your screenshots, it looks like you have changed the the default GPIOs corresponding to the different Boot Modes. Therefore, you should enter whichever value corresponds to MCAN_BOOT_SENDTEST at address 0xD04 in the Memory Browser. If using the Boot Modes and cpu1brom_boot_modes.h file from the bootROM code in C2000Ware, you would enter 0x88 at 0xD04 to use the MCAN_BOOT_ALT1_SENDTEST Boot Mode that is mapped to GPIO 4 and GPIO5. After setting these values in the Memory Browser, reset the device via the XRSn and start the host programmer. 

    Kind regards,

    Skyler

  • Hi Skyler,

    Thanks for the support,

    For MCAN, I have entered 0xFFFF at 0xD00, 0x5AFF at 0xD01, and 0x88 0xD04 in the memory browser, After setting values in memory browser i have done reset via XRSn and clicked on resume, then I have entered command [can_flash_programmer.exe -d f280015x -k flash_kernel_ex4_can_flash_kernel.txt -a launchxl_ex1_f2800157_demo.txt -v] and I have checked the values are not getting updated in memory browser, also its indicating red while file is being loaded.

    Thanks,

    Premkumar . T

  • Hi Premkumar,

    Is 0x88 corresponding to the Boot Mode defined in your project to use GPIO 4 and 5 as CANTX and CANRX? The screenshot you sent suggests that the definitions are slightly different than what is in C2000Ware, so please verify that you are configuring the proper GPIOs. If you are using the LaunchPad and GPIO 4 and 5 make sure to set the CAN Routing and Boot Mode Select switches properly. This document will help you locate the switches: https://www.ti.com/lit/spruj54
    The CAN routing switch should be set to ON (down) and the Boot Mode Select switch (GPIO 24 and 32) should be set to 1 and 0, respectively. More information about the Boot Mode Select switch can be seen in https://www.ti.com/lit/spruiy4a, section 5.3.

    Thanks,

    Skyler

  • Hi Skyler,

    Yes, 0X88 corresponds to use GPIO 4 and 5 as CANTX and CANRX. For launchpad(F2800157) CAN routing switch is set to ON (down) and the Boot Mode Select switch (GPIO 24 and 32) is set to 1 and 0.


    Thanks,

    Premkumar. T

  • Hi Premkumar,

    I am unable to recreate this error on my end, can you double check all your pins and soldered connections? Following the exact steps listed above, the flash kernel is successfully loaded to RAM of the device and the LED on the PEAK USB is blinking green.

    Kind regards,

    Skyler

  • Hi Skyler,

    Yes, I have checked GND, CAN-H, CAN-L of launchpad(F2800157) is connected to PCAN of 3rd pin to gnd, 2nd pin to CAN-L  and 7th pin to CAN-H.

    Thanks,

    Premkumar. T

  • Hi Premkumar,

    Can you send a picture that clearly shows the pins of the PCAN USB Device and where they are soldered to on the F2800157? Since I am able to load the kernel into RAM using the CCS project and host programmer sent to me by Shankar and exact steps detailed above, I believe this is a hardware/setup issue. 

    It is also possible that other processes on the computer you are running the host programmer on could be interfering with the communication. 

    Kind regards,

    Skyler

  • Hai Skyler,

    Here, I have added the images for hardware connection of PCAN device to launchpad(F2800157).

    Thanks,

    Premkumar. T