Existing. pjt project files often have one. ASM file ,. the ASM file contains the Assembly commands required to set the reset interrupt (c_int00) to jump to the C entry point of the program, and defines additional interrupt vectors.
Each DSP processor has an interrupt source list, some of which are fixed and can be modified by programming. Vector table is also called an interrupt service table. It is usually allocated to the CMD file. DSP reset, after the program is loaded, the register Initialization is the default value, the program counter (PC) is set as the Reset vector, and the CPU starts to run the code from address 0, this location is often the Reset vector.
The length of each interrupt vector is fixed, which is 8 characters. The interrupt vector table uses 0x400b as the boundary, because a total of 32 vectors, each of which is 32B, is 0x400b. When the interrupt service table is moved, the interrupt service table pointer (ISTP) also needs to be changed accordingly, and the ISTP remains 0 after the reset.
?
?
DSP usedAssembly of pseudo commandsViewAssembly language tools v7.6 ug.pdf
UsedAssembly instructionsViewTms320c64x64x + dsp cpu and Instruction Set refrence guide.pdf
Search for "Syntax" from a PDF file"
?
?
The. Def command is defined in the current module.
The. Ref command uses the symbols defined in other modules in the current module.
The. Global command can be used in any of the above cases.
?
?
Assembly instructionsViewTms320c64x64x + dsp cpu and Instruction Set refrence guide.pdf
?
. Sect
Example:
?
Mvk
?
Zero
LDB: Load byte from memory with a 15-bit unsigned constant offset
Add
B
Cmplt
?
STB
?
?
?
?
?
?
?
?
?
?
?
Content of the bootdsk6455.asm File
. Ref _ c_int00 ???????????? C Entry Point
. Global reset_rst ????????
?
Flash_start ????. Equ 0xb0000400; flash start address ???????? // In emifa Boot Mode, the bootloader simply branches to the base address of emifa 0000 (0xb000 00800000). interrupts are disabled. This address is emifa_e3: O = 0xb0000000 L = 0 x
Code_start ????. Equ 0x00800400; start of non Boot Code
Code_size ????. Equ 0x0000f000; application code size in byte
?
????. Sect "vectors "???????????????????????????????? // Service interruption table
Reset_rst:
?
NOP; mvkl. S2 _ c_int00, B0
NOP; mvkh. S2 _ c_int00, B0
NOP; B. S2 B0
???? NOP
???? NOP
???? NOP
???? NOP
NOP
?
Nmi_rst:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Resv1:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Resv2:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int4:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int5:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int6:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int7:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int8:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int9:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int10:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int11:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int12:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int13:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int14:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
Int15:
NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
???? NOP
?
????. Sect "bootload"
????
_ Boot_start:
Mvkl flash_start, B4; flash start address-> B4
Mvkh flash_start, B4
????
???? Mvkl code_start, A4; apps code start address-> A4
???? Mvkh code_start, A4
???? Zero A1
????
_ Boot_loop1:
???? LDB * B4 ++, B5; flash read
???? Mvkl CODE_SIZE-4, B6; B6 = boot_size-1024
????
???? Add 1, A1, A1; A1 + = 1, INC outer counter
???? | MvkhCODE_SIZE-4, B6 ???????? // Parallel bars (|) indicate instructions that are in parallel with a previous instruction. you can have up to eight instructions that will be executed in parallel. the following example demonstrates six instructions to be executed in parallel:
????
???? Cmplt A1, B6, B0
???? NOP
???? STB B5, * A4 ++
???? [B0] B _ boot_loop1
???? NOP 5
????
???? Mvkl. S2 _ c_int00, B0
???? Mvkh. S2 _ c_int00, B0
???? B. S2 B0
???? NOP 5 ????
?
6455 ASM files in the project