Reply by Bill Finger June 7, 20072007-06-07
Thomas,

In assembly, the directives (e.g, .title), cannot start in the first
column. Insert tabs or spaces before these and you should be fine.

As for stepping, it sounds like your board is in reset. Is the PC
perhaps 0x45?

Bill

> -----Original Message-----
> From: c... [mailto:c...] On
> Behalf Of thomas_hw_designer
> Sent: Tuesday, June 05, 2007 4:42 PM
> To: c...
> Subject: [c3x] Problems stepping in CC and vector definitions
>
> I've been given this new board to bring up. I see two problems (maybe
> they're related).
>
> The board features external RAM mapped from address 0. The DSP is
> configured to run in Microprocessor mode for now during
>
> debugging and just load directly to RAM from the XDS510USB JTAG
> emulator. The connection to the board seems to be fine and I can
> manipulate values in RAM.
>
> 1. I cannot step. Trying to step just increments the stack pointer
> register but the program counter stays put
>
> 2. I try to build a simple project in Code Composer, but how should
> the vectors (reset and others) be defined? I tried to define them as
> an assembly file (see copy of the file below) but trying to compile
> this assembly file gives a lot of errors (see build.log below)
>
> Any idea what is going on and what I have missed..? The files I use
> are posted below.
>
> Best regards.
>
> ***************
> ****** build.log
> cl30 test.c -g -v31 -als -frC:\JEL-SW\TestJel
> [test.c]
> TMS320C3x/4x ANSI C Compiler Version 5.11
> Copyright (c) 1987-1999 Texas Instruments Incorporated
> "test.c" ==> main
> TMS320C3x/4x ANSI C Code Generator Version 5.11
> Copyright (c) 1987-1999 Texas Instruments Incorporated
> "test.c" ==> main
> TMS320C3x/4x COFF Assembler Version 5.12
> Copyright (c) 1987-1999 Texas Instruments Incorporated
> PASS 1
> PASS 2
>
> No Errors, No Warnings
>
> asm30 vecs.asm vecs.obj -ls -v30
> TMS320C3x/4x COFF Assembler Version 5.12
> Copyright (c) 1987-1999 Texas Instruments Incorporated
> PASS 1
> PASS 2
> .title "vecs.asm"
> "vecs.asm", line 6: INVALID OPCODE
>
> .title "vecs.asm" ;file name
> "vecs.asm", line 7: INVALID OPCODE
>
> .ref _c_int00, _c_int99 ;reference all interrupt
> "vecs.asm", line 8: INVALID OPCODE
>
> .sect "vectors" ;define named section
> "vecs.asm", line 12: INVALID OPCODE
>
> .word _c_int00 ;reset vector
> "vecs.asm", line 14: INVALID OPCODE
>
> .word _c_int99 ;interrupt vector 1
> "vecs.asm", line 15: INVALID OPCODE
>
> .word _c_int99 ;interrupt vector 2
> "vecs.asm", line 16: INVALID OPCODE
> 7 Errors, No Warnings
>
> Errors in source - Assembler Aborted
> lnk30 test.MAK
> TMS320C3x/4x COFF Linker Version 5.11
> Copyright (c) 1987-1999 Texas Instruments Incorporated
> >> : can't open file vecs.obj for input
> Build Complete,
> 8 Errors, 0 Warnings.
> **********************
> MEMORY
> {
> VECS: org = 0x0 len = 0x40
> EXT0: org = 0x40 len = 0x20000 /* EXTERNAL
> MEMORY */
> RAM0: org = 0x809800 len = 0x400 /* RAM BLOCK
> 0 */
> RAM1: org = 0x809c00 len = 0x400 /* RAM BLOCK
> 1 */
> }
>
> /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
>
> SECTIONS
> {
> "vectors" > VECS
> .cinit: > EXT0 /* INITIALIZATION
> TABLES */
> .text: > EXT0 /*
> CODE */
> .const: > EXT0 /*
> CONSTANTS */
> .stack: > RAM0 /* SYSTEM
> STACK */
> .sysmem: > RAM1 /* DYNAMIC MEMORY - DELETE IF
> NOT USED */
> .bss: > EXT0 /*
> VARIABLES */
> }
>
> *********** Vector table
>
> **********************************************************************
> *******
> * VECS.ASM Reset and interrupt vector table for the 'C30 and
> the 'C31 *
> * (Microprocessor Mode)
> *
>
> **********************************************************************
> *
> ******
> *
> .title "vecs.asm"
> .title "vecs.asm" ;file name
> .ref _c_int00, _c_int99 ;reference all interrupt
> *****************************
> * Reset and interrupt vectors
> *****************************
> .sect "vectors" ;define named section
>
> .word _c_int00 ;reset vector
> .word _c_int99 ;interrupt vector 1
> .word _c_int99 ;interrupt vector 2
> .end ;end of file
>
> ******** Project .mak file
>
> /************* Code Composer V1 Project Data ********************
> The following section contains data generated by Code Composer
> to store project information like build options, source filenames
> and dependencies.
>
> [command filename]
> c30.cmd 2
>
> [Project Root]
> C:\JEL-SW\TestJel
>
> [build options]
> 3
> Linker = "-cr -heap 64 -o test.out -stack 128 -x -i
> C:\tic3x4x\c3x4x\cgtools\lib -l rts30.lib "
> Assembler = "-ls -v30 "
> Compiler = "-g -v31 -als -frC:\JEL-SW\TestJel "
>
> [source files]
> test.c 1181048060 1
> vecs.asm 1181052903 1
> -4224
>
> [dependencies]
> 0 -802
> 0 -802
>
> [version]
> 2.0
> */
> -cr -heap 64 -o test.out -stack 128 -x -i
> C:\tic3x4x\c3x4x\cgtools\lib -l rts30.lib
> "vecs.obj"
> "test.obj"
> "c30.cmd"
> /******** End of Project Data Generated by Code Composer ********/
>
> ******* Source file
> int test;
> void main(void)
> {
> for(;;)
> {
> test++;
> }
> }
Reply by thomas_hw_designer June 6, 20072007-06-06
I've been given this new board to bring up. I see two problems (maybe
they're related).

The board features external RAM mapped from address 0. The DSP is
configured to run in Microprocessor mode for now during

debugging and just load directly to RAM from the XDS510USB JTAG
emulator. The connection to the board seems to be fine and I can
manipulate values in RAM.

1. I cannot step. Trying to step just increments the stack pointer
register but the program counter stays put

2. I try to build a simple project in Code Composer, but how should
the vectors (reset and others) be defined? I tried to define them as
an assembly file (see copy of the file below) but trying to compile
this assembly file gives a lot of errors (see build.log below)

Any idea what is going on and what I have missed..? The files I use
are posted below.

Best regards.

***************
****** build.log
cl30 test.c -g -v31 -als -frC:\JEL-SW\TestJel
[test.c]
TMS320C3x/4x ANSI C Compiler Version 5.11
Copyright (c) 1987-1999 Texas Instruments Incorporated
"test.c" ==> main
TMS320C3x/4x ANSI C Code Generator Version 5.11
Copyright (c) 1987-1999 Texas Instruments Incorporated
"test.c" ==> main
TMS320C3x/4x COFF Assembler Version 5.12
Copyright (c) 1987-1999 Texas Instruments Incorporated
PASS 1
PASS 2

No Errors, No Warnings

asm30 vecs.asm vecs.obj -ls -v30
TMS320C3x/4x COFF Assembler Version 5.12
Copyright (c) 1987-1999 Texas Instruments Incorporated
PASS 1
PASS 2
.title "vecs.asm"
"vecs.asm", line 6: INVALID OPCODE

.title "vecs.asm" ;file name
"vecs.asm", line 7: INVALID OPCODE

.ref _c_int00, _c_int99 ;reference all interrupt
"vecs.asm", line 8: INVALID OPCODE

.sect "vectors" ;define named section
"vecs.asm", line 12: INVALID OPCODE

.word _c_int00 ;reset vector
"vecs.asm", line 14: INVALID OPCODE

.word _c_int99 ;interrupt vector 1
"vecs.asm", line 15: INVALID OPCODE

.word _c_int99 ;interrupt vector 2
"vecs.asm", line 16: INVALID OPCODE
7 Errors, No Warnings

Errors in source - Assembler Aborted
lnk30 test.MAK
TMS320C3x/4x COFF Linker Version 5.11
Copyright (c) 1987-1999 Texas Instruments Incorporated
>> : can't open file vecs.obj for input
Build Complete,
8 Errors, 0 Warnings.
**********************
MEMORY
{
VECS: org = 0x0 len = 0x40
EXT0: org = 0x40 len = 0x20000 /* EXTERNAL
MEMORY */
RAM0: org = 0x809800 len = 0x400 /* RAM BLOCK
0 */
RAM1: org = 0x809c00 len = 0x400 /* RAM BLOCK
1 */
}

/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */

SECTIONS
{
"vectors" > VECS
.cinit: > EXT0 /* INITIALIZATION
TABLES */
.text: > EXT0 /*
CODE */
.const: > EXT0 /*
CONSTANTS */
.stack: > RAM0 /* SYSTEM
STACK */
.sysmem: > RAM1 /* DYNAMIC MEMORY - DELETE IF
NOT USED */
.bss: > EXT0 /*
VARIABLES */
}

*********** Vector table

**********************************************************************
*******
* VECS.ASM Reset and interrupt vector table for the 'C30 and
the 'C31 *
* (Microprocessor Mode)
*

**********************************************************************
*
******
*
.title "vecs.asm"
.title "vecs.asm" ;file name
.ref _c_int00, _c_int99 ;reference all interrupt
*****************************
* Reset and interrupt vectors
*****************************
.sect "vectors" ;define named section

.word _c_int00 ;reset vector
.word _c_int99 ;interrupt vector 1
.word _c_int99 ;interrupt vector 2
.end ;end of file

******** Project .mak file

/************* Code Composer V1 Project Data ********************
The following section contains data generated by Code Composer
to store project information like build options, source filenames
and dependencies.

[command filename]
c30.cmd 2

[Project Root]
C:\JEL-SW\TestJel

[build options]
3
Linker = "-cr -heap 64 -o test.out -stack 128 -x -i
C:\tic3x4x\c3x4x\cgtools\lib -l rts30.lib "
Assembler = "-ls -v30 "
Compiler = "-g -v31 -als -frC:\JEL-SW\TestJel "

[source files]
test.c 1181048060 1
vecs.asm 1181052903 1
-4224

[dependencies]
0 -802
0 -802

[version]
2.0
*/
-cr -heap 64 -o test.out -stack 128 -x -i
C:\tic3x4x\c3x4x\cgtools\lib -l rts30.lib
"vecs.obj"
"test.obj"
"c30.cmd"
/******** End of Project Data Generated by Code Composer ********/

******* Source file
int test;
void main(void)
{
for(;;)
{
test++;
}
}