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: Lost ability to execute in FLASH mode

Part Number: TMS320F28335
Other Parts Discussed in Thread: CONTROLSUITE

I have an ‘F28335 processor on circuit A to which Code Composer Studio version 6.2.0.00050 is connected via a JTAG Blackhawk USB100v2.  Have used this circuit A, CCS, and USB100v2 many times to develop code in RAM (Active=RAM), program flash, execute in flash (flash actually copies some code to RAM), and ultimately run standalone w/o debugger, etc.  The Boot Mode Selection configuration on the circuit board is set to 0b0100.  It has never been changed.  The 28F335 datasheet identifies this as directing the bootloader to “Jump to SARAM”.

But now, something has broken.  Code can run when using CCS and the Build Configuration>Set Active = RAM, but when set to Flash it downloads to flash, but the processor gets stuck in the BootROM at 3ff9fa where there is a short branch (SB) with an unconditional 0 relative offset as shown below.

3ff9f4: 561F SETC OBJMODE
3ff9f5: 7622 EALLOW
3ff9f6: B9C0 MOVZ DP, #0x1c0
3ff9f7: 28290028 MOV @0x29, #0x0028
3ff9f9: 761A EDIS
3ff9fa: 6F00 SB 0, UNC    <-STUCK HERE
3ff9fb: FFFF ITRAP1
3ff9fc: FFFF ITRAP1
3ff9fd: FFFF ITRAP1
3ff9fe: FFFF ITRAP1

Where do I begin? 

Thanks,

Dave

  • Hi Dave,

    What is the value at address 0xD00 ?

    Regards,

    Vivek Singh

  • This is memory at 0xD00:

    0x00000D00 PieVectTable
    0x00000D00 0678 BBE0 24A8 C47E 2E8C 7D6F 6EE9 9619 364F BB3B 9A72 744D
    0x00000D0C C2B0 BAFE AB18 8AA2 35B4 381C 7434 A81C 8060 2191 CA1C 7307
    0x00000D18 884E 5AC1 3224 3794 463F 1008 5C04 060C DBEB 9D5B 6563 71B9
  • It executes about 120 instructions in Boot ROM then goes to:

    >  wd_disable() @ 0x3242e5 in DSP2833x_CodeStartBranch.asm

    >  c_int00()         @ 0x32420a

    > _system_post_cinit()  @ 0x00bf5f

    > __etext        @ __0x00bf60   here it executes the following until instruction @ 0x00bff1, which causes jumps back to Boot ROM 0x3ff9f4

      00bfec:   7A9D              MOV          *+XAR5[AR1], AR2

      00bfed:   1D05              SBBU         ACC, @0x5

      00bfee:   7C11              MOV          @0x11, AR4

      00bfef:   98DD              OR           *+XAR5[3], AL

      00bff0:   AE2F               SUB          ACC, @0x2f

      00bff1:   A1F1             .word        0xa1f1                       <--------------CAUSES JUMP TO 3ff9f4 in Boot ROM

      00bff2:   CD76BC10    AND          AH, *-SP[54], #0xbc10

    >

     3ff9f4:   561F            SETC OBJMODE

     3ff9f5:   7622           EALLOW

     3ff9f6:   B9C0          MOVZ DP, #0x1c0

     3ff9f7:   28290028 MOV @0x29, #0x0028

     3ff9f9:   761A          EDIS

     3ff9fa:   6F00         SB 0, UNC                                        <-----------------STUCK HERE IN INFINITE LOOP

  • Dave,
    the ROM sources for your devices can be found in controlSuite (C:\ti\controlSUITE\libs\utilities\boot_rom\2833x).
    You can add ROM symbols (point the CCS load to the ROM COFF file) and see what is happening. You can add ROM symbols after you load the application as well and both ROM and application symbols can co-exist to allow you to do source level debug. When needed just point CCS to the boot ROM sources directory to pick the needed source level file for the function being debugged.

    But the only change in your environment is switching to blackhawk emulator from XDS100v2?

    Best Regards
    Santosh Athuru
  • I haven't changed the emulator at all in the process. Have always used Blackhawk USB100v2. The only thing that has changed is some application source code.

    I suspect an issue in __etext where the exception occurs. Maybe an instruction alignment issue? What is __etext?
  • I can run fine when configured as Active-RAM, but not as Active-FLASH. What does this suggest?
  • Santosh,
    How do I "point the CCS load to the ROM COFF file"?
    Thx
  • in the CCS debug perspective, the run->load->load symbols menu.

    running from RAM but not from Flash means you have something linked to RAM, that gets loaded correctly in the RAM configuration build but not in flash configuration/build. Can you inspect your map file and find the section? If it has to be in executed/linked to RAM then you need to have LOAD/RUN type section assignment (like we do for RAMFUNCS in examples).

    hope this helps.

    Best Regards
    Santosh Athuru
  • We were able to program the circuit board flash successfully with our new application code when using an old laptop loaded with CCS 6.0.1.0040 and compiler TI v6.2.7. These CCS and compiler versions are not available to install any longer, but the updated versions should not kill our progress.

    There must be a way to get this to work on my PC.

    The FLASH .map files and .cmd files are identical on the laptop and the PC.

    We have LOAD/RUN similar to the RAMFUNCS example:

    SECTIONS {
    codestart     : > BEGIN, PAGE = 0
    flashfuncs   : > FLASH,
                              PAGE = 0
                             {
                                    -l rts2800_fpu32.lib <boot.obj> (.text)
                                    -l rts2800_fpu32.lib <args_main.obj> (.text)
                             }
    .text : LOAD = FLASH,
              RUN = RAML05,
              LOAD_START(_textLoadStart),
              LOAD_END(_textLoadEnd),
              RUN_START(_textRunStart),
              PAGE = 0


    .cinit : > FLASH, PAGE = 0

    .....

  • what is the current version of CCS and compilers you have where you see the problem?
    The compilers team might be able to throw some light, if it is the same application working with older version of CCS/tools but has problem with new tools.

    Let me forward this to the tools team forum.

    Best Regards
    Santosh Athuru
  • It sounds like you have placed something in FLASH that absolutely must go in RAM, but I don't see any obvious candidate.

    Do you have a breakpoint set at 0xbff1?

    Please show us the corresponding snippet of disassembly from the executable object file (usually named <something>.out). 

    It would also be helpful to see the corresponding snippet of disassembly from the relocatable object file (usually named <something>.obj)

  • The install that fails is CCS 6.2.00050 with compiler TI v6.2.0.

     Also failed with another compiler - TI v16.9.0 LTS or  TI v16.12.0 STS (not sure which I was using before switching to TI v6.2.0)

    Is there a significance to the STS and LTS?

  • Dave Marinelli15 said:
    We were able to program the circuit board flash successfully with our new application code when using an old laptop loaded with CCS 6.0.1.0040 and compiler TI v6.2.7.

    C2000 compiler version 6.2.7 is still available.  I'm unsure whether it has been tested with recent versions of CCS.  But most users have good success combining older compilers with newer CCS.  I think it is worth the attempt.  Please install compiler version 6.2.7 with your current version of CCS, and see what happens.  Directions on how to install it are in the 2nd video embedded in the wiki article Compiler Releases.

    Thanks and regards,

    -George

  • We are using CCS 6.0.2.00050 and Compiler version TI v6.2.0 which is the closest I could find to the v6.2.7 that worked on the laptop.
    Also failed with TI v16.12.0 or v16.9.0 (not sure which we were using before v6.2.0).
  • I need to see more to this test case, such as the dissasembly fragment from the executable object file, as noted above
  • Can I give you the whole .out file?
  • Is C2800 Compiler 6.2.7 compatible with the C2000 Delphino?
  • Dave Marinelli15 said:
    Can I give you the whole .out file?

    Yes.  Put it in a .zip file first.  That's because the forum limits what kinds of files can be attached to a post.  Click the Use rich formatting link in the lower right corner.  That brings up the full interface for composing a post.  To attach a file, use the paper clip icon.

    Thanks and regards,

    -George

  • Dave Marinelli15 said:
    Is C2800 Compiler 6.2.7 compatible with the C2000 Delphino?

    The compiler is only concerned with the CPU core.  So, yes.

    Thanks and regards,

    -George

  • Yes, C28x compiler version 6.2.x is compatible with Delfino

    Yes, you can give me the whole .out file. Send it to me via private message. Click on my user name, then the connect button, then send a private message.
  • sbldcToTI.zip

    Great. I'll try 6.2.7.  Thanks.  Attached is the first ~10% of the .out file.  

  • We can't operate on a fractional .out file. We'll need the whole object file
  • Reverting back to compile TI v6.2.7 results in a successful FLASH build configuration - the flash get programmed properly and system can run out of flash either with or without the emulator.

  • To summarize tools versions ... You use CCS version 6.2.0.00050.  The system fails when you use compiler version 6.2.0.  It also fails when you try either version 16.9.0.LTS or 16.12.0.STS (not sure which one).  It runs as expected when you use compiler version 6.2.7.  Please confirm that the only change among these builds is the compiler version.  Everything else, in particular the linker command file, is the same.  

    We previously requested the final executable .out file from a failing build.  It would still be helpful to get that file.

    Thanks and regards,

    -George

  • That is correct. The only thing that I changed was the compiler version.
    I'm sorry, I don't have bad .out file any longer. It has been overwritten.
    - Dave
  • Dave Marinelli15 said:
    I'm sorry, I don't have bad .out file any longer. It has been overwritten.

    I'd appreciate if you would change to a problem compiler version, build the bad .out file again, and submit it.  That is the only way to move this issue forward.

    Thanks and regards,

    -George