Xxx. axf: Error: l6218e: Undefined symbol XXX (referred from XXXX. O ).

Source: Internet
Author: User

MKD error:

Linking...
LCD. axf: Error: l6218e: Undefined symbol enzk (Referred From ht128x64. O ).
LCD. axf: Error: l6218e: Undefined symbol getflashcnbuf (Referred From ht128x64. O ).

 

Resolution: Undefined symbol enzk. The translation is: The enzk is not defined, and the parentheses tell you that it is in
Ht128x64. oAs mentioned in this file, this. o file does not exist in the project. It is generated according to the. c/. s file during compilation. So we only need to find the. s or. c In the project. Here the corresponding name is
Ht128x64. C.

The enzk is not defined in the ht128x64. c file. Solution: (1) define enzk in the external. c file;

(2) comment out the enzk section in the ht128x64. c file;

 

Similarly: Reference from http://blog.sina.com.cn/s/blog_4d1854230101a0q0.html

Led_blink.axf: Error: l6218e: Undefined symbol systeminit (Referred From startup_0000f0xx.o ).
  This error message clearly tells you where the error is. The undefined symbol systeminit symbol is not defined, and the parentheses tell you that it is in
Startup_0000f0xx.o As mentioned in this file, this. o file does not exist in the project. It is generated according to the. c/. s file during compilation. So we only need to find the. s or. c In the project. Here the corresponding name is
Startup_0000f0xx.s.
  In this file, you can find the location of systeminit:Reset_handler Proc  Export Reset_handler [Weak]  Import _ Main  Import Systeminit  LDR R0, = systeminit  Blx R0  LDR R0, =__ main  BX R0  Endp  Originally, the systeminit function was called in the reset interrupt service function, which is not defined in the. s file.  There are two solutions.  1. Define the systeminit function externally (in any other. c file), even if it is an empty function.  2.     Import Systeminit     LDR R0, = systeminit  Blx R0  Comment out these three sentences.
Systeminit performs initialization before using main. If you do not need an official library but write some simple applications by yourself, you can disable this function. For example, when creating a project, add the s file directly, and do not use systeminit for the remaining simple programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.