Hi DSP Wizars
I am just starting to use the VisualDSP 5.0 on a ADSP-21369 EZ KIT Lite platform (obviously targetting the ADSP21369).
We are going to use the VDK as the kernel for our code. And I'm starting to write the drivers for the devices and interrupt handlers. However, I get this basic error when I try to compile:
----------------Configuration: Pro - Debug----------------.\Pro.vdk.\Hwr_Driver.c.\TreatOne.c.\VDK.cppLinking...
[Error li1021] The following symbols referenced in processor 'p0' could not be resolved: 'Hwr_Driver_DispatchFunction [_Hwr_Driver_DispatchFunction]' referenced from '.\Debug\VDK.doj'
Linker finished with 1 errorcc3089: fatal error: Link failedTool failed with exit/exception code: 1.Build was unsuccessful.
I presume some compilation thingis are missing, I just don't know what....
because a lot of these examples were moved from earlier releases of VisualDSP++, you may find that the way the Interrupts are handled by the LDF does not match the more recent default LDFs, such as in this case - the example just has a single block of code that maps to "Interrupts" that covers all of the interrupt vectors, while the 'newer' LDFs expect the interrupt vectors to be mapped individually, more like in the source file "...\218x\lib\src\crt_src\218x_int_tab.asm".
The Expert Linker will not generate an LDF that maps the interrupt table in a single statement. I would recommend taking a look at the CRT source file mentioned above as an example of how to lay out an interrupt table for the default LDF. Note that this interrupt table is intended for use in a C project, so would need some minor modifications to work with your assembly-only application.
You are getting the illegal instruction error because your code is not jumping to the reset vector (which should be the symbol 'start'). Try replacing the interrupt table definition with this simple snippet of code:
__reset: JUMP start; nop; nop; nop; /* 0x0000: Reset vector*/
___irq2: RTI; nop; nop; nop; /* 0x0004: IRQ2*/
___irql1: RTI; nop; nop; nop; /* 0x0008: IRQL1*/
___irql0: RTI; nop; nop; nop; /* 0x000C: IRQL0*/
___sport0xmit: RTI; nop; nop; nop; /* 0x0010: SPORT0 transmit*/
___sport0recv: RTI; nop; nop; nop; /* 0x0014: SPORT0 receive*/
___irqe: RTI; nop; nop; nop; /* 0x0018: IRQE*/
___bdma: RTI; nop; nop; nop; /* 0x001C: BDMA*/
___irq1: RTI; nop; nop; nop; /* 0x0020: SPORT1 transmit*/
___irq0: RTI; nop; nop; nop; /* 0x0024: SPORT1 receive*/
___tmri: RTI; nop; nop; nop; /* 0x0028: Timer*/
___pwrdwn: RTI; nop; nop; nop; /* 0x002C: Power down*/
This should match up with what the LDF expects, and the program should run correctly if you map "pm_da" to "mem_code".