Symbols referenced in processor 'p0' could not be resolved

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.cpp
Linking...

[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 error
cc3089: fatal error: Link failed
Tool failed with exit/exception code: 1.
Build was unsuccessful.

===================================================

I presume some compilation thingis are missing, I just don't know what....

Parents
  • Hi,

    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:

    .section/pm IVreset;

        __reset: JUMP start; nop; nop; nop;     /* 0x0000: Reset vector*/

    .section/pm IVirq2;

    ___irq2: RTI; nop; nop; nop;     /* 0x0004: IRQ2*/

    .section/pm IVirql1;

    ___irql1: RTI; nop; nop; nop;     /* 0x0008: IRQL1*/

    .section/pm IVirql0;

    ___irql0: RTI; nop; nop; nop;     /* 0x000C: IRQL0*/

    .section/pm IVsport0xmit;

    ___sport0xmit: RTI; nop; nop; nop;     /* 0x0010: SPORT0 transmit*/

    .section/pm IVsport0recv;

    ___sport0recv: RTI; nop; nop; nop;     /* 0x0014: SPORT0 receive*/

    .section/pm IVirqe;

    ___irqe: RTI; nop; nop; nop;     /* 0x0018: IRQE*/

    .section/pm IVbdma;

    ___bdma: RTI; nop; nop; nop;     /* 0x001C: BDMA*/

    .section/pm IVirq1;

    ___irq1: RTI; nop; nop; nop;     /* 0x0020: SPORT1 transmit*/

    .section/pm IVirq0;

    ___irq0: RTI; nop; nop; nop;     /* 0x0024: SPORT1 receive*/

    .section/pm IVtimer;

    ___tmri: RTI; nop; nop; nop;     /* 0x0028: Timer*/

    .section/pm IVpwrdwn;

    ___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".

    Regards,

    Craig.

Reply
  • Hi,

    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:

    .section/pm IVreset;

        __reset: JUMP start; nop; nop; nop;     /* 0x0000: Reset vector*/

    .section/pm IVirq2;

    ___irq2: RTI; nop; nop; nop;     /* 0x0004: IRQ2*/

    .section/pm IVirql1;

    ___irql1: RTI; nop; nop; nop;     /* 0x0008: IRQL1*/

    .section/pm IVirql0;

    ___irql0: RTI; nop; nop; nop;     /* 0x000C: IRQL0*/

    .section/pm IVsport0xmit;

    ___sport0xmit: RTI; nop; nop; nop;     /* 0x0010: SPORT0 transmit*/

    .section/pm IVsport0recv;

    ___sport0recv: RTI; nop; nop; nop;     /* 0x0014: SPORT0 receive*/

    .section/pm IVirqe;

    ___irqe: RTI; nop; nop; nop;     /* 0x0018: IRQE*/

    .section/pm IVbdma;

    ___bdma: RTI; nop; nop; nop;     /* 0x001C: BDMA*/

    .section/pm IVirq1;

    ___irq1: RTI; nop; nop; nop;     /* 0x0020: SPORT1 transmit*/

    .section/pm IVirq0;

    ___irq0: RTI; nop; nop; nop;     /* 0x0024: SPORT1 receive*/

    .section/pm IVtimer;

    ___tmri: RTI; nop; nop; nop;     /* 0x0028: Timer*/

    .section/pm IVpwrdwn;

    ___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".

    Regards,

    Craig.

Children
No Data