Post Go back to editing

Error li1021

[Error li1021]  The following symbols referenced in processor 'P0' could not be resolved:

        '__builtins_sysreg_write [___builtins_sysreg_write]' referenced from '.\Debug\NewProject9.doj'

Linker finished with 1 error

cc3089: fatal error: Link failed

Tool failed with exit/exception code: 1.

Build was unsuccessful.

i build my program in c compiler. It is about SDRAM and it only has one document and maybe something cannot link to this.How can i fix this. Help

  • Hi,

    Apologies for our delayed response.

    Linker Error(li1021 ): The following symbols referenced in processor 'p0' could not be resolved.

    Description

    The linker is unable to resolve a symbol. This message provides a list with the names of the symbol that cannot be resolved and for each symbol the name of the file that has the reference to the symbol. The message begins with the name of the link project in which the file was being mapped.

    The error occurs because the linker cannot find a defining occurrence of the symbol to link against in the current project or in the other projects or shared memory listed

    Example

    In the following example, two object files in the link refer to symbols that are not present in the link. The linker reports the error as follows.

    [Error li1021] The following symbols referenced in processor 'p0' could not be resolved:

        'func1' referenced from 'a.doj'

        'func2' referenced from 'a.doj'

        'func2' referenced from 'b.doj'

    Notice that references to the symbol "func2" are in object files a.doj and b.doj. To avoid an unnecessarily long list of duplicated unresolved symbols, you can use the warnonce switch on the command line. With the -warnonce switch, the linker lists each unresolved symbol only once, regardless of how many files may have referenced it. If you use the -warnonce switch, the linker produces a shortened error message:

    [Error li1021] The following symbols referenced in processor 'p0' could not be resolved:

        'func1' referenced from 'a.doj'

        'func2' referenced from 'a.doj'

    How to Fix

    To fix this problem, you must know where the identified symbol is supposed to be defined. The following are possible causes.

    •    A file that contains the definition of the symbol is not included in the link. In this case, add the file to the link.

    •    The symbol is not defined to be global. In this case, open the C or assembly file where the symbol is defined and make sure that the symbol is a global symbol.

    •    A project does not have a complete list of files to link against. For example, you might have a multiprocessor project in which each processor must link against the shared memory. If you do not include the shared memory file in the list of files to link against, a project might not be able to resolve some symbols.

    For more details,please refer the below help section:

    If you are using CCES go to CCES help>contents>CrossCoreRegistered Embedded Studio 2.1.0 > BlackfinRegistered Development Tools Documentation > Linker and Utilities Manual > Linker and Archiver Messages > Linker Messages >

    Errors>li1021

    IF you are using VDSP go to VisualDSP++<Help>\Contents\Messages\Linker\Liner Errors\li1021

    If you still face any issues can you please share us the project to provide you better assistance.

    Best Regards,

    Kader

  • This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

    Thank you,
    EZ Admin