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.

Problem of load/flash code to TMS320F28027

Other Parts Discussed in Thread: TMS320F28027, UNIFLASH, CONTROLSUITE

Problem of load/flash code to TMS320F28027

 

I have code debugged and run well with debugger of CCS6.1.0. Now the code need to be loaded to TMS320F28027 so that TMS320F28027 can run independently without debugger probe.ProblemofLoadProgramToMCU.docx

 

Uniflash is the software I used to load code to TMS320F28027. However, this software is quite confusing to me. After reading their tutorial, i am still not sure about how to load code to TMS320F28027. Their tutorial is quite different from what I see for TMS320F28027.

When I open the Uniflash 3.4.1, the screen is the following.

Clicking new target configuration, the new window pop out,

To my system, I select XDS2xx emulator, and TMS320F28027, it is like the following.

Click “OK”, the GUI main screen will pop out, as the following figure. In the main screen, nothing is allowed to change except code security password.

The click “programs” button, the screen for the file shown as the following figure.

Now click the button “Add”, it means to read in some files.

  1. What files should be read in here? .out file or .obj file, or something else?
    I selected .out file, it does not work.

  2. Any more detailed tutorial about Uniflash for TMS320F28027?

 

Thanks.

 

Z

  • Hi,

    Here are the steps to convert your RAM based code to flash:

    You need to add these two statements

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

    Add DSP2802x_MemCopy.c file to the project.

    Define extern variables above main() function.

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

    Replace 28027_RAM_lnk.cmd with F28027.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\f2802x\v230\f2802x_examples_structs\flash_f2802x

    Regards,
    Gautam
  • Awesome, Thank you very much.

  • Hi, Gautam,

    ProblemofLoadProgramToMCU_1.docx

    I did exactly what you said.

    1. Insert two lines in code

    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

    InitFlash(); after InitPieVectTable();

    2. Add DSP2802x_memcopy.c file to the project

    3. Define external variables above main() function

    extern Uint16 RamfuncsLoadStart;

    extern Uint16 RamfuncsLoadEnd;

    extern Uint16 RamfuncsRunStart;

    4. And then build the code.

    Many warnings and errors come out.

     

    The main problem is three variables externally defined in step 3 are not recognized. Please refer building message below.

    1. I am wondering what value of RamfuncsLoadStart, RamfuncsLoadEnd, RamfuncsRunStart will be. How to define them based on the memory map of TMS320F28027 (shown below)?

    2. Also, does that mean my linker file is not right? Could you attach your linker file to this post?

  • I hope you're using F28027.cmd from here:
    C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd
  • ProblemofLoadProgramToMCU_toGAUTUM.docx

    Hi, Gautum,

     

    Could you help clarify the following questions? I am not quite clear about them.

     

    Thank you.

     

    Z

     

     

    1. What is the difference between "28027_RAM_lnk.cmd" and "F28027.cmd"?
      I did “Replace 28027_RAM_lnk.cmd with F28027.cmd”, but the file name of “F28027.cmd” is grayed out automatically by system. It says there is file with the same name. But I do not see the file with the same name.
      What causes that?
       The roundabout is that I simply rename “F28027.cmd” to “F28027_.cmd”. Then system build fine. Is this method ok?

    2. you mentioned copy iniflash() to RAM, how about initpiectrl() function?
      Do I need to insert memcopy(.........) before InitPieCtrl() function too?

    1. How to load compiled “.out” file to TMS320F28027?
      Is it through software UNIFALSH? Or through CCS6.1.0?
      Can CCS6.1.0 LOAD .out file to flash?
      I used “Uniflash” to program “.out” file to chip. It says chip is programed successfully. But when I turn-on power supply of TMS320F28027, TMS320F28027 does not function. The uniflash program screen is shown below.

    2. How to “Configure your GPIO's to boot to flash.”
      I set the GPIO37/TDO and GPIO34/COMP2OUT to 3.3V, and TRST to ground.
      Is it right?
      The result is that there is nothing happened when TMS320F28027 is powered on.

    3. What is the right way to flash TMS320F28027?
      Related documents?
      Step by step guidelines?