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.

Running standalone from CCS

Genius 5910 points
Other Parts Discussed in Thread: TMS320F28335, TMS320F28069

Hi,

This should be very simple. But some how I got lost in the zillion of  option of CCS. So How do I program my device from CCS?

 I can't find a program option(burn). And when I start the debug without debug information. The program still doesn't work standalone.

 So how is it done?

Thanks!.

  • Steps:
    1. File->New-Target Configuration File
    2. Select your connection type (e.g. Texas Instruments XDS100v2 USB Debug Probe) and then select save.
    3. View->Target Configurations.
    4. Find the target configuration you just created in "User Defined"
    5. Right click on the Target Configuration you just created (e..g NewTargeConfiguration) and select "Launch Selected Configuration"
    6. In the Debug Window, right click on the second item and Select Connect Target.
    7. Run->Load-> Load Program.
    8. Select to your .out file

    Stephen
  • Thanks for the reply.

    I can program the device.
    But my code still doesn't work standalone. So what do I have so select in CCS?
  • Do you mean you want the board to work without the debugger connected?

    Running stand alone requires that the target (uC) be configured to boot from flash. For example, if you are using the TMS320F28335, the following four GPIO pins need to be pulled high: GPIO84,GPIO85,GPIO86 and GPIO87 (see page 43 in the datasheet(www.ti.com/.../tms320f28335.pdf)).
  • I'm using the TMS320F28069 I want to program the device with CCS so that it runs standalone.
    GPIO34 is connected to VCC and GPIO37 is connected TDO. I think that is correct for selecting the bootmode.
  • I am not familiar with that device.

    "GPIO37 is connected TDO"
    GPIO37 should be pulled up to VCC.

    I am not sure if it matters, but did you disconnect the debugger from the board.

    6.1.10.1 Emulation Boot
    When the emulator is connected, the GPIO37/TDO pin cannot be used for boot mode selection. In this
    case, the boot ROM detects that an emulator is connected and uses the contents of two reserved SARAM
    locations in the PIE vector table to determine the boot mode. If the content of either location is invalid,
    then the Wait boot option is used. All boot mode options can be accessed in emulation boot.

    Stephen
  • Also, verify your linker command file is allocating your code in flash and not RAM.

    Stephen

  • Ok how do I define : those two location in the saram? isn't there a document that describe how this is done. This can't be that complicated.

    I need my xds100 for the serial communication.

    My program is way to big for Ram so it is always allocated in flash.
  • See page 10 of www.ti.com/.../spra958l.pdf


    Lastly, on some devices, specifically the ‘Piccolo’ devices (F2802x, F2803x, F2805x, F2806x),
    the first three 32-bit PIE vector locations are used for bootmode selection when the debugger is
    in use. Therefore, the code should be modified to avoid overwriting these locations as follows:
    memcpy((void *)0x000D06, (Uint16 *)&PieVectTableInit+6, 256-6);
    or
    memcpy((Uint16 *)&PieVectTable+6, (Uint16 *)&PieVectTableInit+6, 256-6);
  • See Section 2.2.9 of www.ti.com/.../spruh18f.pdf.
  • Please see below.  if this answers your question, please select verify.

    Uint16 * pEMU_KEY
    Uint16 * pEMU_BMODE
    *pEMU_KEY = 0x55AA;
    *pEMU_BMODE = 0x000B;

  • Thanks for the replies

    I'm now reading www.ti.com/.../spra958l.pdf. Thanks!

    If you read the notes in See Section 2.2.9 of www.ti.com/.../spruh18f.pdf : The default behavior of the GetMode option on unprogrammed devices is to boot to flash. That is that i want.

    for this to work, there needs to be a some correct memory allocation. there are now NULL pointers.
    Uint16 * pEMU_KEY
    Uint16 * pEMU_BMODE
    *pEMU_KEY = 0x55AA;
    *pEMU_BMODE = 0x000B;
  • I guess you would use example Example 2-4 on page 205 of http://www.ti.com/lit/ug/spruh18f/spruh18f.pdf
    Stephen

  • Yes, I forgot to initialize them. However, you might not need to do that. Did you read Example 2-4 on page 205 of www.ti.com/.../spruh18f.pdf.
  • I am not familar with that device, but I think I pointed you in a direction that will allow you to do what you need to do.
    Stephen

  • Stevenh thanks for the help. I solved it. If I remove the programmer at power up the program runs correctly.
  • Happy to hear that.
    Which post helped you. Please select verify on the correct post or posts.
    Thanks,
    Stephen