DSPRelated.com
Forums

booting problem

Started by raja nayaka January 22, 2003

Hello C6x Pals
   I am using a custom C6211 DSP board. I have written a simple application to
write a 32 bit data into the extrnal RAM. Here is my map file.

I want to fuse this code into the ROM ( 128Kx8). The Rom is connected at
CE1 space and the DSP is in little endian mode.

I have wriiten the custom boot code as follows ( below the map file).
I want to know as what are the various sections that I need to copy
from the ROM to the onchip memory using QDMA.
( The DSP 6211 copies 1Kb code from CE1 space to on chip memory).

I tried copying the .text and .cinit sections ..but the code is not getting
executed on reset.

can any one suggest as what sections i need to copy onchip so that the code executes..

whats the problem with this code?
( I have also included my linker file below)

 

Thanking you

R.J.Nayaka
Scientist Core R&D,
CTI Group,
IT ILTD
Bangalore
India
www.itiltd-india.com


******************************************************************************
          TMS320C6x COFF Linker PC Version 4.10               
******************************************************************************
>> Linked Thu Jan 20 15:47:27 2000

OUTPUT FILE NAME:   <main.out>
ENTRY POINT SYMBOL: "_c_int00"  address: 000007a0


MEMORY CONFIGURATION

                  name            origin    length      used    attr    fill
         ----------------------  --------  ---------  --------  ----  --------
         VECS                    00000000   00000200  00000120  RWIX
         PMEM                    00000200   00007e00  00000700  RWIX
         DMEM                    00008000   00007e00  000002e8  RWIX
         CE0                     80000000   01000000  00000000  RWIX
         CE1VECS                 90000000   00000200  00000120  RWIX
         CE1PMEM                 90000200   00007e00  00000700  RWIX
         CE1init                 90008000   00007e00  00000054  RWIX


SECTION ALLOCATION MAP

 output                                  attributes/
section   page    origin      length       input sections
--------  ----  ----------  ----------   ----------------
.boot_load   0    90000000    00000120     RUN ADDR = 00000000
                  90000000    00000120     boot.obj (.boot_load)

.text      0    90000200    00000700     RUN ADDR = 00000200
                  90000200    00000260     rts6201.lib : memcpy.obj (.text)
                  90000460    00000000     boot.obj (.text)
                  90000460    00000240     rts6201.lib : exit.obj (.text)
                  900006a0    00000100                 : autoinit.obj (.text)
                  900007a0    000000a0                 : boot.obj (.text)
                  90000840    00000080     test.obj (.text)
                  900008c0    00000040     rts6201.lib : _lock.obj (.text)

.cinit     0    90008000    00000054     RUN ADDR = 00008000
                  90008000    0000002c     rts6201.lib : exit.obj (.cinit)
                  9000802c    00000004     --HOLE-- [fill = 00000000]
                  90008030    0000001c                 : _lock.obj (.cinit)
                  9000804c    00000008     --HOLE-- [fill = 00000000]

.const     0    00008000    00000000     UNINITIALIZED

.data      0    00008000    00000000     UNINITIALIZED
                  00008000    00000000     boot.obj (.data)
                  00008000    00000000     rts6201.lib : memcpy.obj (.data)
                  00008000    00000000                 : autoinit.obj (.data)
                  00008000    00000000                 : _lock.obj (.data)
                  00008000    00000000                 : exit.obj (.data)
                  00008000    00000000                 : boot.obj (.data)
                  00008000    00000000     test.obj (.data)

.cio       0    00008000    00000000     UNINITIALIZED

.far       0    00008054    00000094     UNINITIALIZED
                  00008054    0000008c     rts6201.lib : exit.obj (.far)
                  000080e0    00000008                 : _lock.obj (.far)

.stack     0    000080e8    00000200     UNINITIALIZED
                  000080e8    00000000     rts6201.lib : boot.obj (.stack)

.bss       0    00008000    00000000     UNINITIALIZED
                  00008000    00000000     boot.obj (.bss)
                  00008000    00000000     rts6201.lib : memcpy.obj (.bss)
                  00008000    00000000                 : autoinit.obj (.bss)
                  00008000    00000000                 : _lock.obj (.bss)
                  00008000    00000000                 : exit.obj (.bss)
                  00008000    00000000                 : boot.obj (.bss)
                  00008000    00000000     test.obj (.bss)

.sysmem    0    00008000    00000000     UNINITIALIZED


GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name

address    name
--------   ----
00008000   $bss
00008000   .bss
00008000   .data
00000200   .text
00000688   C$$EXIT
00000200   __STACK_SIZE
00008000   ___bss__
00008000   ___cinit__
00008000   ___data__
00008000   ___edata__
00008000   ___end__
00000900   ___etext__
ffffffff   ___pinit__
00000200   ___text__
000006a0   __auto_init
000080d8   __cleanup_ptr
000080dc   __dtors_ptr
000080e0   __lock
000008c0   __nop
000008c8   __register_lock
000008dc   __register_unlock
000080e8   __stack
000080e4   __unlock
00000688   _abort
000005b0   _atexit
00000000   _boot
000007a0   _c_int00
00000460   _exit
00000840   _main
00000200   _memcpy
00008000   cinit
00008000   edata
00008000   end
00000900   etext
ffffffff   pinit


GLOBAL SYMBOLS: SORTED BY Symbol Address

address    name
--------   ----
00000000   _boot
00000200   ___text__
00000200   __STACK_SIZE
00000200   .text
00000200   _memcpy
00000460   _exit
000005b0   _atexit
00000688   _abort
00000688   C$$EXIT
000006a0   __auto_init
000007a0   _c_int00
00000840   _main
000008c0   __nop
000008c8   __register_lock
000008dc   __register_unlock
00000900   ___etext__
00000900   etext
00008000   ___bss__
00008000   ___cinit__
00008000   ___end__
00008000   $bss
00008000   .data
00008000   .bss
00008000   end
00008000   ___data__
00008000   ___edata__
00008000   cinit
00008000   edata
000080d8   __cleanup_ptr
000080dc   __dtors_ptr
000080e0   __lock
000080e4   __unlock
000080e8   __stack
ffffffff   pinit
ffffffff   ___pinit__

[35 symbols]
______________________________________________________________________________________________

custom boot code


 .title  "ROM boot"
      
; EMIF registers and values  

EMIF_GCR      .equ    0x01800000  ;EMIF global control    
EMIF_CE1      .equ    0x01800004  ;address of EMIF CE1 control reg.
EMIF_CE0      .equ    0x01800008  ;EMIF CE0control         
EMIF_CE1_8    .equ    0xffffff03  ;
EMIF_CE0_V    .equ    0xc0ffff30  ;EMIF CE0control   ;0x30


; QDMA registers and values

QDMA_OPT   .equ   0x02000000  ;QDMA options register
QDMA_OPT_VAL  .equ   0x21200001  ;QDMA options
QDMA_SRC   .equ   0x02000004  ;QDMA source address register
QDMA_CNT   .equ   0x02000008  ;QDMA count register
QDMA_DST   .equ   0x0200000c  ;QDMA destination address register
QDMA_S_IDX   .equ   0x02000030  ;QDMA index pseudo-register

 
 .sect ".boot_load"
 .global _boot
 .ref _c_int00
 
 
_boot:            
                                          
; **************      
; Configure EMIF               
; **************
                           
            mvkl  EMIF_GCR,A4    ;EMIF_GCR address ->A4
      ||    mvkl  0xffff,B4     

            mvkh  EMIF_GCR,A4
      ||    mvkh  0xffff,B4 
                           
            stw   B4,*A4            

            mvkl  EMIF_CE0,A4       ;EMIF_CE0 address ->A4
      ||    mvkl  EMIF_CE0_V,B4     ;

            mvkh  EMIF_CE0,A4
      ||    mvkh  EMIF_CE0_V,B4
     
            stw   B4,*A4

            mvkl  EMIF_CE1,A4       ;EMIF_CE1 address ->A4
      ||    mvkl  EMIF_CE1_8,B4     ;

            mvkh  EMIF_CE1,A4
      ||    mvkh  EMIF_CE1_8,B4
     
            stw   B4,*A4
   
; *************           
; Copy Sections
; *************


      mvkl  copyTable, a3 ; load table pointer
      mvkh  copyTable, a3
      
copy_section_top: 
      ldw   *a3++, b0 ; byte count
      ldw   *a3++, a4 ; load ram start address
      ldw   *a3++, b4 ; load flash start address
      nop   2
 [!b0]   b copy_done  ; have we copied all sections?
      nop 5
      
; copy this section with QDMA

   mvkl  QDMA_OPT,A5 ; set QDMA options
  ||  mvkl  QDMA_OPT_VAL,B5     
    mvkh  QDMA_OPT,A5
  ||  mvkh  QDMA_OPT_VAL,B5
    stw   B5,*A5
    mvkl  QDMA_SRC,A5 ; load source address
    mvkh  QDMA_SRC,A5     
    stw   B4,*A5        
   shr   B0,2,B1       ; divide size by 4 (because we're in 32-bit mode)
   mvkl  QDMA_CNT,A5  ; load word count
   mvkh  QDMA_CNT,A5     
    stw   B1,*A5           
    mvkl  QDMA_DST,A5 ; load destination address
    mvkh  QDMA_DST,A5     
    stw   A4,*A5  
   mvkl  QDMA_S_IDX,A5 ; set index. writing to this register will
    mvkh  QDMA_S_IDX,A5 ; also initiate the transfer.
    zero  B5
    stw   B5,*A5        ; go!

; next section           

   b   copy_section_top
   nop   5

copy_done:  ; done with section copying. 
   
    ; jump to _c_int00
   
     mvkl .S2 _c_int00, B0
            mvkh .S2 _c_int00, B0
            B    .S2 B0
            nop   5
              
              
; *************           
; Section Table
; *************
              
              
    ;; Table of sections to copy. Format is:
    ;; word 0: byte count
    ;; word 1: run address
    ;; word 2: load address
   
  
  
copyTable:      
    ;; .text
    .word 0x000006c0
    .word 0x00000200
    .word 0x90000200
 
  ;;.cinit
    .word 0x00000054
    .word 0x00008000
    .word 0x90008000
   
    .word
   
    .word 0
    .word 0
    .word 0             
__________________________________________________________________________________________________
Linker file

-c
boot.obj
test.obj
-o main.out
-heap 0x200
-stack 0x200
-l rts6201.lib
MEMORY
{
VECS:    o = 00000000h l = 00000200h
PMEM:    o = 00000200h l = 00007E00h
DMEM:    o = 00008000h l = 00007E00h
CE0:     o = 80000000h l = 01000000h
CE1VECS: o = 90000000h l = 00000200h
CE1PMEM: o = 90000200h l = 00007E00h
CE1init: o = 90008000h l = 00007E00h
}
SECTIONS
{
".boot_load" : loadVECS, run=VECS
.text        : loadPMEM, run=PMEM
.cinit       : loadinit, run=DMEM
.const        >DMEM
.data         >DMEM
.cio          > DMEM
.far          > DMEM
.stack        > DMEM
.bss          > DMEM
.sysmem       > DMEM
}




Hello pals

   The code gets loaded onto the on-chip memory of the DSP but the program counter does not  vary i.e. it remains at 0x00000000.

I believe ...even if thers a junk code to execute the PC should vary to some value apart from being 0x000000000.

 

Can any one suggest as whats the problem.

Thanking you

Nayaka




It looks like the DSP is in permanent reset.

        Jean-Michel MERCIER

--
dsp & imaging - www.ateme.com
ATEME - 26 Burospace - 91573 BIEVRES
Tel : +33 (0)1 69 35 89 73 (direct)
Fax : +33 (0)1 60 19 13 95

-----Message d'origine-----
De : raja nayaka [mailto:n...@yahoo.co.in]
Envoynbsp;: vendredi 24 janvier 2003 07:24
nbsp;: c...@yahoogroups.com
Objet : [c6x] booting problem

Hello pals

   The code gets loaded onto the on-chip memory of the DSP but the program counter does not  vary i.e. it remains at 0x00000000.

I believe ...even if thers a junk code to execute the PC should vary to some value apart from being 0x000000000.

 

Can any one suggest as whats the problem.

Thanking you

Nayaka





_____________________________________
About this discussion group:

To Join:  Send an email to c...@yahoogroups.com

To Post:  Send an email to c...@yahoogroups.com

To Leave: Send an email to c...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/c6x

Other Groups: http://www.dsprelated.com


">Yahoo! Terms of Service.


hello
we ensured that DSP is not in permanent reset state, we have connected LED on
RESET pin, with which we can observe RESET is behaving properly.
thanking you
Raja Jitendra Nayaka.
Jean-Michel MERCIER <> wrote:Hello, Check the RESET pin ?You
said it is your board, so I believe you should findeasily if something is going
wrong. I am not allowed to answer directly. Please keep the conversationon the
yahoogroups forums. Best regards, Jean-Michel Mercier-----Message
d'origine-----
De : raja nayaka [mailto:]
Envoy: mardi 28 janvier 2003 08:10
:
Objet : RE: [c6x] booting problem Dear Jean-Michel MERCIER
thanks for response, can you please give hints about ,how to ensure DSP is in
permanent reset?...

thanking you
R.J.Nayaka
Scientist
ITI Ltd, bangalore

Jean-Michel MERCIER <> wrote: It looks like the DSP is in
permanent reset.

Jean-Michel MERCIER

--
dsp & imaging - www.ateme.com
ATEME - 26 Burospace - 91573 BIEVRES
Tel : +33 (0)1 69 35 89 73 (direct)
Fax : +33 (0)1 60 19 13 95

-----Message d'origine-----
De : raja nayaka [mailto:]
Envoy: vendredi 24 janvier 2003 07:24
:
Objet : [c6x] booting problem Hello pals

The code gets loaded onto the on-chip memory of the DSP but the program
counter does not vary i.e. it remains at 0x00000000.

I believe ...even if thers a junk code to execute the PC should vary to some
value apart from being 0x000000000.
Can any one suggest as whats the problem.

Thanking you

Nayaka
---------------------------------

message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: Send an email to

To Post: Send an email to

To Leave: Send an email to

Archives: http://www.yahoogroups.com/group/c6x

Other Groups: http://www.dsprelated.com

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this
message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: Send an email to

To Post: Send an email to

To Leave: Send an email to

Archives: http://www.yahoogroups.com/group/c6x

Other Groups: http://www.dsprelated.com

Catch all the cricket action. Download Yahoo! Score tracker

Catch all the cricket action. Download Yahoo! Score tracker