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.

Boot from EEPROM in C6701

Other Parts Discussed in Thread: TMS320C6701

Hi,

I have written a program which blinks an LED on TMS320c6701 processor. Using JTAG it works fine.

Now I am trying to flash/load same program from EEPROM after power ON. I am new on this ,Please can somebody help me on this how to proceed.

 

Steps I followed:

1      Converted the .out file to .bin (followed  instructions from <http://e2e.ti.com/support/development_tools/compiler/f/343/p/154409/559825> )

2.   Wrote this bin data to the EEPROM using a separate code.

4.    Reset the board

 

The BOOTMODE configuration on the hardware is 10101(MAP1 with 16bit ROM).

 The processor I am using is TMS320C6701. Most materials available online uses Flash Burn with support DSK, etc.

A custom built board is not supported in the free version.

 

Thanks in advance

 

  • Hi Goher,
    Could you please tell us why do you are working with this old processor ?
    Are you a student or an Engineer ?
    I would like to suggest to use latest C6748 LCDK board which has a lot of documents and everything.
    I will discuss with experts who worked on this processor already.
    Thanks for your patience.
  • Goher,

    Yes, Flashburn is the programming method that we support. Anything else will be supported by you.

    There is no problem stated in your post. How can we help you?

    You may want to go to our TI Wiki Pages and search for "debug boot issues" (no quotes).

    Regards,
    RandyP

  • Hi Stalin,

    Sorry for late reply and thank you for your response, My project guide suggested this processor. I have two board where one board is TMS320C6713 DSK and another one is custom board TMS320C6701.
    1. In TMS320C6713 DSK I am able to load and flash my led (which blink an led) program when my target configuration is dsk6713. If I change my target configuration to TMS320C6713 same code is not working.

    What will be the cause?? (I copied the secondary boot loader .asm file from BlinkDSK6713 example. ).
    I don’t know how to write secondary boot loader for NON- BIOS system. Please help me on this.

    2. In TMS320C6701 I used below configuration .

    /* ----Linker.cmd----------------*/

    MEMORY
    {

    IRAM: o = 0x00000000 l = 0x0000FFFF
    IDRAM: o = 0x80000000 l = 0xFFFF
    SRAM: o = 0x400000 l = 0x01000000
    CE1_TEXT: o = 0x01400000 l = 0x760
    CE1_CINIT: o = 0x01400760 l=0x3EFFFF

    }
    SECTIONS
    {

    .text : load=CE1_TEXT, run=IRAM
    .stack > IRAM
    .bss > IRAM
    .cio > IRAM
    .const : load=CE1_CINIT, run=IRAM
    .cinit : load=CE1_CINIT, run=IRAM
    .data : load=CE1_CINIT, run=IRAM
    .switch : load=CE1_CINIT, run=IRAM// > IRAM
    .sysmem > IRAM
    .far > IRAM
    .args > IRAM
    .ppinfo > IRAM
    .ppdata > IRAM

    /* COFF sections */
    // .pinit > IRAM


    /* EABI sections */
    /* .binit > IRAM
    .init_array > IRAM
    .neardata > IRAM
    .fardata > IRAM
    .rodata > IRAM
    .c6xabi.exidx > IRAM
    .c6xabi.extab > IRAM
    }

    /*------------hexutility_argument.cmd------------------*/
    LED_BLINK2_MAP1.out
    -a
    -image
    -memwidth 16
    ROMS
    {
    FLASH: org = 0x01400000, len = 0x20000, romwidth = 16, files = {6701.hex}
    }

    Is it required to write a secondary boot loader for my TMS320C6701 (custom board). If yes, Please let me know the procedure for the same.
    Please let me know the procedure I followed, whether is correct or not. Any help will be appreciated.

    Regard
    Goher
  • Hi Goher,

    1. In TMS320C6713 DSK I am able to load and flash my led (which blink an led) program when my target configuration is dsk6713. If I change my target configuration to TMS320C6713 same code is not working.

    Is the above statement correct ?

    Do you want to use the same code for C6713 and C6701 with different config ?
  • Hi Stalin,

    No, I state that , Code is working with DSK6713 but not with TMS320C6713 target configuration .
    If it work for TMS320C6713 without JTAG , then I can try on TMS320C6701.

    Regards
    Goher
  • Hi Goher,

    Thanks for the clarification.
    Which JTAG (emulator) are you using ?

    on-board emulator or external emulator ?

    You might know, DSKC6713 board has on-board emulator.

    It should work with both TMS320C6713 and DSKC6713 configuration.
    What error are you getting with TMS320C6713 configuration ?

    Have you given correct configuration ?
  • "Which JTAG (emulator) are you using ?"
    Ans :BlackHawk XDS560v2 USB Sytem Trace Emulator. (This is the emulator which we are using).
    "What error are you getting with TMS320C6713 configuration ?"
    Ans: When I am trying to flash my .hex file using flashburn 4.01 it giving below error with TMS320C6713
    Error: Write failed :Starting Address is outside of range
    Please see the below configuration for 6713
    /*----------6713_linker.cmd -----*/

    MEMORY
    {
    vecs: o = 00000000h l = 00000200h
    boot: o = 00000200h l = 00000400h
    IRAM: o = 00000600h l = 0000FA00h
    CE0: o = 80000000h l = 01000000h
    FLASHBOOT: o = 90000000h l = 00000400h
    FLASH: o = 90000400h l = 0x1FC00

    }

    SECTIONS
    {
    "vectors" : {} > FLASHBOOT run = IRAM //vecs
    "bootload" : {} > FLASHBOOT run = IRAM //boot
    .text : {} > FLASH run = IRAM, LOAD_START(FLASH_TEXT_START), RUN_START(RAM_TEXT_START), SIZE(TEXT_SIZE)
    .cinit : {} > FLASH run = IRAM, LOAD_START(FLASH_CINIT_START), RUN_START(RAM_CINIT_START), SIZE(CINIT_SIZE)
    .const : {} > FLASH run = IRAM, LOAD_START(FLASH_CONST_START), RUN_START(RAM_CONST_START), SIZE(CONST_SIZE)
    .switch : {} > FLASH run = IRAM, LOAD_START(FLASH_SWITCH_START), RUN_START(RAM_SWITCH_START), SIZE(SWITCH_SIZE)
    .tables : {} > FLASH run = IRAM, LOAD_START(FLASH_TABLES_START), RUN_START(RAM_TABLES_START), SIZE(TABLES_SIZE)
    .stack : {} > IRAM
    .bss : {} > IRAM
    .data : {} > IRAM
    .far : {} > IRAM
    .sysmem : {} > IRAM
    .cio : {} > IRAM
    }


    /*-----------hexutility.cmd----------------*/
    6713_BOOT_EPROM.out
    -a
    -image
    -memwidth 8
    -map 6713_BOOT_EPROM.map
    ROMS
    {
    FLASH: org = 0x90000000, len = 0x3000,romwidth = 8, files = {Blink_eprom.hex}
    }

    Regards
    Goher
  • Hi Goher,

    You must select the "DSKC6713" configuration because it has selected correct gel file by default.

    If you want to use "TMS320C6713" target configuration then you have to open the configuration and give the gel file location.

    DSKC6713 Configuration (gel file is given correctly)

    TMS320C6713 Configuration (gel file is missing)

  • Hi Stalin,
    Thank you so much, it’s worked with your input. I was missing to provide gel file when I changing the target configuration from DSK6713 to TMS320C6713.
    But I am sure I am providing gel file for TMS320C6701, But it is not working.
    I need to ask you how to generate .asm file in CCS for NON-BIOS system.
    Please find the secondary boot loader for DSK6713 (BIOS) .asm file which is working in TMS320C6713.
    /*------------6713.asm-----------------*/
    .ref _c_int00
    .global RESET_RST
    .ref FLASH_TEXT_START
    .ref RAM_TEXT_START
    .ref TEXT_SIZE
    .ref FLASH_CINIT_START
    .ref RAM_CINIT_START
    .ref CINIT_SIZE
    .ref FLASH_CONST_START
    .ref RAM_CONST_START
    .ref CONST_SIZE
    .ref FLASH_SWITCH_START
    .ref RAM_SWITCH_START
    .ref SWITCH_SIZE
    .ref FLASH_TABLES_START
    .ref RAM_TABLES_START
    .ref TABLES_SIZE

    .sect "vectors"
    RESET_RST:

    NOP ; mvkl .S2 _c_int00, B0
    NOP ; mvkh .S2 _c_int00, B0
    NOP ; B .S2 B0
    NOP
    NOP
    NOP
    NOP
    NOP

    NMI_RST:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    RESV1:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    RESV2:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT4:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT5:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT6:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT7:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT8:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT9:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT10:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT11:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT12:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT13:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT14:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    INT15:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

    .sect "bootload"

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Copy the .text section from FLASH_TEXT_START to RAM_TEXT_START
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    _boot_start:
    mvkl FLASH_TEXT_START,B4 ; B4 <- FLASH_TEXT_START
    mvkh FLASH_TEXT_START,B4
    mvkl RAM_TEXT_START,A4 ; A4 <- RAM_TEXT_START
    mvkh RAM_TEXT_START,A4
    zero A1
    _boot_loop1:
    ldb *B4++,B5 ; Read Flash
    mvkl TEXT_SIZE,B6 ; B6 <- TEXT_SIZE
    add 1,A1,A1
    || mvkh TEXT_SIZE,B6
    cmplt A1,B6,B0 ; Compare Size
    nop
    stb B5,*A4++ ; Store RAM
    [B0] b _boot_loop1
    nop 5


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Copy the .cinit section from FLASH_CINIT_START to RAM_CINIT_START
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    mvkl FLASH_CINIT_START,B4 ; B4 <- FLASH_CINIT_START
    mvkh FLASH_CINIT_START,B4
    mvkl RAM_CINIT_START,A4 ; A4 <- RAM_TEXT_START
    mvkh RAM_CINIT_START,A4
    zero A1
    _boot_loop2:
    ldb *B4++,B5 ; Read Flash
    mvkl CINIT_SIZE,B6 ; B6 <- CINIT_SIZE
    add 1,A1,A1
    || mvkh CINIT_SIZE,B6
    cmplt A1,B6,B0 ; Compare Size
    nop
    stb B5,*A4++ ; Store RAM
    [B0] b _boot_loop2
    nop 5


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Copy the .const section from FLASH_CONST_START to RAM_CONST_START
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    mvkl FLASH_CONST_START,B4 ; B4 <- FLASH_CONST_START
    mvkh FLASH_CONST_START,B4
    mvkl RAM_CONST_START,A4 ; A4 <- RAM_CONST_START
    mvkh RAM_CONST_START,A4
    zero A1
    _boot_loop3:
    ldb *B4++,B5 ; Read Flash
    mvkl CONST_SIZE,B6 ; B6 <- CONST_SIZE
    add 1,A1,A1
    || mvkh CONST_SIZE,B6
    cmplt A1,B6,B0 ; Compare Size
    nop
    stb B5,*A4++ ; Store RAM
    [B0] b _boot_loop3
    nop 5


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Copy the .switch section from FLASH_SWITCH_START to RAM_SWITCH_START
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    mvkl FLASH_SWITCH_START,B4 ; B4 <- FLASH_SWITCH_START
    mvkh FLASH_SWITCH_START,B4
    mvkl RAM_SWITCH_START,A4 ; A4 <- RAM_SWITCH_START
    mvkh RAM_SWITCH_START,A4
    zero A1
    _boot_loop4:
    ldb *B4++,B5 ; Read Flash
    mvkl SWITCH_SIZE,B6 ; B6 <- SWITCH_SIZE
    add 1,A1,A1
    || mvkh SWITCH_SIZE,B6
    cmplt A1,B6,B0 ; Compare Size
    nop
    stb B5,*A4++ ; Store RAM
    [B0] b _boot_loop4
    nop 5


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Copy the .tables section from FLASH_SWITCH_START to RAM_SWITCH_START
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    mvkl FLASH_TABLES_START,B4 ; B4 <- FLASH_TABLES_START
    mvkh FLASH_TABLES_START,B4
    mvkl RAM_TABLES_START,A4 ; A4 <- RAM_TABLES_START
    mvkh RAM_TABLES_START,A4
    zero A1
    _boot_loop5:
    ldb *B4++,B5 ; Read Flash
    mvkl TABLES_SIZE,B6 ; B6 <- TABLES_SIZE
    add 1,A1,A1
    || mvkh TABLES_SIZE,B6
    cmplt A1,B6,B0 ; Compare Size
    nop
    stb B5,*A4++ ; Store RAM
    [B0] b _boot_loop5
    nop 5


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Branch to application start
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    mvkl .S2 _c_int00, B0
    mvkh .S2 _c_int00, B0
    B .S2 B0
    nop 5

    Please let me know how to create such assembly file for my custom board TMS320C6701 which has 16 bit E2PROM.
    Regards
    Goher
  • Goher,

    Which memory map are you using in the C6701 boot process?

    Have you tried using the same assembly file as shown above for the C6713? It looks like generic C6000 code that should work fine.

    Do you have the same size Flash on both boards, especially the same width?

    Have you looked at the boot application notes and user guides to understand the differences between the two devices in terms of how they boot from Flash?

    Have you made adjustments for the different addresses used by the two devices? The C6701 Flash is at a different address than the C6713 Flash.

    Regards,
    RandyP
  • Hi RandyP,

    “Have you tried using the same assembly file as shown above for the C6713? It looks like generic C6000 code that should work fine.”

    Yes, I tried with same assembly file for TMS320C6701 getting below errors:
    Unresolved symbol CINIT_SIZE, first referenced in ./6713.obj
    Unresolved symbol CONST_SIZE, first referenced in ./6713.obj , similarly for all the .ref Variables.

    “Do you have the same size Flash on both boards, especially the same width?”

    No, Sorry for misunderstanding. In TMS320C6713 I used flash which is 8 bit in size (memwidth 8) and In TMS320C6701 I am using E2PROM which is 16 bit in size (memwidth 16).

    “Have you looked at the boot application notes and user guides to understand the differences between the two devices in terms of how they boot from Flash?”

    Yes, In 6713 EDMA will copy 1Kbytes of data from FLASH to Your internal memory (address 0).
    In 6701 DMA will copy 64Kbytes of data from E2PROM to internal RAM (address 0) through EMIF.

    “Have you made adjustments for the different addresses used by the two devices? The C6701 Flash is at a different address than the C6713 Flash.”

    Yes,If you see my previous post I given linker file as well as hex utility .cmd file and I take care of different address .

    For 6713,
    FLASH address is :
    FLASHBOOT: o = 90000000h l = 00000400h
    FLASH: o = 90000400h l = 0x1FC00

    For 6701,
    EEPROM address is:
    E2PROM_FLASH: o = 0x01400000 l = 0xFFFF , I defined these addresses from TMS320C620x/C670x DSP Boot Modes and Configuration Reference Guide( www.ti.com/.../spru642.pdf ),

    BOOT MODE: 10101
    MAP 1 Internal 16-bit ROM with default timings

    Please let me know if any changes is required?

    Thanks and Regards
    Goher
  • Goher,

    Just FYI on posting, if you would like to copy/quote the previous poster's words into a box for you to comment on or answer a question, you can use the Rich formatting option. When you click the Use rich formatting link, it will show you all of the post to which you are replying and give you an assortment of formatting options. At the end of the previous post, just above your Rich text format edit box, there is a Quote link. If you select a line of text or anything in the displayed post and then click that Quote link, the editor will insert a quote box with that selected text copied into the quote box. It could save some time, but only if you like using it. Just an option.

    Goher Hussain said:
    Yes, I tried with same assembly file for TMS320C6701 getting below errors:
    Unresolved symbol CINIT_SIZE, first referenced in ./6713.obj
    Unresolved symbol CONST_SIZE, first referenced in ./6713.obj , similarly for all the .ref Variables.

    To avoid confusion, please change the name of the assembly file in the C6701 project. I recommend starting the file name with a letter, maybe out of habit, like C6701.asm.

    The project that you build with this assembly file included should have your actual application, also. With that application, there would be a .cinit section and a .const section, and all the others. These are then defined by the statements in the linker .cmd file that define these symbols during the linking process and then they are supplied to the assembly code. It appears you are doing things differently than with your C6713 project, so you should replicate more things to get it to match.

    Regards,
    RandyP