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.

CCS/TMS320F2808: Program loading into specified flash sector in TMS320F2808 via XDS100v2 from CCSv6

Part Number: TMS320F2808
Other Parts Discussed in Thread: TMS320F28335, TMS320F2809

Tool/software: Code Composer Studio

Hello,

I would like to ask you for an advice. I have two programs for TMS320F2808.

The first one is the bootloader and the second one is the application. I need

to know how to load *.out file containing the bootloader into specified flash sector

and how to concurrently load *.out file containing the application into different

specified flash sectors. I have been using CCS v6 and XDS100v2 emulator.

Thanks in advance for any suggestions.

  • You'll need to change the linker command file (e.g. F28335.cmd for the TMS320F28335) to specify the memory layout.  It defines the memory layout for your code and variables. All code is placed in the .text section unless specified by #pragma SET_CODE_SECTION.

    SET_CODE_SECTION and SET_DATA_SECTION are described in section 6.9 of www.ti.com/.../spru514l.pdf. Those pragmas are used to place code and data (i.e. variables) respectively in a specific section of flash or RAM.

    Stephen

  • Also, you can do one of the following:
    1. Combine the two pieces of code (application and bootloader) into one project, use the #pragma SET_CODE_SECTION/SET_DATA_SECTION to place the bootloader in a different flash/RAM section. Then download the code using one debug configuration

    2. Use the #pragma SET_CODE_SECTION/SET_DATA_SECTION to place the bootloader in a different flash/RAM section. Then use two debug configuration: One for the Application and one for the bootloader. The second piece of code that is downloaded should not erase flash. See Target -> Flash Settings in Debug Configuration.
  • Hello stevenh,

    thank you very much for your answer. I have followed the second

    option in your second message. I have firstly loaded the bootloader

    into Flash A memory. Then I wanted to test the actual state of the target

    through my monitor and service application running on the host PC

    (I should see that the target is processing the booloader). But

    the result is that in the service application I can't see that the bootloader

    is processed (I can rely on there is no problem in the service application).

    The service application communicates with target over CAN.

    Could interfere that I am concurrently connected to the target from the

    service application over CAN and from CCS through JTAG? Does it exist

    any possibility how to let the target to run independently on CCS and JTAG?

    Thanks. 

  • CAN shouldn't be interfering with JTAG and vice versa. How does your bootloader work?

    The TMS320F2809 has its own built-in bootloader. Is there any reason you're not using it? That bootloader should jump to your bootloader at power-up.

    Please see Boot to Flash/ROM on page 35 of www.ti.com/.../tms320f2808.pdf.
  • The bootloader code for the 280x device is located at www.ti.com/.../spru722.
  • Hello stevenh,
    thank you for your reaction. The bootloader which I have been using wasn't
    developed by me. It was developed by the programmer who created the
    software for my control board so I have only vague idea about its function.
    When I started to work with the prepared control board, the bootloader
    was loaded into the Flash A sector of TMS320F2808 and I did the mistake that
    I connected to the target through XDS100v2 emulator without previously
    disable the erasing of Flash A sector in CCS. When I thought about how to
    solve the problem with erased bootloader I thought that it should be sufficient
    to load the bootloader into appropriate location in the Flash through emulator
    and the should be possible to load the application from prepared service
    program running on host PC via prepared bootloader.
    The bootloader is used because of there is no JTAG connection for the emulator
    in the final control board. Program loading is only possible via CAN interface.
  • If you are in control of the software now, I would think it would best to use the uC's bootloader.

    Benefits of using uC's bootloader:
    1. The production line doesn't have to download the bootloader,
    2. The production line doesn't have to physically connect the XDS100v2 to the board.

    In other words, production will be saving time and money.