TMS320F280033: code doesn't boot from flash

Part Number: TMS320F280033


Hi,

I have had difficulties programming the F280033 part for my project (see this topic). The recommended solution was to change the .cmd file, which I did according to recommendations.

However, the device doesn't boot from flash, even though the boot pin are configured properly (GPIOs 24 and 32 pulled up). 

I was recommended this topic, which suggests that the modified .cmd file is not compatible with bootloader address.

Would it be possible to provide me with the required steps and modifications to get the part to properly boot from flash ?

Thanks in advance, 

Adrien

  • Hi Adrien,

    Can you please share the linker cmd file for analysis?

    Did you try out any examples from the SDKin flash configuration with the boot pins as "Boot from Flash"

    Thanks

    Aswin

  • Hi Aswin,

    Here is the cmd file I have used.

    /*
       Copyright (c) 2019-2021 by Plexim GmbH
       All rights reserved.
    
       A free license is granted to anyone to use this software for any legal
       non safety-critical purpose, including commercial applications, provided
       that:
       1) IT IS NOT USED TO DIRECTLY OR INDIRECTLY COMPETE WITH PLEXIM, and
       2) THIS COPYRIGHT NOTICE IS PRESERVED in its entirety.
    
       THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
       OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
       FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
       AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
       LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
       OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
       SOFTWARE.
     */
    
    MEMORY
    {
       BEGIN          : origin = 0x088000, length = 0x000002
       BOOT_RSVD      : origin = 0x00000002, length = 0x00000126
       RAMM0          : origin = 0x00000128, length = 0x000002D8
       RAMM1          : origin = 0x00000400, length = 0x000003F8
       // RAMM1_RSVD  : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    
       BOOTROM          : origin = 0x003F8000, length = 0x00007FC0
       SECURE_ROM       : origin = 0x003F2000, length = 0x00006000
       RESET            : origin = 0x003FFFC0, length = 0x00000002
    
       RAMLS	         : origin = 0x008000, length = 0x003F00
       //RAMLS0       : origin = 0x008000, length = 0x000800
       //RAMLS1       : origin = 0x008800, length = 0x000800
       //RAMLS2       : origin = 0x009000, length = 0x000800
       //RAMLS3       : origin = 0x009800, length = 0x000800
       //RAMLS4       : origin = 0x00A000, length = 0x000800
       //RAMLS5       : origin = 0x00A800, length = 0x000800
       //RAMLS6       : origin = 0x00B000, length = 0x000800
       //RAMLS7       : origin = 0x00B800, length = 0x000800
       RAMLS7_RSVD    : origin = 0x00BF00, length = 0x000100  // JTAG communication buffer
    
       // we do not utilize any RAMGS RAM, as this memory is used for page 0
       // by the "ram_lnk" configuration
    
       //RESET          : origin = 0x3FFFC0, length = 0x000002
    
       //BEGIN          : origin = 0x080000, length = 0x000002     // Flash Bank 0
          /* Flash sectors */
       /* BANK 0 */
       FLASH_BANK0	    : origin = 0x088002, length = 0x007FFE	/* on-chip Flash */ 
       //FLASH_BANK0_SEC0  : origin = 0x080002, length = 0x000FFE
       //FLASH_BANK0_SEC1  : origin = 0x081000, length = 0x001000
       //FLASH_BANK0_SEC2  : origin = 0x082000, length = 0x001000
       //FLASH_BANK0_SEC3  : origin = 0x083000, length = 0x001000
       //FLASH_BANK0_SEC4  : origin = 0x084000, length = 0x001000
       //FLASH_BANK0_SEC5  : origin = 0x085000, length = 0x001000
       //FLASH_BANK0_SEC6  : origin = 0x086000, length = 0x001000
       //FLASH_BANK0_SEC7  : origin = 0x087000, length = 0x001000
       // FLASH_BANK0_SEC8  : origin = 0x088000, length = 0x001000
       // FLASH_BANK0_SEC9  : origin = 0x089000, length = 0x001000
       // FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000
       // FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000
       // FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000
       // FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000
       // FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000
       // FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x001000
    
       /* BANK 1 */
       FLASH_BANK1_SEC0  : origin = 0x090000, length = 0x001000
       FLASH_BANK1_SEC1  : origin = 0x091000, length = 0x001000
       FLASH_BANK1_SEC2  : origin = 0x092000, length = 0x001000
       FLASH_BANK1_SEC3  : origin = 0x093000, length = 0x001000
       FLASH_BANK1_SEC4  : origin = 0x094000, length = 0x001000
       FLASH_BANK1_SEC5  : origin = 0x095000, length = 0x001000
       FLASH_BANK1_SEC6  : origin = 0x096000, length = 0x001000
       FLASH_BANK1_SEC7  : origin = 0x097000, length = 0x001000
       // FLASH_BANK1_SEC8  : origin = 0x098000, length = 0x001000
       // FLASH_BANK1_SEC9  : origin = 0x099000, length = 0x001000
       // FLASH_BANK1_SEC10 : origin = 0x09A000, length = 0x001000
       // FLASH_BANK1_SEC11 : origin = 0x09B000, length = 0x001000
       // FLASH_BANK1_SEC12 : origin = 0x09C000, length = 0x001000
       // FLASH_BANK1_SEC13 : origin = 0x09D000, length = 0x001000
       // FLASH_BANK1_SEC14 : origin = 0x09E000, length = 0x001000
       // FLASH_BANK1_SEC15 : origin = 0x09F000, length = 0x001000
    
      /* BANK 2 */
       // FLASH_BANK2_SEC0  : origin = 0x0A0000, length = 0x001000
       // FLASH_BANK2_SEC1  : origin = 0x0A1000, length = 0x001000
       // FLASH_BANK2_SEC2  : origin = 0x0A2000, length = 0x001000
       // FLASH_BANK2_SEC3  : origin = 0x0A3000, length = 0x001000
       // FLASH_BANK2_SEC4  : origin = 0x0A4000, length = 0x001000
       // FLASH_BANK2_SEC5  : origin = 0x0A5000, length = 0x001000
       // FLASH_BANK2_SEC6  : origin = 0x0A6000, length = 0x001000
       // FLASH_BANK2_SEC7  : origin = 0x0A7000, length = 0x001000
       // FLASH_BANK2_SEC8  : origin = 0x0A8000, length = 0x001000
       // FLASH_BANK2_SEC9  : origin = 0x0A9000, length = 0x001000
       // FLASH_BANK2_SEC10 : origin = 0x0AA000, length = 0x001000
       // FLASH_BANK2_SEC11 : origin = 0x0AB000, length = 0x001000
       // FLASH_BANK2_SEC12 : origin = 0x0AC000, length = 0x001000
       // FLASH_BANK2_SEC13 : origin = 0x0AD000, length = 0x001000
       // FLASH_BANK2_SEC14 : origin = 0x0AE000, length = 0x001000
       // FLASH_BANK2_SEC15 : origin = 0x0AF000, length = 0x000FF0
    
       //FLASH_BANK0_SEC15_RSVD     : origin = 0x0AFFF0, length = 0x000010  /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    
    }
    
    SECTIONS
    {
       scope            : > RAMLS, ALIGN(2)
       step             : > FLASH_BANK0, ALIGN(4)
       dispatch         : > FLASH_BANK0, ALIGN(4)
    
       codestart        : > BEGIN, ALIGN(4)
       .text            : > FLASH_BANK0, ALIGN(4)
       .cinit           : > FLASH_BANK0, ALIGN(4)
       .switch          : > FLASH_BANK0, ALIGN(4)
    
       .stack           : > RAMM1 | RAMLS
    
    #if defined(__TI_EABI__)
       .init_array      : > FLASH_BANK0, ALIGN(4)
       .const           : > FLASH_BANK0, ALIGN(4)
       .bss             : > RAMLS
       .bss:output      : > RAMLS
       .bss:cio         : > RAMLS
       .data            : > RAMLS
       .sysmem          : > RAMLS
    #else
       .pinit           : > FLASH_BANK0, ALIGN(4)
       .econst          : > FLASH_BANK0, ALIGN(4)
       .cio             : > FLASH_BANK0, ALIGN(4)
       .ebss            : > RAMLS
       .esysmem         : > RAMLS
    #endif
    
        GROUP      : LOAD = FLASH_BANK0,
                    RUN = RAMLS,
    #if defined(__TI_EABI__)
                    LOAD_START(RamfuncsLoadStart),
                    LOAD_END(RamfuncsLoadEnd),
                    RUN_START(RamfuncsRunStart),
                    LOAD_SIZE(RamfuncsLoadSize),
    #else
                    LOAD_START(_RamfuncsLoadStart),
                    LOAD_END(_RamfuncsLoadEnd),
                    RUN_START(_RamfuncsRunStart),
                    LOAD_SIZE(_RamfuncsLoadSize),
    #endif
                    ALIGN(4)
       {
          ramfuncs
          .TI.ramfunc
       }
       .reset           : > RESET, TYPE = DSECT /* not used, */
     }
    

    It is a modified version of the default F280039 cmd file provided by Plexim as part of their C2000 code generation package. I modified it according to this discussion thread.

    To the best of my knowledge, all examples in the SDK use default TI F28003x cmd file, which is not compatible with the F280033. Hence the aforementioned discussion thread.

    Best regards,

    Adrien

  • Hi Aswin,

    Sorry to insist, but this matter has become very, very urgent. I am supposed to ship a working prototype to my client next week, and having to reprogram the microcontroller afer every power cylce doesn't fit the definition of "working prototype".

    Moreover, if you include the original post (here), in which I now understand I was given only half of the solution to my issue, the problem has been going on for 6 months.

    Please, I really need this issue fixed, and quickly !

    Adrien

  • Hi,

    A colleague found this thread, that seems to correspond to my issue.

    Applying the proposed fix seems to work. However, once applied, this doesn't translate to future boards that would be programmed

    --> How can this be done automatically each time a board is programmed ?

    --> How can I make it transparent for my colleagues (ie is there a file somewhere that is git-able that would apply the fix) ?

    Thanks in advance,

    Adrien

  • Hi,

    Any idea how I can get this done, please ?

    Thanks in advance,

    Adrien

  • Hi Adrien,

    Let me loop apps experts on this.

    Thanks

    Aswin

  • Adrien,

    Please take a look at this app note https://www.ti.com/lit/ug/sprujh3/sprujh3.pdf  specifically section 5.5 Writing Values in the OTP Using the Flash API Plugin on page 55.  This gives the instructions to modify both your main.c and .cmd file to include the needed modifications you mentioned above for OTP in the .out file, so that when the code is loaded it will also program the OTP.

    Let me know if you have further questions.

    Best,

    Matthew

  • Hi Matthew,

    Thanks, that worked perfectly.

    Best regards,

    Adrien

  • Hi Aswin, Matthew,

    Thank you for your help. Closing this case as agreed with the customer.


    Best regards,
    François.