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.

Faced problem to convert .out file to .hex for flash burn in TMS320c6713 EVM

Hi

I am using tms320c6713 evm board. I want to flash burn for my final project. When i have tried with my sample LED program as per TI guide-line. it is working correctly. But when i want to flash burn with  my own project  program , during .cmd to .hex convertion by hex6x.exe through command prompt , it show the warning message and burning .hex code is not worikng. If i implement simple program for flash burn and by .hex convertion process, have not shown this type of warning, it is working fine.

my warning meassages are:

WARNING: section '.text' at 03000h falls in unconfigured memory (skipped)
WARNING: section '.cinit' at 085a0h falls in unconfigured memory (skipped)
WARNING: section '.const' at 0a36ch falls in unconfigured memory (skipped)

WARNING: section '.switch' at 0a6b0h falls in unconfigured memory (skipped)

like this. How to fix the warning and what are the exact meaning of this warning.

My .cmd file configuration is shown below.

/*C6713dsk_flash.cmd  Linker command file for flash*/
MEMORY
{
  VECS:        org = 0h,  len =      0x200
  BOOT:     org = 0x00000200, len = 0x200                                                      
  IRAM:     org = 0x00000400, len = 0x0002FB00
  SRAM_EXT: org = 0x80000000, len = 0x01000000
  FLASH:    org = 0x90000000, len = 0x00020000                     
}

SECTIONS
{
  "bootload" :> BOOT     /*boot section.Runs when C6713 starts*/
  .vecs      :> VECS        
  .text      :> IRAM        
  .bss       :> IRAM
  .cinit     :> IRAM
  .stack     :> IRAM
  .sysmem    :> IRAM
  .const     :> IRAM
  .switch    :> IRAM
  .far         :> IRAM
  .cio        :> IRAM
  .csldata     :> IRAM
}

If any body know the solution , kindly help me.

Wait for your kind response.

  • Hi Gopal,

    I suspect you are getting these errors because memory locations are not configured properly in .cmd file.

    Have you tried below configuration ?

    ROMS
    {
    FLASH: org = 90000000h, len = 0x3000,romwidth = 8, files = {abc.hex}
    }
  • Dear Arvind Singh

    Thanks for your kind response. Which .cmd file has been  included in my CCS project, i have shown to you.

    one things I have to clear first. Which ROMS  memory address, you have suggested for check. Is this memory for hex conversion .cmd file(like FlashBlink_ahex.cmd) ? if yes,  i have modified my .cmd(FlashBlink_ahex.cmd) file with your suggested value during hex convertion(command prompt ->hex6x FlashBlink_ahex.cmd). It show more warning like -

    WARNING: section '.vecs' at 03000h falls in unconfigured memory (skipped), WARNING: section '.bootload' at 03000h falls in unconfigured memory (skipped), WARNING: section '.text' at 03000h falls in unconfigured memory (skipped), WARNING: section '.cinit' at 085a0h falls in unconfigured memory (skipped),
    WARNING: section '.const' at 0a36ch falls in unconfigured memory (skipped), WARNING: section '.switch' at 0a6b0h falls in unconfigured memory (skipped)

    If i use my previous code for hex convertion, it show minimum number of error(see my first post).

    My first ROMS configuration was ....

    rtdx_matlabFFT.out            /* Input File: COFF file format (.out) */
    -a                          /* Output Format: ASCII Hex format (.hex) */
    -image                      /* Select image mode */
    -memwidth 8                 /* Set memory width */
    -o rtdx_matlabFFT.hex         /* Output File: ASCII Hex file (.hex) */

    ROMS
    {

      FLASH: org = 000h, len = 0x3000, romwidth = 8

    }

    One thing, i want to tell you that i have also included .asm file in my main porject(vecs_int_flash.asm) that may help you to understand what is my exact problem ...

    details of source code of vecs_int_flash.asm file is ..

    *vecs_int_flash.asm Vector file. Setup interrupt vectors and boot section for flash

    FLASH_START   .equ    0x90000400        ;flash start address
    CODE_START    .equ    0x00000400        ;start of non boot code
    CODE_SIZE     .equ    0x00003000        ;application code size in byte

       .global _vectors  ;Global symbols defined here/exported out of this file
       .global _c_int00
       .global _vector1
       .global _vector2
       .global _vector3
       .global _vector4
       .global _vector5
       .global _vector6
       .global _vector7
       .global _vector8
       .global _vector9      
       .global _vector10
    ;   .global _c_int11   
       .global _vector12  
       .global _vector13   
       .global _vector14
       .global _vector15

       .ref _c_int00    ;Global symbols referenced in this file but defined somewhere else

    VEC_ENTRY .macro addr  ;macro instantiates one entry in interrupt service table
        STW   B0,*--B15
        MVKL  addr,B0
        MVKH  addr,B0
        B     B0
        LDW   *B15++,B0
        NOP   2
        NOP   
        NOP   
       .endm

    _vec_dummy:  ;dummy interrupt service routine used to initialize the IST
      B    B3
      NOP  5

    * Actual interrupt service table (IST). Properly aligned and located in
    * subsection .text:vecs. If this section is not explicitly specified in
    * linker command file, it will default and link into .text section.
    * Remember to set the ISTP register to point to this table.

     .sect ".vecs"
     .align 1024

    _vectors:
    _vector0:   VEC_ENTRY _boot_start ;RESET to start of boot loader
                            ;to copy code from FLASH
    _vector1:   VEC_ENTRY _vec_dummy  ;NMI
    _vector2:   VEC_ENTRY _vec_dummy  ;RSVD
    _vector3:   VEC_ENTRY _vec_dummy
    _vector4:   VEC_ENTRY _vec_dummy
    _vector5:   VEC_ENTRY _vec_dummy
    _vector6:   VEC_ENTRY _vec_dummy
    _vector7:   VEC_ENTRY _vec_dummy
    _vector8:   VEC_ENTRY _vec_dummy
    _vector9:   VEC_ENTRY _vec_dummy
    _vector10:  VEC_ENTRY _vec_dummy
    ;_vector11:  VEC_ENTRY _c_int11
    _vector12:  VEC_ENTRY _vec_dummy
    _vector13:  VEC_ENTRY _vec_dummy
    _vector14:  VEC_ENTRY _vec_dummy
    _vector15:  VEC_ENTRY _vec_dummy

        .sect "bootload"
    _boot_start:
            mvkl  FLASH_START,B4         ;flash start address ->B4
            mvkh  FLASH_START,B4   
              
        mvkl  CODE_START,A4         ;apps code start address ->A4
        mvkh  CODE_START,A4
        zero  A1
        
    _boot_loop1:
        ldb   *B4++,B5               ;flash read
        mvkl  CODE_SIZE-4,B6         ;B6 = BOOT_SIZE -1024
        add   1,A1,A1                  ;A1+=1,inc outer counter
     ||   mvkh  CODE_SIZE-4,B6
        cmplt  A1,B6,B0
        nop    
        stb   B5,*A4++
        [B0]  b     _boot_loop1
        nop   5
        
        mvkl .S2 _c_int00, B0
        mvkh .S2 _c_int00, B0
        B    .S2 B0
        nop   5   

    .........................

    Hope that my above details will give more idea about hex convertion  warning.

    waiting for your kind reply ...

  • Dear Arvind Singh

    I am waiting for your kind response. I have tried with many of way, but till now , i have not solved it. Please see my last post as per my information for you to give enough idea about my .cmd code ...

    Your kind reply will be highly appreciated ...
  • Hi Gopal,
    Able to run your code through emulator ?
    Please attach your map file through "Use rich formatting" option and don't do text paste.
  • Dear Titus S

    I have not used emulator for my TMS320c6713 DSK. I have used JTAG chain for  run  also flash burn.

    I have attached two .cmd files. One .cmd file for build project and other for .hex convertion.

    kindly see the attachment..

    zip.7z

  • Hi Gopal,
    Able to run your code successfully with out any problem ?
    Can you attach the .out file (rtdx_matlabFFT.out) , I will try convert to hex file without any warning.
  • Dear

    I have run with .out file successfully many times.

    Ok, i have attached my .out file which you want. Kindly check it with hex convertion process.

    please see the attachment.out.7z

  • Hi Gopal,

    I have attached the hex file, can you please try it and let me know.

    hex.zip

  • Hi Gopal,
    Able to flash and run the hex binary on your board ?
  • Dear Titus S

    Thanks a lot for your response.

    After memory modification by you, this hex conversion process by .cmd,  has been successfully done, no warning message are shown.

    But after flash burn, no any effect by my .hex file.  but when i load my same  .out file through CCS tool, it is working successfully.

    I am really puzzled and last  two days, i have followed all my code and flash burn utility documents, i have not got any exact idea about this problem.

    But after long  try, i have got some conclusions regarding this flash burn. I have seen that in the programing code, some function and variable declaration are effacting this flash burn like 

    1. if i  delcare array variable as a global  with more than 32 size, it is not working. It is working if array shoule be declared as a local variable in main function.

    2. Self declaration function, like round() function for round any floating value is effacting this flashburn process.

    3. pow() function which is an internal function from math.h , is not work for flashburn process.

    4. if i used 'goto' statement function , after flash burn, code is not working.

    if i omit or modify all above matter, after flashburn , programing is working successfully.

    I don't know, how many programing function or concepts are effect to my flashburn process.

    If you know , any reason or  any rules guidance  about C programing code for flash burn, kindly help me to give details information.

    wait for your kind reply ..

    Regars

    Gopal ...

     

  • Dear Titus S


     Have you got my last message ?

    I am still waiting for your kind reply ...

    Please give me any suggestion if you have any idea ...

    Regards

    Gopal

  • Dear Titus S

    I am still waiting for your kind reply.

    Pls give me any idea if you have ..

    Regards

    Gopal

  • Hi Gopal,
    Sorry for the delayed response on this.
    Actually I don't have that much hands-on with this flash tool.
    Any way I will try to replicate the reported problems at my end and let me update.
    Could you please try the same with LED blink example like using "goto", "round()" and "pow()"
  • Dear Titus S

    Thanks for your response. Ok, i will try with your last suggestion with LED blink example like using "goto", "round()" and "pow()".

    I will be highly glad if you kindly report my problem at your end and inform to me...

    Regards..

    Gopal ..

  • Dear Titus S

    Today, i have tried with those function like "round()" and "pow()" in LED blink example as per your guide, this is also not working through flash burn. So, kindly see the matter.

    Regards
    Gopal ...
  • Hi Gopal,
    I'm working on it.
    What about the size of the binary with and without using "pow()" API ?
  • Dear Titus S.

    The size of the binary with and without using "pow()" is same (592KB).
    But i have seen that evaluation board flash memory size 256KB default configuration(Max 512KB).
    So, how 592 hex size file is working with out pow() function through flash burn process ?

    Regards
    Gopal ...
  • Hi Gopal,

    I have tried to work Blink code with "pow()" API and don't see any problem.

    Could you please try the following line in your cmd conversion file and update to me.

    FLASH: org = 90000000h, len =0x000040000, romwidth = 8 , files = {rtdx_matlabFFT.hex}
  • Dear  Titu S

    At first sorry for my late response. Actually last 3 days our office was off days. But i have followed your instruction on today morning  by updated .cmd fime for .hex conversion with flash memory address. But i have seen some same warning messages that i have told in my initial post. I have checked that main reason for this warning is  org = 90000000h address instead of org=000h. and flash burn is not work.

    I have attached my .c file that is basically modification of blinkDSK6713

    blink_test300915.c
    #include <stdio.h>
    #include <string.h>
    #include <math.h>
    
    #include <csl_gpio.h>
    #include <csl_gpiohal.h>
    #include <csl_chip.h>
    #include <csl_irq.h>
    #include <csl_emifhal.h>
    #include <csl_emif.h>
    
    #include "c6713dsk.h"
    #include "cpld.h"
    #include "timer.h"
    #define N 128
    #define ADDRESS 0xA0000000
    #define GBLCTL 0x01800000
    #define CE2 0x01800010
    
    extern int *ce2 = (int *)CE2;
    
    GPIO_Handle hGpio;
    
    GPIO_Config myconfig=
    { 
    	0x00000031, /* gpgc */
    	0x000000F9, /* gpen */
    	0x00000070, /* gdir */
    	0x00000082, /* gpval */
    	0x00000000, /* gphm */
    	0x00000000, /* gplm */
    	0x00000030 /* gppol */
    };
    
    
    
    
    //////////////////////////////////////////////////////////////////////////
    
    void main( void )
    {   
    
        int i,j,n,Design_decimal=0,degn_angle_x=0;
    	float err_cal_x=0, stopmotor_x=0;
    
        CSL_init();
    	
    	/* DSP initialization */
    	IRQ_globalDisable();
    
    		*ce2=0x22A28A22;		
    
    		hGpio =GPIO_open(GPIO_DEV0, GPIO_OPEN_RESET);
    
    	    GPIO_config(hGpio,&myconfig);
    
    	  	GPIO_pinEnable(hGpio, GPIO_PIN0 | GPIO_PIN1  | GPIO_PIN2  | GPIO_PIN3 | GPIO_PIN8 
    	  				        | GPIO_PIN9 | GPIO_PIN10 | GPIO_PIN11 | GPIO_PIN12 | GPIO_PIN13 | GPIO_PIN14 | GPIO_PIN15);
    
    		GPIO_pinDirection(hGpio,GPIO_PIN0,GPIO_OUTPUT);
    		GPIO_pinDirection(hGpio,GPIO_PIN1,GPIO_OUTPUT);
    		GPIO_pinDirection(hGpio,GPIO_PIN2,GPIO_OUTPUT);
    		
    		GPIO_pinDirection(hGpio,GPIO_PIN3,GPIO_OUTPUT);
    		GPIO_pinDirection(hGpio,GPIO_PIN8,GPIO_OUTPUT);
    
    		GPIO_pinDirection(hGpio,GPIO_PIN9,GPIO_OUTPUT); 	//from incremental encoder
    		GPIO_pinDirection(hGpio,GPIO_PIN10,GPIO_OUTPUT);
    
            GPIO_pinDirection(hGpio,GPIO_PIN11,GPIO_OUTPUT);		//to latch of dac
    
            GPIO_pinDirection(hGpio,GPIO_PIN12,GPIO_OUTPUT);	//loop time test
    		GPIO_pinDirection(hGpio,GPIO_PIN13,GPIO_OUTPUT);
    		GPIO_pinDirection(hGpio,GPIO_PIN14,GPIO_OUTPUT);
    		GPIO_pinDirection(hGpio,GPIO_PIN15,GPIO_OUTPUT);
    
    		GPIO_pinWrite(hGpio,GPIO_PIN15,1);  	
    		GPIO_pinWrite(hGpio,GPIO_PIN14,1);  	
    		GPIO_pinWrite(hGpio,GPIO_PIN13,1);  	
    		GPIO_pinWrite(hGpio,GPIO_PIN12,1);
    		GPIO_pinWrite(hGpio,GPIO_PIN11,1);  	
    		GPIO_pinWrite(hGpio,GPIO_PIN10,1);  	
    		GPIO_pinWrite(hGpio,GPIO_PIN9,1);  	
    		GPIO_pinWrite(hGpio,GPIO_PIN8,1); 
    		GPIO_pinWrite(hGpio,GPIO_PIN3,1);  	
    
    
    	for(i=0;i<32;i++)
    	{
    	    IRQ_disable(i);   /* Disable and clear all IRQ events    */
    	    IRQ_clear(i);     /* except reset and NMI interrupts     */
    	}
    
    
    
        PLL_Init();
        EMIF_Init();
        TIMER_Init();
    
    for(i=0;i<3;i++)
    {
    
    			GPIO_pinWrite(hGpio,GPIO_PIN15,0);			//Supply +V to DAC
    			GPIO_pinWrite(hGpio,GPIO_PIN10,0);			//Supply +V to DAC
    			TIMER_DelayMsec( 100 );
    			GPIO_pinWrite(hGpio,GPIO_PIN15,1);			//Supply +V to DAC
    			GPIO_pinWrite(hGpio,GPIO_PIN10,1);			//Supply +V to DAC
    			//DSK6713_waitusec(227 * 100);
    			TIMER_DelayMsec( 100 );
    }
    
    
    //start1:    
    
        CPLD_LedOff( LED_ALL );
        TIMER_DelayMsec( 100 );
        CPLD_LedOn( LED_ALL );
        TIMER_DelayMsec( 500 );
        
        // Very simple Led test.  Turn them all off then on
        // one at a time, then off one at a time.
      	CPLD_LedOff( LED_ALL );
        
        for(j=0;j<3;j++)
        {
    	    for( i=0; i<LED_AVAILABLE; i++ )
    	    {
    	    	CPLD_LedOn( LED_0 << i );
    	    	TIMER_DelayMsec( 10 );
    	    }
    	    
    	    for( i=0; i<LED_AVAILABLE; i++ )
    	    {
    	    	CPLD_LedOff( LED_0 << i );
             	TIMER_DelayMsec( 10 );	    	
    	    }
            
            TIMER_DelayMsec( 50 );	    	
    	}
    
    	TIMER_DelayMsec(1000 );	
    
    	Design_decimal = 10 +  pow(2,5);
    
    	//==================================== Drive angle Count value for  X axis(Az)====================//
    		degn_angle_x=18;
    		err_cal_x = ((float) 36000) / ((float) (36000-421));    // (1.011235);//(360/356);//1.011833 at 100 rotations
    		//stopmotor_x = round((degn_angle_x/(float)360) * (err_cal_x * 19 * 32 * 4 * 1));  //19:1/157:1 motor
    
    
    //for(i=0;i<3;i++)
    while(1)
    {
    
    			GPIO_pinWrite(hGpio,GPIO_PIN15,0);			//Supply +V to DAC
    			GPIO_pinWrite(hGpio,GPIO_PIN10,0);			//Supply +V to DAC
    			TIMER_DelayMsec( 100 );
    			GPIO_pinWrite(hGpio,GPIO_PIN15,1);			//Supply +V to DAC
    			GPIO_pinWrite(hGpio,GPIO_PIN10,1);			//Supply +V to DAC
    			//DSK6713_waitusec(227 * 100);
    			TIMER_DelayMsec( 100 );
    			
    }
    
    
    //	goto start1;
    
    }
    
    sample examle code as per your suggestion.(Kindly see the attachment)

    Again , i want to say that i am useing ccs3.1 and flash burn ver 5.90.0.110 which were got with Evaluation kit "tms320c6713 dsk."

    Hope that above information will help  you to get  final solution regarding my problem.

    regards

    gopal ...

  • How did you convert ?

    Command line or CCS itself ?

    I have converted through command line.

    C:\Users\Titus\Desktop\DSK6713\BlinkDSK6713\Debug> hex6x.exe BlinkDSK6713_hex.

    cmd

    Translating to ASCII-Hex format...

      "BlinkDSK6713.out"   ==> vectors

      "BlinkDSK6713.out"   ==> bootload

      "BlinkDSK6713.out"   ==> .text

      "BlinkDSK6713.out"   ==> .cinit

      "BlinkDSK6713.out"   ==> .const

    C:\Users\Titus\Desktop\DSK6713\BlinkDSK6713\Debug>

    I'm attaching the complete project, try it and let me know.

    0005.DSK6713.zip

  • Dear Titus S.

    Thank you for your quick response.
    Ok, i am checking with your project sample and i will feedback to you tommorow morning.

    Regards
    Gopal ..
  • Dear Titus S.

    At last , i assume that trouble of this flash burn process which i have faced last one and half month, some part has been solved by you suggestion and some time , some tripical result has come out through flash burn. I have said to you about my problem regarding pow(), found() etc, these are some time working or some time not working at last. I have tried many of way , with also your suggested guide, i have not found any logical cause.
    I am working with this platform since last 5 years, after my project completion, during my final flash burn process, i have falled in big touble. I have not found any Ti flash burning guide from ti site by which i can solve or configure my self. But problem is that what i should do next. Through this CCS tool, all .out file is executing correctly but through flash burn some time, it is working correctly, or some time give some abnormal behavior. That make to me worried enough.
    So, guided and suggested to me, what should i do next with Ti environment.

    Regards.
    Gopal