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.

LAUNCHXL-F280025C: Bootloader

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

Is there an example of how to implement a bootloader for the F280025 device and how to update the FLASH memory with a new application code and/or data?

Regards,

Wilson

  • Wilson,

    Please take a look at below:

    https://www.ti.com/lit/pdf/spruiu9 

    https://www.ti.com/lit/sprabv4 

    Thanks and regards,
    Vamsi

  • Vamsi,

    The SPRUIU9 application note is intended for MCU whit at least two flash memory banks, so it does not work for us since we are using the F280025C MCU.

    The SPRABV4 application note is intended to upload the application in the RAM memory which does not work for us because at this point the 24KB of RAM is not enough to hast our whole application.

    The SPRUIU9  does mention that it is feasible to use Live Firmware Update in In devices with single Flash banks but does not give any detail of how to do it.  Do you have an example of how to use Live Firmware Update in devices with only one flash bank?

    Regards,

    Wilson

  • Wilson,

    Yes, FU/LFU is possible with single bank as well.  Flash API will be copied to RAM to do the flash operations on the single bank.  If you want to do LFU, any critical code that should run during the FW update should be moved to RAM for execution during the FW update.  

    Our LFU expert recently helped a few customers on similar request.  I will assign this to him to help you further.  He can send you an example.

    Thanks and regards,
    Vamsi

  • Thanks Vamsi.

    Wilson, we have a SCI bootloader ("SCI Flash kernel") for F28002x. It is not yet released in C2000Ware. We have a MySecure Software release for it. I can send you the request link if you let me know a work email address to send it to. You can add me as a friend in e2e and send me a private message with your email info.

    Thanks,

    Sira

  • Sira,

    I am getting some errors when I try to compile the f28002x_sci_flash_kernel project.

    The following is the build log:

    **** Build of configuration BANK0_LDFU for project f28002x_sci_flash_kernel ****
    
    "C:\\ti\\ccs1031\\ccs\\utils\\bin\\gmake" -k -j 8 all -O 
     
    Building file: "../SCI_Boot_f28002x.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="C:/Users/WilsonMartinez/Documents/C2000-F28002X-SINGLEBANK-LFU/f28002x_sci_flash_kernel" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/source" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/examples/flash" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/boot_rom/f28002x/rev0/rom_sources/F28002x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/flash_api/f28002x/include/FlashAPI" --include_path="C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" --define=checksum_enable --define=_DUAL_HEADERS --define=_FLASH --define=LIVE_UPDATE --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="SCI_Boot_f28002x.d_raw"  "../SCI_Boot_f28002x.c"
    Finished building: "../SCI_Boot_f28002x.c"
     
    Building file: "../f28002x_sci_flash_kernel.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="C:/Users/WilsonMartinez/Documents/C2000-F28002X-SINGLEBANK-LFU/f28002x_sci_flash_kernel" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/source" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/examples/flash" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/boot_rom/f28002x/rev0/rom_sources/F28002x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/flash_api/f28002x/include/FlashAPI" --include_path="C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" --define=checksum_enable --define=_DUAL_HEADERS --define=_FLASH --define=LIVE_UPDATE --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_sci_flash_kernel.d_raw"  "../f28002x_sci_flash_kernel.c"
    Finished building: "../f28002x_sci_flash_kernel.c"
     
    Building file: "../SCI_GetFunction_f28002x.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="C:/Users/WilsonMartinez/Documents/C2000-F28002X-SINGLEBANK-LFU/f28002x_sci_flash_kernel" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/source" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/examples/flash" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/boot_rom/f28002x/rev0/rom_sources/F28002x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/flash_api/f28002x/include/FlashAPI" --include_path="C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" --define=checksum_enable --define=_DUAL_HEADERS --define=_FLASH --define=LIVE_UPDATE --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="SCI_GetFunction_f28002x.d_raw"  "../SCI_GetFunction_f28002x.c"
    Finished building: "../SCI_GetFunction_f28002x.c"
     
    Building file: "../f28002x_lfu_singlebank.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="C:/Users/WilsonMartinez/Documents/C2000-F28002X-SINGLEBANK-LFU/f28002x_sci_flash_kernel" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/source" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/examples/flash" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/boot_rom/f28002x/rev0/rom_sources/F28002x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/flash_api/f28002x/include/FlashAPI" --include_path="C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" --define=checksum_enable --define=_DUAL_HEADERS --define=_FLASH --define=LIVE_UPDATE --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_lfu_singlebank.d_raw"  "../f28002x_lfu_singlebank.c"
    Finished building: "../f28002x_lfu_singlebank.c"
     
    Building file: "../f28002x_sysctrl.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --include_path="C:/Users/WilsonMartinez/Documents/C2000-F28002X-SINGLEBANK-LFU/f28002x_sci_flash_kernel" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/source" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/driverlib/inc" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/driverlib/f28002x/examples/flash" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/boot_rom/f28002x/rev0/rom_sources/F28002x_ROM/bootROM/include" --include_path="C:/ti/c2000/C2000Ware_3_04_00_00/libraries/flash_api/f28002x/include/FlashAPI" --include_path="C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" --define=checksum_enable --define=_DUAL_HEADERS --define=_FLASH --define=LIVE_UPDATE --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_sysctrl.d_raw"  "../f28002x_sysctrl.c"
    "../f28002x_sysctrl.c", line 792 (col. 33): advice #2615-D: (Performance) Use --fp_mode=relaxed to enable TMU hardware support for FP division.
    Finished building: "../f28002x_sysctrl.c"
     
    Building target: "f28002x_sci_flash_kernel.out"
    Invoking: C2000 Linker
    "C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --define=checksum_enable --define=_DUAL_HEADERS --define=_FLASH --define=LIVE_UPDATE --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"f28002x_sci_flash_kernel.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/lib" -i"C:/ti/c2000/C2000Ware_3_03_00_00/libraries/flash_api/f28002x/lib" -i"C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="f28002x_sci_flash_kernel_linkInfo.xml" --entry_point=bankSelect --rom_model -o "f28002x_sci_flash_kernel.out" "./SCI_Boot_f28002x.obj" "./SCI_GetFunction_f28002x.obj" "./f28002x_lfu_singlebank.obj" "./f28002x_sci_flash_kernel.obj" "./f28002x_sysctrl.obj" "../28002x_lfu_flash_kernel_lnk.cmd"  -llibc.a 
    <Linking>
    "../28002x_lfu_flash_kernel_lnk.cmd", line 83: error #10008-D: cannot find file "FlashAPI_F28002x_FPU32.lib"
    "../28002x_lfu_flash_kernel_lnk.cmd", line 82: warning #10068-D: no matching section
     
     undefined                         first referenced              
      symbol                               in file                   
     ---------                         ----------------              
     Device_init                       ./f28002x_lfu_singlebank.obj  
     Fapi_checkFsmForReady             ./f28002x_lfu_singlebank.obj  
     Fapi_doBlankCheck                 ./f28002x_lfu_singlebank.obj  
     Fapi_doVerify                     ./f28002x_lfu_singlebank.obj  
     Fapi_getFsmStatus                 ./f28002x_lfu_singlebank.obj  
     Fapi_initializeAPI                ./f28002x_sci_flash_kernel.obj
     Fapi_issueAsyncCommandWithAddress ./f28002x_lfu_singlebank.obj  
     Fapi_issueProgrammingCommand      ./f28002x_lfu_singlebank.obj  
     Fapi_setActiveFlashBank           ./f28002x_sci_flash_kernel.obj
     GPIO_setPadConfig                 ./SCI_GetFunction_f28002x.obj 
     GPIO_setPinConfig                 ./SCI_GetFunction_f28002x.obj 
     GPIO_setQualificationMode         ./SCI_GetFunction_f28002x.obj 
     Interrupt_initModule              ./f28002x_lfu_singlebank.obj  
     Interrupt_initVectorTable         ./f28002x_lfu_singlebank.obj  
     SCI_setConfig                     ./SCI_GetFunction_f28002x.obj 
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "f28002x_sci_flash_kernel.out" not built
     
    >> Compilation failure
    makefile:145: recipe for target 'f28002x_sci_flash_kernel.out' failed
    gmake[1]: *** [f28002x_sci_flash_kernel.out] Error 1
    gmake[1]: Target 'secondary-outputs' not remade because of errors.
    makefile:141: recipe for target 'all' failed
    gmake: *** [all] Error 2
    
    **** Build Finished ****

    Here is more specific

    The following is the build configuration:

    The f28002x_lfu_singlebank project is compiling without any problem.

    Do you know what is causing these errors?

    Regards,

    Wilson

  • Wilson,

    The f28002x_sci_flash_kernel.projectspec has a hardcoded path for C2000Ware:

    <pathVariable name="C2000WARE_PATH" path="C:/ti/c2000/C2000Ware_3_03_00_00" scope="project" />

    Please change this to the path that's valid for your system. This will fix the build errors.

    Thanks,

    Sira

  • Sira,

    I did what you said but I still have some errors:

    **** Build of configuration BANK0_LDFU for project f28002x_sci_flash_kernel ****
    
    "C:\\ti\\ccs1031\\ccs\\utils\\bin\\gmake" -k -j 8 all -O 
     
    Building target: "f28002x_sci_flash_kernel.out"
    Invoking: C2000 Linker
    "C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --define=checksum_enable --define=_DUAL_HEADERS --define=_FLASH --define=LIVE_UPDATE --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"f28002x_sci_flash_kernel.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/lib" -i"C:/ti/c2000/C2000Ware_3_03_00_00/libraries/flash_api/f28002x/lib" -i"C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="f28002x_sci_flash_kernel_linkInfo.xml" --entry_point=bankSelect --rom_model -o "f28002x_sci_flash_kernel.out" "./SCI_Boot_f28002x.obj" "./SCI_GetFunction_f28002x.obj" "./f28002x_lfu_singlebank.obj" "./f28002x_sci_flash_kernel.obj" "./f28002x_sysctrl.obj" "../28002x_lfu_flash_kernel_lnk.cmd" "C:/ti/c2000/C2000Ware_3_04_00_00/libraries/flash_api/f28002x/lib/FlashAPI_F28002x_FPU32.lib"  -llibc.a 
    <Linking>
    "../28002x_lfu_flash_kernel_lnk.cmd", line 83: error #10008-D: cannot find file "FlashAPI_F28002x_FPU32.lib"
     
     undefined                 first referenced             
      symbol                       in file                  
     ---------                 ----------------             
     Device_init               ./f28002x_lfu_singlebank.obj 
     GPIO_setPadConfig         ./SCI_GetFunction_f28002x.obj
     GPIO_setPinConfig         ./SCI_GetFunction_f28002x.obj
     GPIO_setQualificationMode ./SCI_GetFunction_f28002x.obj
     Interrupt_initModule      ./f28002x_lfu_singlebank.obj 
     Interrupt_initVectorTable ./f28002x_lfu_singlebank.obj 
     SCI_setConfig             ./SCI_GetFunction_f28002x.obj
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "f28002x_sci_flash_kernel.out" not built
     
    >> Compilation failure
    makefile:146: recipe for target 'f28002x_sci_flash_kernel.out' failed
    gmake[1]: *** [f28002x_sci_flash_kernel.out] Error 1
    gmake[1]: Target 'secondary-outputs' not remade because of errors.
    makefile:142: recipe for target 'all' failed
    gmake: *** [all] Error 2
    
    **** Build Finished ****
    

    What else do you think I am missing?

    Thanks,

    Wilson

  • Wilson,

    This project and build configuration builds fine on my system. It is still complaining about not being able to find FlashAPI_F28002x_FPU32.lib in your build. Can you check your C2000Ware installation and see if this file is present where it is expected?

    Which version of C2000Ware are you using?

    Thanks,

    Sira

  • Sira,

    As you can see in one of the screenshots I am including the FlashAPI_F28002x_FPU32.lib directly in the project.

    The C2000Ware version on my laptop is C2000Ware_3_04_00_00.

    Thanks,

    Wilson

  • Wilson,

    I will look into this in more detail tomorrow but in the meantime can you try using a c2000ware v3.03 installation and see if the same issue occurs.

    The flash API lib is present in c2000ware so you should not have to explicitly copy it. There must be some difference here that is not yet apparent. When you import the project in CCS using the projectspec, it is getting copied into a workspace, correct? 

  • Sira,

    Yes, the project is getting copied into a workspace.

    The following is the projectspec file:

    <projectSpec>
      <project
        name="f28002x_sci_flash_kernel"
        device = "TMS320F280025C"
        cgtVersion= "20.2.1.LTS"
        enableHexTool="True"
        linkerCommandFile=""
        postBuildStep=""${CG_TOOL_HEX}" "${BuildArtifactFileName}" -boot -sci8 -a -o "${BuildArtifactFileBaseName}.txt""
        >
    	<pathVariable name="C2000WARE_PATH" path="C:\ti\c2000\C2000Ware_3_04_00_00" scope="project" />
        <configuration name="CPU_RAM" compilerBuildOptions="
            --opt_level=off 
            -I${C2000WARE_PATH}/device_support/f28002x/common/include
            -I${C2000WARE_PATH}/device_support/f28002x/common/source
            -I${C2000WARE_PATH}/device_support/f28002x/headers/include
            -I${C2000WARE_PATH}/driverlib/f28002x/driverlib
            -I${C2000WARE_PATH}/driverlib/f28002x/driverlib/inc
            -I${C2000WARE_PATH}/driverlib/f28002x/examples/flash
            -I${C2000WARE_PATH}/libraries/boot_rom/f28002x/rev0/rom_sources/F28002x_ROM/bootROM/include
            -I${C2000WARE_PATH}/libraries/flash_api/f28002x/include/FlashAPI
            -v28 
            -ml 
            -mt 
            --define=checksum_enable
            --define=_DUAL_HEADERS
            --cla_support=cla2 
            --float_support=fpu32 
            --tmu_support=tmu0 
            --vcu_support=vcu0 
            --define=CPU1  
            --diag_warning=225  
            --diag_suppress=10063 
            --display_error_number" 
          linkerBuildOptions="--entry_point code_start --stack_size=0x100" 
          hexBuildOptions="--boot --sci8 --ascii --outfile=${BuildArtifactFileBaseName}.txt" />
    	<configuration name="BANK0_LDFU" compilerBuildOptions="
            --opt_level=off 
            -I${C2000WARE_PATH}/device_support/f28002x/common/include
            -I${C2000WARE_PATH}/device_support/f28002x/common/source
            -I${C2000WARE_PATH}/device_support/f28002x/headers/include
            -I${C2000WARE_PATH}/driverlib/f28002x/driverlib
            -I${C2000WARE_PATH}/driverlib/f28002x/driverlib/inc
            -I${C2000WARE_PATH}/driverlib/f28002x/examples/flash
            -I${C2000WARE_PATH}/libraries/boot_rom/f28002x/rev0/rom_sources/F28002x_ROM/bootROM/include
            -I${C2000WARE_PATH}/libraries/flash_api/f28002x/include/FlashAPI
            -v28 
            -ml 
            -mt 
            --define=checksum_enable
            --define=_DUAL_HEADERS
    		--define=_FLASH 
    		--define=LIVE_UPDATE
            --cla_support=cla2 
            --float_support=fpu32 
            --tmu_support=tmu0 
            --vcu_support=vcu0 
            --define=CPU1  
            --diag_warning=225  
            --diag_suppress=10063 
            --display_error_number" 
          linkerBuildOptions="-I${C2000WARE_PATH}/libraries/flash_api/f28002x/lib --entry_point bankSelect --stack_size=0x100" 
          hexBuildOptions="--boot --sci8 --ascii --outfile=${BuildArtifactFileBaseName}.txt" />  
        <file action="copy" path="C2000WARE_PATH/driverlib/f28002x/driverlib/dcsm.c"/>
        <file action="copy" path="C2000WARE_PATH/driverlib/f28002x/driverlib/gpio.c"/>
    	<file action="copy" path="C2000WARE_PATH/driverlib/f28002x/driverlib/flash.c" applicableConfigurations="BANK0_LDFU"/>
        <file action="copy" path="C2000WARE_PATH/driverlib/f28002x/driverlib/interrupt.c"/>
        <file action="copy" path="C2000WARE_PATH/driverlib/f28002x/driverlib/memcfg.c"/>
        <file action="copy" path="C2000WARE_PATH/driverlib/f28002x/driverlib/sci.c"/>
        <file action="copy" path="C2000WARE_PATH/driverlib/f28002x/driverlib/sysctl.c"/>
        <file action="copy" path="C2000WARE_PATH/driverlib/f28002x/driverlib/sysctl.h"/>
        <file action="copy" path="C2000WARE_PATH/driverlib/f28002x/driverlib/inc/hw_sysctl.h"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/common/source/device.c"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/common/source/f28002x_defaultisr.c"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/common/source/f28002x_gpio.c"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/common/source/f28002x_piectrl.c"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/common/source/f28002x_pievect.c"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/common/source/f28002x_usdelay.asm"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/common/include/f28x_project.h"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/common/targetConfigs/TMS320F280025C.ccxml" targetDirectory ="targetConfigs"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/headers/cmd/f28002x_headers_nonbios.cmd"/>
        <file action="copy" path="C2000WARE_PATH/device_support/f28002x/headers/source/f28002x_globalvariabledefs.c"/>
        <file action="copy" path="C2000WARE_PATH/libraries/flash_api/f28002x/lib/FlashAPI_F28002x_FPU32.lib"/>
        <file action="copy" path="C2000WARE_PATH/libraries/boot_rom/f28002x/rev0/rom_symbol_libs/bootROM/F28002xCPU1_BootROM_Symbols_fpu32.lib"/>
        <file action="copy" path = "../28002x_generic_ram_lnk.cmd" applicableConfigurations="CPU_RAM"/>
    	<file action="copy" path = "../28002x_lfu_flash_kernel_lnk.cmd" applicableConfigurations="BANK0_LDFU"/>
        <file action="copy" path = "../f28002x_codestartbranch.asm" applicableConfigurations="CPU_RAM"/>
        <file action="copy" path = "../f28002x_sci_flash_kernel.c"/>
        <file action="copy" path = "../f28002x_sysctrl.c"/>
        <file action="copy" path = "../f28002x_sysctrl.h"/>
        <file action="copy" path = "../f28002x_device.h"/>
        <file action="copy" path = "../SCI_Boot_f28002x.c"/>
        <file action="copy" path = "../SCI_GetFunction_f28002x.c"/>
        <file action="copy" path = "../Shared_Boot_f28002x.c" applicableConfigurations="CPU_RAM"/>
        <file action="copy" path = "../Shared_Erase_f28002x.c" applicableConfigurations="CPU_RAM"/>
        <file action="copy" path = "../Shared_Erase_f28002x.h"/>
        <file action="copy" path = "../Shared_Verify_f28002x.c" applicableConfigurations="CPU_RAM"/>
        <file action="copy" path = "../Shared_Verify_f28002x.h"/>
    	<file action="copy" path = "../f28002x_lfu_singlebank.c" applicableConfigurations="BANK0_LDFU"/>
        <file action="copy" path = "../f28002x_lfu_singlebank.h"/>
    	<file action="copy" path = "../flashapi_defines.h"/>
      </project>
    </projectSpec>

    Regards,

    Wilson

  • Wilson,

    I tried switching to C2000Ware v3.04 and even this works without any issues.

    Can you check your project's linked resources as shown in the picture below?

  • Sia,

    It is definitely different but I don know how to fix it.

    Can you help me with that?

    Regards

    Wilson

  • Wilson,

    is your C2000ware installation from TIREX? If yes, can you try the standalone web installation?

    Your CCS version is 10.3 where mine is 10.2. I don’t see why that would cause issues.

    At this point, I’m basically running out of ideas. Have you tried a clean build? Just start from scratch - with the downloaded MSS. Make the change in the projectspec for the C2000ware path, then import and build. 

    Thanks

    Sira

  • Sira,

    This is the first error I get when I try a clean build.

    I understand the path is different but I am trying to record every error.

    After I fixed the path directories I am getting the following errors:

    Building target: "f28002x_sci_flash_kernel.out"
    Invoking: C2000 Linker
    "C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --define=checksum_enable --define=_DUAL_HEADERS --define=_FLASH --define=LIVE_UPDATE --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"f28002x_sci_flash_kernel.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/lib" -i"C:/ti/c2000/C2000Ware_3_04_00_00/device_support/f28002x/common/flashapi/lib" -i"C:/ti/c2000/C2000Ware_3_04_00_00/libraries/flash_api/f28002x/lib" -i"C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="f28002x_sci_flash_kernel_linkInfo.xml" --entry_point=bankSelect --rom_model -o "f28002x_sci_flash_kernel.out" "./SCI_Boot_f28002x.obj" "./SCI_GetFunction_f28002x.obj" "./f28002x_lfu_singlebank.obj" "./f28002x_sci_flash_kernel.obj" "./f28002x_sysctrl.obj" "../28002x_lfu_flash_kernel_lnk.cmd"  -llibc.a 
    <Linking>
     
     undefined                 first referenced             
      symbol                       in file                  
     ---------                 ----------------             
     Device_init               ./f28002x_lfu_singlebank.obj 
     GPIO_setPadConfig         ./SCI_GetFunction_f28002x.obj
     GPIO_setPinConfig         ./SCI_GetFunction_f28002x.obj
     GPIO_setQualificationMode ./SCI_GetFunction_f28002x.obj
     Interrupt_initModule      ./f28002x_lfu_singlebank.obj 
     Interrupt_initVectorTable ./f28002x_lfu_singlebank.obj 
     SCI_setConfig             ./SCI_GetFunction_f28002x.obj
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "f28002x_sci_flash_kernel.out" not built
     
    >> Compilation failure
    makefile:145: recipe for target 'f28002x_sci_flash_kernel.out' failed
    gmake[1]: *** [f28002x_sci_flash_kernel.out] Error 1
    gmake[1]: Target 'secondary-outputs' not remade because of errors.
    makefile:141: recipe for target 'all' failed
    gmake: *** [all] Error 2
    
    **** Build Finished ****

    This is how my project explorer looks like.

    So, I don't know what else to do to fix it.

    Regards,

    Wilson

  • Wilson,

    I am not able to understand how or why it generates those file not found errors in your first picture.

    Why do the paths have a "file:" preceding the C:/ti/...?

    Thanks,

    Sira

  • Sira,

    I am not sure about that. That is what happens when I am trying to import the project into the workspace.

    Regards,

    Wilson

  • At this point, I am out of ideas.

    Is the C2000Ware installation from the Web or from TIREX?

    Thanks,

    Sira

  • Sira,

    It is from the Web. How can I get the one from TIREX?

    Thanks,

    Wilson

  • Wilson,

    I also use the one from the Web. No difference there.

    Thanks,

    Sira

  • Sira,

    I am not sure why some files were falling in the link. I added the file's device.c, flash.c, gpio.c, sci. c and sysctl.c and that fixed most of the errors generated by unresolved symbols. I had to add the following lines in the file f28002x_sysctrl.c:

    volatile struct FLASH_CTRL_REGS Flash0CtrlRegs;
    volatile struct FLASH_ECC_REGS Flash0EccRegs;

    These structs are used by the function InitFlash() but without this struct definition, I was having the unresolved symbol issue.

    Now, I am trying to test the bootloader in the LAUNCHXL-F280025C but it is not working.

    Have you tested it in the LAUNCHXL-F280025C?

    Regards,

    Wilson

  • Wilson,

    I have no idea why you are having to make these modifications. If you and I have the same C2000Ware version (v3.04 or v3.03 from the Web), and the same MSS for the F28002x SCI Flash Kernel, your build should be identical to mine.

    Just for completeness sake, can you tell me what compiler you are using?

    So you were finally able to get the SCI Flash kernel to build?

    The SCI Flash kernel is tested only on the ControlCard, not the Launchpad. What errors are you seeing?

    Thanks,

    Sira

  • Sira,

    The compiler is TI v21.6.0.LTS.

    Yes. The SCI Flash Kernel builds without errors.

    I am not getting errors in the Launchpad, but I am not sure the command serial_flash_programmer_appln.exe -d f28002x -k f28002x_sci_flash_kernel.txt -a f28002x_lfu_singlebankBANK0FLASH.txt -b 9600 -p COMx is doing something. I do not get the menu options.

    Thanks,

    Wilson

  • Wilson,

    Just to be completely clear, in the command above, I assume you used the correct COM port number as opposed to COMx. Although I do think if you did that, it would give you a message saying you need to enter the right COM port number.

    And are you following the steps as detailed in the user guide that is present in the MSS?

    Which build configuration of the SCI Flash kernel are you using? BANK0_LDFU?

    Thanks,

    Sira

  • Sira,

    I am passing the COM number in the command. Should the serial_flash_programmer_appln.exe recognize the Launchpad while it is plug into my laptop?

    It seems like the programmer is not flashing the Launchpad.

    I am using the BAN0_LDFU in the SCI Flash Kernel.

    Thanks,

    Wilson

  • Wilson,

    It should work with the Launchpad as well. Are you using the user guide present in the MSS?

    After Step 4 in the user guide, did you check the Flash contents to see if the sections where the Flash kernel is supposed to be present are indeed written (sanity check)?

    Thanks,

    Sira

  • Sira,

    Yes, I am following the guide.

    And this is the result:

    Regards,

    Wilson

  • Wilson,

    Ok so it does look like Sectors 0 and 1 are being written to, which is good.

    I have asked a colleague (I am remote at the moment so I don't have access to one) to test out the Flash Kernel with the LP. She has ordered it and should be able to in a couple of days. I am not sure how else I can help at this point. I am assuming you don't have access to a F28002x ControlCard.

    Thanks,

    Sira

  • Sira,

    All I have is the LAUNCHPAD-F280025C. I'll wait to see how she does with the Launchpad.

    Thanks,

    Wilson

  • Thanks Wilson, I appreciate your patience.

    -Sira

  • Wilson,

    Anu advised that this worked fine on the LP as well.

    Anu, can you please help Wilson?

    Thanks,

    Sira

  • Wilson, 

    Once you load the flash kernel project into CCS, if you click Run and then click Suspend, what does your call stack look like? Are you in the SCI_AutobaudLock function? 

    This is what the call stack should look like:

    Thanks, 
    Anu

  • Anu,

    Thanks for joining me in this quest. Yes, I am in the SCI_AutobaudLock function.

    I have two different COMs when I plug the Launchpad into my Laptop. I have tried both of them but I have not had success with the LP.

    I did follow the guide that Sira shared with me but it was not a straightforward compilation for me I had to do some modifications in order to make the project compile. Sorry for bothering you, but can you guide me step by step through the process you followed to make this project work?

    Regards,

    Wilson

  • Wilson, 

    Glad that you're in the SCI_AutobaudLock function, the output on the cmd window was making me suspect that the serial flash programmer was waiting on the launchpad for an autobaud lock. The launchpad needs to have the project running first, only then should the serial flash programmer executable be launched. 

    In order to get the project to run on the launchpad, I did the following:

    1. Import the project into CCS from the MySecureSoftware download. The C2000Ware path may need to be modified based on where you install the package. The files needed from C2000Ware should be pulled automatically into the project.

    2. Build the flash kernel project with the BANK0_LDFU config and the LFU project with the BANK0_FLASH config.

    3. Move the txt files generated in the CCS projects to a location where the serial flash programmer can access them - in the guide it is recommended to move the files directly to the serial_flash_programmer folder, I have had success providing an absolute path to the files for the -k and -a arguments needed for the serial_flash_programmer as well.

    4. By default, the launchpad should be in Flash Boot, if not set the launchpad to Flash Boot by setting both GPIO24 and GPIO32 to "1". There is a small black box with switches in it on the launchpad with the text "Boot" under it, these are the boot mode select pins. 

    5. Connect the launchpad to the laptop and launch the target configuration for the launchpad in CCS. The led_ex1_blinky project has a target configuration file for the launchpad, I used it for this project. 

    6. Go to "Load Program" and load the flash kernel project into Flash. Click "Run". At this point, the flash kernel will be waiting in autobaud lock for the serial_flash_programmer executable.

    7. Go to the serial_flash_programmer folder and enter the command as specified in the user guide. At this point, the menu should show up and you can proceed with the rest of the instructions in the user guide. 

    You could try using the target configuration file in the led_ex1_blinky project in C2000Ware and see if that makes a difference. The path to the example within C2000Ware is driverlib\f28002x\examples\led. 

    Thanks, 

    Anu

  • One more thing to note - the COM port used should be the Class Application/User UART port. 

    Thanks, 

    Anu

  • @Anu Biradar & @Sira Rao80. I have not figured out why the Bootloader (C2000-F28002X-SINGLEBANK-LFU) is not working. We really need that to complete the port to TI MCUs. I know that I am asking too much, but is there a possibility that you can make a video step-by-step of how to set the project and make it work from zero. I have followed the guide but I cannot make it work.

    Regards, Wilson

  • Wilson,

    Let me discuss with Anu and get back to you. Other users have not reported problems that you have reported. This software has been requested and accessed by numerous users (20+) in the last few months. 

    Thanks,

    Sira