Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to run asm code on TI`s C6713 DSP

Status
Not open for further replies.

abaidullah

Member level 5
Joined
Apr 28, 2006
Messages
81
Helped
8
Reputation
16
Reaction score
4
Trophy points
1,288
Activity points
1,608
My assigned task is to convert and run a c code for c6713 into asm code and run the same without calling the asm code from c. In other words, my asm code ashould not be a c callable function but a stand-alone code for TI`s TMS320C6713 DSP.

Please reply as soon as possible.

With regards,
 

It should be some examples in TI directories after installing code composer.

You should have vectors file

example:

;
; Copyright 2002 by Texas Instruments Incorporated.
; All rights reserved. Property of Texas Instruments Incorporated.
; Restricted rights to use, duplicate or disclose this code are
; granted through contract.
;
;
; "@(#) DSP/BIOS 4.80.208 12-06-02 (barracuda-l19)"
;
; ======== vectors.asm ========
; Plug in the entry point at RESET in the interrupt vector table
;

;
; ======== unused ========
; plug inifinite loop -- with nested branches to
; disable interrupts -- for all undefined vectors
;
unused .macro id

.global unused:id:
unused:id:
b unused:id: ; nested branches to block interrupts
nop 4
b unused:id:
nop
nop
nop
nop
nop

.endm

.sect ".vectors"

.ref _initblink ; main programm
.ref _mig ; interrupt service

.align 32*8*4 ; must be aligned on 256 word boundary

RESET:
mvkl _initblink,b0 ; load destination function address to b0
mvkh _initblink,b0
b b0 ; start branch to destination function
mvc PCE1,b0 ; address of interrupt vectors
mvc b0,ISTP ; set table to point here
nop 3 ; fill delay slot
nop
nop

;
; plug unused interrupts with infinite loops to
; catch stray interrupts
;
unused 1
unused 2
unused 3
unused 4
unused 5
unused 6
unused 7
unused 8
unused 9
unused 10
unused 11
unused 12
unused 13

; interrupt14 (TIMER0)
mvkl _mig,b0 ; load destination function address to b0
mvkh _mig,b0
b b0 ; start branch to destination function
nop 5

unused 15



than you need to define in your program section to place to

example
;
; Copyright 2004 by me :)
; All rights reserved. Property of me :)
; Unrestricted rights to use, duplicate or disclose this code
;
; ======== initblink.asm ========
;
; LEDs blinking in various types
;

.global _initblink

.sect ".text"



an you need define .cmd file

/*
* Copyright 2001 by Texas Instruments Incorporated.
* All rights reserved. Property of Texas Instruments Incorporated.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
*/
/*
* ======== volume.cmd ========
*
*/


MEMORY
{
SDRAM : origin = 0x80000000, len = 0x400000
CPURAM : origin = 0x00000000, len = 0x10000
}

SECTIONS
{
.vectors > CPURAM
.text > CPURAM

.bss > CPURAM
.cinit > CPURAM
.const > CPURAM
.far > CPURAM
.stack > CPURAM
.cio > CPURAM
.sysmem > CPURAM
}



THE MOST IMPORTANT
in the zeroth vector should be jump to your code - see vectors file
in my case it is "_initblink"
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top