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.

TMS320F28069 Writing to FLASH Problem

Other Parts Discussed in Thread: CONTROLSUITE

Hey all,

The program file I want to write to f28069M-launchpad's FLASH memory is on the attachment. I know that there is a document (Running an Application from Internal Flash Memory on the TMS320F28xxx DSP) and I have tried to check that but I could not catch what I am missing.

Can you help me a bit when you are available? Thanks for bearing with me.asy pwm.zip

  • Hi,

    Simply follow these steps:

    You need to add these two statements

    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
    InitFlash(); after InitPieVectTable();

    Add DSP2806x_MemCopy.c file to the project.

    Define extern variables above main() function.

    extern Uint16 RamfuncsLoadStart;
    extern Uint16 RamfuncsLoadEnd;
    extern Uint16 RamfuncsRunStart;

    Replace 28069_RAM_lnk.cmd with F28069.cmd
    Compile the code.
    Configure your GPIO's to boot to flash.

    Also, you can refer a direct example code present here:
    C:\ti\controlSUITE\device_support\f2806x\v140\F2806x_examples_ccsv5\flash_f28069

    Regards,
    Gautam
  • It seems I still have many many errors. Catastrophic, fatal, whatever. :D And this is just the compilation part. I am missing something...


    **** Build of configuration F2806x_FLASH for project AsymmetricPWM ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../AsymmetricPWM-DevInit_F2806x.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/bin/cl2000" -v28 -mt -ml --vcu_support=vcu0 --cla_support=cla0 --float_support=fpu32 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/include" --include_path="D:/ti/controlSUITE/development_kits/~SupportFiles/F2806x_headers" --include_path="/packages/ti/xdais" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_common/include" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_headers/include" --preinclude="D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x" -g --define="_DEBUG" --define="LARGE_MODEL" --define="FLASH" --diag_warning=225 --preproc_with_compile --preproc_dependency="AsymmetricPWM-DevInit_F2806x.pp" "../AsymmetricPWM-DevInit_F2806x.c"
    Fatal error: cannot open source file "D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x": Invalid argument
    1 catastrophic error detected in the compilation of "../AsymmetricPWM-DevInit_F2806x.c".
    Compilation terminated.

    >> Compilation failure
    gmake: *** [AsymmetricPWM-DevInit_F2806x.obj] Error 1
    'Building file: ../AsymmetricPWM-Main.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/bin/cl2000" -v28 -mt -ml --vcu_support=vcu0 --cla_support=cla0 --float_support=fpu32 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/include" --include_path="D:/ti/controlSUITE/development_kits/~SupportFiles/F2806x_headers" --include_path="/packages/ti/xdais" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_common/include" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_headers/include" --preinclude="D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x" -g --define="_DEBUG" --define="LARGE_MODEL" --define="FLASH" --diag_warning=225 --preproc_with_compile --preproc_dependency="AsymmetricPWM-Main.pp" "../AsymmetricPWM-Main.c"
    Fatal error: cannot open source file "D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x": Invalid argument
    1 catastrophic error detected in the compilation of "../AsymmetricPWM-Main.c".
    Compilation terminated.

    >> Compilation failure
    gmake: *** [AsymmetricPWM-Main.obj] Error 1
    'Building file: C:/Users/device_support/f2806x/v100/F2806x_headers/source/F2806x_GlobalVariableDefs.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/bin/cl2000" -v28 -mt -ml --vcu_support=vcu0 --cla_support=cla0 --float_support=fpu32 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/include" --include_path="D:/ti/controlSUITE/development_kits/~SupportFiles/F2806x_headers" --include_path="/packages/ti/xdais" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_common/include" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_headers/include" --preinclude="D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x" -g --define="_DEBUG" --define="LARGE_MODEL" --define="FLASH" --diag_warning=225 --preproc_with_compile --preproc_dependency="F2806x_GlobalVariableDefs.pp" "C:/Users/device_support/f2806x/v100/F2806x_headers/source/F2806x_GlobalVariableDefs.c"
    Fatal error: cannot open source file "D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x": Invalid argument
    1 catastrophic error detected in the compilation of "C:/Users/device_support/f2806x/v100/F2806x_headers/source/F2806x_GlobalVariableDefs.c".
    Compilation terminated.

    >> Compilation failure
    gmake: *** [F2806x_GlobalVariableDefs.obj] Error 1
    'Building file: ../F2806x_PieVect.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/bin/cl2000" -v28 -mt -ml --vcu_support=vcu0 --cla_support=cla0 --float_support=fpu32 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/include" --include_path="D:/ti/controlSUITE/development_kits/~SupportFiles/F2806x_headers" --include_path="/packages/ti/xdais" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_common/include" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_headers/include" --preinclude="D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x" -g --define="_DEBUG" --define="LARGE_MODEL" --define="FLASH" --diag_warning=225 --preproc_with_compile --preproc_dependency="F2806x_PieVect.pp" "../F2806x_PieVect.c"
    Fatal error: cannot open source file "D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x": Invalid argument
    1 catastrophic error detected in the compilation of "../F2806x_PieVect.c".
    Compilation terminated.

    >> Compilation failure
    gmake: *** [F2806x_PieVect.obj] Error 1
    'Building file: ../PWM_1ch_Cnf.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/bin/cl2000" -v28 -mt -ml --vcu_support=vcu0 --cla_support=cla0 --float_support=fpu32 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/include" --include_path="D:/ti/controlSUITE/development_kits/~SupportFiles/F2806x_headers" --include_path="/packages/ti/xdais" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_common/include" --include_path="D:/ti/controlSUITE/device_support/f2806x/v140/F2806x_headers/include" --preinclude="D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x" -g --define="_DEBUG" --define="LARGE_MODEL" --define="FLASH" --diag_warning=225 --preproc_with_compile --preproc_dependency="PWM_1ch_Cnf.pp" "../PWM_1ch_Cnf.c"
    Fatal error: cannot open source file "D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x": Invalid argument
    1 catastrophic error detected in the compilation of "../PWM_1ch_Cnf.c".
    Compilation terminated.

    >> Compilation failure
    gmake: *** [PWM_1ch_Cnf.obj] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****


    Basically, I just want to write f28069 asymmetric pwm example file (D:\ti\controlSUITE\development_kits\F28069 controlSTICK\PWM - AsymmetricPWM) to the flash memory...

  • Check your include paths under compiler section and include paths under linker section.

    Regards,
    Gautam
  • **** Build of configuration F2806x_FLASH for project AsymmetricPWM ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../AsymmetricPWM-Main.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/bin/cl2000" -v28 -mt -ml --vcu_support=vcu0 --cla_support=cla0 --float_support=fpu32 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/include" --include_path="D:/ti/controlSUITE/development_kits/~SupportFiles/F2806x_headers" --include_path="D:/ti/controlSUITE/development_kits/F28069 controlSTICK/DPLibTemplate-F2806x" --include_path="D:/ti/controlSUITE/development_kits/~SupportFiles/source" --include_path="D:/ti/controlSUITE/device_support/f2806x/v120/F2806x_common/source" --include_path="C:/Users/device_support/f2806x/v100/F2806x_headers/include" --include_path="C:/Users/device_support/f2806x/v100/F2806x_common/include" -g --define="_DEBUG" --define="LARGE_MODEL" --define="FLASH" --diag_warning=225 --preproc_with_compile --preproc_dependency="AsymmetricPWM-Main.pp" "../AsymmetricPWM-Main.c"
    'Finished building: ../AsymmetricPWM-Main.c'
    ' '
    'Building target: AsymmetricPWM.out'
    'Invoking: C2000 Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/bin/cl2000" -v28 -mt -ml --vcu_support=vcu0 --cla_support=cla0 --float_support=fpu32 -g --define="_DEBUG" --define="LARGE_MODEL" --define="FLASH" --diag_warning=225 -z -m"AsymmetricPWM.map" --stack_size=0x380 --warn_sections -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.9/include" -i"C:/Users/cano/Desktop/AsymmetricPWM" --reread_libs --xml_link_info="AsymmetricPWM_linkInfo.xml" --rom_model -o "AsymmetricPWM.out" "C:/Users/device_support/f2806x/v100/F2806x_headers/cmd/F2806x_Headers_nonBIOS.cmd" "./AsymmetricPWM-DevInit_F2806x.obj" "./AsymmetricPWM-Main.obj" "./F2806x_CodeStartBranch.obj" "./F2806x_GlobalVariableDefs.obj" "./PWM_1ch_Cnf.obj" "../F2806x_FLASH_AsymmetricPWM.CMD" -l"libc.a"
    <Linking>
    'Finished building target: AsymmetricPWM.out'
    ' '

    **** Build Finished ****

    Thank you. It works. :)