Reply by Jerry Avins June 6, 20072007-06-06
Thomas Gunnarsrud wrote:
> Found the problem. Found that the reset line got stuck low somewhere...
Thanks for sharing the solution. It's frustrating when the thread just vanishes. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by Thomas Gunnarsrud June 6, 20072007-06-06
Found the problem. Found that the reset line got stuck low somewhere...


Reply by Brad Griffis June 6, 20072007-06-06
Thomas Gunnarsrud wrote:
> Never mind about this last one... I remembered... ages ago that it was > important with opcodes and labels positioned correctly on the lines, so I > just had to add some tabs here and there in the assembly file and now it > compiles fine. > > However, I'm left with the (final?) problem. When I load the program to the > target ram I cannot step or run. At reset the PC is positioned correctly at > the entry from the reset vector, but stepping or running don't change the > PC, I only see the SP incrementing.. What could this be? > > Best regards. > >
What version of Code Composer? What emulator? What emulation drivers? You can't step, but can you run? How about "run free"?
Reply by Thomas Gunnarsrud June 6, 20072007-06-06
Never mind about this last one... I remembered... ages ago that it was 
important with opcodes and labels positioned correctly on the lines, so I 
just had to add some tabs here and there in the assembly file and now it 
compiles fine.

However, I'm left with the (final?) problem. When I load the program to the 
target ram I cannot step or run. At reset the PC is positioned correctly at 
the entry from the reset vector, but stepping or running don't change the 
PC, I only see the SP incrementing.. What could this be?

Best regards. 


Reply by Thomas Gunnarsrud June 6, 20072007-06-06
"Barry Brown" <b0_nws2@agilent.com> wrote in message 
news:1181081284.249366@newsreg.cos.agilent.com...
> Here is a vectors.asm file that works: >
<snipp...> Thank you for that one. However I still have problems assembling.. Don't have a clue what's going on right now and tried installing on two different computers. The following are some of the messages printed during compile. Anyone have a clue? asm30 -gs vectors.asm vectors.obj TMS320C3x/4x COFF Assembler Version 5.11 Copyright (c) 1987-1999 Texas Instruments Incorporated PASS 1 PASS 2 .global _c_int00 ; external RESET "vectors.asm", line 1: INVALID OPCODE .global _c_int01 ; external INT0 "vectors.asm", line 2: INVALID OPCODE RESET .word _c_int00 ; external RESET "vectors.asm", line 14: AN IDENTIFIER IN THE EXPRESSION IS INVALID ...and so on.
Reply by Barry Brown June 5, 20072007-06-05
Here is a vectors.asm file that works:

  .global _c_int00 ;  external RESET
  .global _c_int01    ;  external INT0
  .global _c_int02  ;  external INT1
  .global _c_int03  ;  external INT2
  .global _c_int04  ;  external INT3
  .global _c_int05  ;  serial port 0 xmt
  .global _c_int06  ;  serial port 0 rcv
  .global _c_int09    ;  timer 0
  .global _c_int10  ;  timer 1
  .global _c_int11    ;  dma
  .global _c_int99    ;  spurious interrupt

   .sect "vectors"
RESET .word _c_int00 ;  external RESET
INT0 .word _c_int01 ;  external INT0
INT1 .word _c_int02 ;  external INT1
INT2 .word _c_int03 ;  external INT2
INT3 .word _c_int04 ;  external INT3
XINT0 .word _c_int05 ;  serial port 0 xmt
RINT0 .word _c_int06 ;  serial port 0 rcv
   .space 2       ;  reserved
TINT0 .word _c_int09 ;  timer 0
TINT1 .word _c_int10 ;  timer 1
DINT0 .word _c_int11 ;  dma controller

   .space  20     ;  reserved space

TRAP0
   .loop 28       ;  undefined traps
   .word _c_int99 ;
   .endloop

   .space 4       ;  reserved space

  .end



"Thomas Gunnarsrud" <thomas.gunnarsrud@NDSPAMkitron.com> wrote in message 
news:f44i73$2bhh$1@blue.telenor.se...
> 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..? > > 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 Gunnarsrud June 5, 20072007-06-05
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..?

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++; } }