DSPRelated.com
Forums

Assembler (2).

Started by Leonardo Padial Ortiz October 30, 2001
 Hello for All,
I had received from
Keith Larson the beta DSK3A.
I had coded me test program (write in loop 5152h in SRAM F00000),
 with the DSK3A and at hand,  as below:
0x00000000  0040                                        ; for jump after Reset to 40h
0x00000001  0000

spare

0x00000040  00F0    ldp @F00000,DP

0x00000041  0870                ;the DSK3A toll me here 5070 as in TMS320C4x (what is the correct ?)

0x00000042  5152    ldi 5152h,AR0

0x00000043  0868

0x00000044  0000    sti AR0,@0000h

0x00000045  1528

0x00000046  0040    br 000040h

0x00000047  6000

 After execution, I put the TMS320C32 in Hold and read the SRAM, but do no read 5152 as I had spected. The access to read the FLASH programed, and read/write on the SRAM is correct !

 Me Questions are:

-          is me test program correcty codified ?

-         Need to init some registers for run it ?         

Thank in advance,
Leonardo Padial,

Madrid Spain




Hello Leonardo

You have a few problems with your code (see below), but more embarassingly I
have either not included or have disabled the C32 command line options for
DSK3A. Not to worry though, a second utlity (DSK3LOAD) can be used to
create the C32 header information that needs to be in the HEX file. Finaly
you will probably want to use HEX2ROM to create a ROM file suitable for your
ROM burner. Use the example below to assemble TEST.ASM, call DSK3LOAD (to
make a C32 compatible HEX) and finaly HEX2ROM to create the ROM file. Sorry
for the realy long command line for DSK3LOAD.

As for your code, when you entered " LDP @F00000" you would have gotten an
error and the DSK file would have been partialy built. The problem here is
that 'F0000' starts with a non-numberic or Alpha key. This in turn causes
the analyzer to view this as a named label or variable and not a number.
The other problem would have been the branch instruction that would have
sent the CPU trying to execute code at 0x40! Finaly, the DSK file does not
have header information at the front of it. Instead you want to be looking
at a HEX file.

Valid and invalid numeric entry
-------------------------------
LDP @NAME_0 ; value of variable 'NAME_0' (unknown)
LDP @ABCD ; value of variable 'ABCD' (unknown)
LDP @0ABCD00 ; value of '0ABCD' but radix==? (unknown)
LDP @0xABCD00 ; This works, DP=0xAB

Creating TEST.DSK, TEST.HEX and ROM files
-----

C:\DSK3\DSK3\dsk3a TEST.ASM
C:\DSK3\DSK3\dsk3load test file2hex c32 WS=7 IOSTRB=0x123 STRB0=0x456
STRB1=0x789 noload
C:\DSK3\DSK3\hex2rom c32

After HEX2ROM starts, enter the filename by first hitting the 'F' key. Then
select a single ROM of 16 bits width, output format etc... .start "TEST",0x809800 ; Runtime address will be
.sect "TEST" ; assembled into TEST
.entry LOOP ;
LOOP ldp @0F00000h ;
ldi 5152,AR0
br LOOP FILE2HEX_C32
0x00000008 Bus Width
0x00000123 IOSTRB
0x00000456 STRB0
0x00000789 STRB1
0x00000001 Dummy Section size
0x00809800 Dummy Start Address
0x0010f800 Dummy STRBx ctrl
0x00000000 Dummy Data
0x00000003 Section Size
0x00809800 Start Address 'TEST'
0x0010f800 STRBx ctrl
0x507000f0
0x08681420
0x60809800
0x00000000 Terminate Load
=============================================
At 11:21 PM 10/30/01 +0100, you wrote:
Hello for All,

I had received from Keith Larson the beta DSK3A.

I had coded me test program (write in loop 5152h in SRAM F00000), with the
DSK3A and at hand, as below:

0x00000000 0040 ; for jump after Reset to 40h
0x00000001 0000 spare
0x00000040 00F0 ldp @F00000,DP
0x00000041 0870 ;DSK3A toll me here 5070 as in TMS320C4x (what is the
correct ?)
0x00000042 5152 ldi 5152h,AR0
0x00000043 0868
0x00000044 0000 sti AR0,@0000h
0x00000045 1528
0x00000046 0040 br 000040h
0x00000047 6000

After execution, I put the TMS320C32 in Hold and read the SRAM, but do no
read 5152 as I had spected. The access to read the FLASH programed, and
read/write on the SRAM is correct !

Me Questions are:
- is me test program correcty codified ?
- Need to init some registers for run it ?

Thank in advance,
Leonardo Padial,

Madrid Spain