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.

TMS320F28335: Flashing a .bin file to the target makes program not work

Part Number: TMS320F28335
Other Parts Discussed in Thread: UNIFLASH

Hi All,

Using CCS v12.2.0 to write our program. The configuration is generating .out file. When flashed to the target by CCS and with the Uniflash, the program works great.

Since I wanted to calculate the CRC of the .bin file, I enabled Hex Utility and selected the .bin as an output format. Now, both the .obj and .bin files are generated after a build.

Linker settings of interest:

MEMORY
{
PAGE 0:
   FLASHHG     : origin = 0x300000, length = 0x010000     /* on-chip FLASH */
   FLASHF      : origin = 0x310000, length = 0x008000     /* on-chip FLASH */
   FLASHA      : origin = 0x318000, length = 0x027F7E     /* on-chip FLASH */
   FLASHACRC   : origin = 0x33FF7E, length = 0x000002     /* on-chip FLASH */
   CSM_RSVD    : origin = 0x33FF80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
   BEGIN       : origin = 0x33FFF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
   CSM_PWL     : origin = 0x33FFF8, length = 0x000008
}

SECTIONS
{
    GROUP : > FLASHA
    {
      .econst
      .cinit
      .text
    }
}

After the build, the .map file confirms the settings, and I can see the addresses of econst, cinit, and text sections are placed consecutively in FLASHA.

Then I use Uniflash to flash the target and our program is not working. I exported the memory content (the number of bytes as in .bin file) from the start address of FLASHA. Compared it with the content of the .bin file and they are the same. I also exported the same memory content after flashing the .out file, and the FLASHA is the same.

I also tried to flash the .bin file with Uniflash and specify the load address, but the program is still not working. 

Do you have any ideas why this is not working, or if I am doing something wrong?

  • Hi, 

    Is the code execution stuck at any particular address?  Are you issuing a reset after loading the .bin file.

    Also, are you setting any entry point for the code in your file?  If so, you will have to update the Program Counter to the entry point address. 

    Best Regards

    Siddharth

  • Is the code execution stuck at any particular address?

    I don't know where it is stuck. When I flash the .out file, I can see CAN Bus messages coming through. I don't see them with .bin file.

    Are you issuing a reset after loading the .bin file.

    So far, any .out code I flashed will start working (sending CAN messages) without resetting. I did power cycle the development board after flashing .bin file and still no luck.

    Also, are you setting any entry point for the code in your file? 

    The codestart section is set to BEGIN memory block. I don't know how to set the PC to the entry point address?Is there any resource besides TMS320C28x Assembly Language Tools v22.6.0.LTS document?

    BEGIN       : origin = 0x33FFF6, length = 0x000002
    
    codestart           : > BEGIN       PAGE = 0

    Thank you.

    Miro

  • Miro, 

    You can use CCS to debug the code. After loading the .bin file, you can connect to the target and check the PC value.

    Also, are there any RAM sections in the file for global variables that need to be initialzed.?

    Best Regards

    Siddharth