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.

How to load a program to f28035 MCU's flash memory?

Other Parts Discussed in Thread: CCSTUDIO

Hi,

I'm using the Texas Instrument F28035 toolkit. It comes with a sample program FlashingLed, I chose configuration F2803x_FLASH, it compiles, and when I tried to load it, it says "data verification failed at address 0x3F657A, please verify target memory and memory map.
What is the correct way to load the program. It can load to RAM and run without program.

I downloaded some sample codes from TI as well, which is in c:\tidcs. You know what I am talking about if you have the same one. And for those codes, I modified some and successully tested on RAM, debug mode. However, it doesn't compile in release mode and I have no idea how to load them to flash memory at all. There was no any hint. Would somebody with experience give me a piece of advice, please??!!

Thanks a lot!!!

Alfred

 

 

  • Hi Alfred,

    There are plenty of posts covering the same topic, use the search function before posting new questions... However, can you explain a bit more why the sample programs are not compiling? (error messages, your actions etc)
    For you, as a reference for FLASHing C2000 Devices, have a look to the wiki.

    Regards

    Andreas

  • Thanks a lot, Andreas

    I'll check the wiki and try to search the forum.

    Here are the messages when I try to compile in release mode, I looks like it doesn't know where all the files are.

    __________________________________________________________________________________________________________

    [DSP2803x_CodeStartBranch.asm] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_CodeStartBranch.asm"

     

    [DSP2803x_CpuTimers.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_CpuTimers.c"

    "DSP2803x_CpuTimers.c", line 16: fatal error: could not open source file "DSP2803x_Device.h"

    1 fatal error detected in the compilation of "DSP2803x_CpuTimers.c".

    Compilation terminated.

     

    >> Compilation failure

     

    [DSP2803x_DefaultIsr.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench_/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_DefaultIsr.c"

    "DSP2803x_DefaultIsr.c", line 24: fatal error: could not open source file "DSP2803x_Device.h"

    1 fatal error detected in the compilation of "DSP2803x_DefaultIsr.c".

    Compilation terminated.

     

    >> Compilation failure

     

    [DSP2803x_EPwm.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench_/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_EPwm.c"

    "DSP2803x_EPwm.c", line 14: fatal error: could not open source file "DSP2803x_Device.h"

    1 fatal error detected in the compilation of "DSP2803x_EPwm.c".

    Compilation terminated.

     

    >> Compilation failure

     

    [DSP2803x_PieCtrl.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench_/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_PieCtrl.c"

    "DSP2803x_PieCtrl.c", line 14: fatal error: could not open source file "DSP2803x_Device.h"

    1 fatal error detected in the compilation of "DSP2803x_PieCtrl.c".

    Compilation terminated.

     

    >> Compilation failure

     

    [DSP2803x_PieVect.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_PieVect.c"

    "DSP2803x_PieVect.c", line 14: fatal error: could not open source file "DSP2803x_Device.h"

    1 fatal error detected in the compilation of "DSP2803x_PieVect.c".

    Compilation terminated.

     

    >> Compilation failure

     

    [DSP2803x_Sci.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_Sci.c"

    "DSP2803x_Sci.c", line 14: fatal error: could not open source file "DSP2803x_Device.h"

    1 fatal error detected in the compilation of "DSP2803x_Sci.c".

    Compilation terminated.

     

    >> Compilation failure

     

    [DSP2803x_SysCtrl.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_SysCtrl.c"

    "DSP2803x_SysCtrl.c", line 18: fatal error: could not open source file "DSP2803x_Device.h"

    1 fatal error detected in the compilation of "DSP2803x_SysCtrl.c".

    Compilation terminated.

     

    >> Compilation failure

     

    [DSP2803x_usDelay.asm] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_usDelay.asm"

     

    [DSP2803x_GlobalVariableDefs.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench/release" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench/Release.lkf" "DSP2803x_GlobalVariableDefs.c"

    "DSP2803x_GlobalVariableDefs.c", line 14: fatal error: could not open source file "DSP2803x_Device.h"

    1 fatal error detected in the compilation of "DSP2803x_GlobalVariableDefs.c".

    Compilation terminated.

     

    >> Compilation failure

     

    [Example_2803xSci_Echoback.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench/release" -d"LARGE_MODEL" -ml -v28 -@"Release.lkf" "Example_2803xSci_Echoback.c"

    "Example_2803xSci_Echoback.c", line 82: fatal error: could not open source file "DSP28x_Project.h"

    1 fatal error detected in the compilation of "Example_2803xSci_Echoback.c".

    Compilation terminated.

     

    >> Compilation failure

     

    Build Complete,

      9 Errors, 0 Warnings, 0 Remarks.

    __________________________________________________

    thanks, 

    Alfred

  • OK, I did make some progress.

    First, right click on the project, Build Options -> preprocessor, and then you can add include search path (-i), use ";" to separate different paths. 

    Now I reduce the number of error to 1.

    _______________________________________________________________________________________________________________________________

    [DSP2803x_GlobalVariableDefs.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench/release" -i"C:/TI_F28xxx_SysSW/~SupportFiles/DSP2803x_headers/include" -i"C:/tidcs/c28/DSP2803x/v121/DSP2803x_common/include" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench_sync_control_firmware/Release.lkf" "DSP2803x_GlobalVariableDefs.c"

    "DSP2803x_GlobalVariableDefs.c", line 337: error: variable "SysPwrCtrlRegs" was declared with a never-completed type

    1 error detected in the compilation of "DSP2803x_GlobalVariableDefs.c".

    ______________________________________________________________________________________________________________________________

    I really have no idea what this means? Why in debug it can just go through?

    If i click on it, it takes me to DSP2803x_GlobalVariableDefs.c

    //----------------------------------------

    #ifdef __cplusplus

    #pragma DATA_SECTION("SysPwrCtrlRegsFile")

    #else

    #pragma DATA_SECTION(SysPwrCtrlRegs,"SysPwrCtrlRegsFile");

    #endif

    volatile struct SYS_PWR_CTRL_REGS SysPwrCtrlRegs;

     

    Can anyone with experience tell me what to do now?

    Thanks a lot!

    Alfred

     

  • Alfred,

    Is the file DSP2803x_SysCtrl.h (and all the other peripheral definitions) included into your project?

    Regards Andreas

  • Yes, DSP2803x_SysCtrl.h is included, and I made sure the project manager knows where it is.

    Still the same error, it looks like it doesn't know where the body of "SysPwrCtrlReg" is. I have no problem compiling it in debug mode. And I checked to make sure I include the same .h and .c files in both modes. This is confusing. Do you know which .c file contains the body of "SysPwrCtrlReg"?

    -------------------------------------------------------------

    [DSP2803x_GlobalVariableDefs.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -q -o3 -fr"C:/tidcs/c28/DSP2803x/v121/DSP2803x_examples/Alfred Bench_sync_control_firmware/release" -i"C:/TI_F28xxx_SysSW/~SupportFiles/DSP2803x_headers/include" -i"C:/tidcs/c28/DSP2803x/v121/DSP2803x_common/include" -d"LARGE_MODEL" -ml -v28 -@"../../DSP2803x_examples/Alfred Bench_sync_control_firmware/Release.lkf" "DSP2803x_GlobalVariableDefs.c"

    "DSP2803x_GlobalVariableDefs.c", line 337: error: variable "SysPwrCtrlRegs" was declared with a never-completed type

    1 error detected in the compilation of "DSP2803x_GlobalVariableDefs.c".

     

    >> Compilation failure

    -------------------------------------------------------------------------

    Thanks a lot,

    Alfred

  • Alfred,

    The struct is defined in DSP2803x_SysCtrl.h at the very bottom. If you can compile the project in Debug mode, but not in Release mode are you sure and certain that the build options for the two build modes are identical, especially the include paths...?

    Best regards

    Andreas