Ucgui-error: l6218e: undefine symbol exit (jerror. O)

Source: Internet
Author: User
Tags exit in

Http://blog.chinaunix.net/uid-27106528-id-3478821.html

Use the struggling UCOS + ucgui routine in the project to find undefine symbol _ use_two_region_memory and so on. After checking, we find that it is a startup of our own.
File, replace it with the v3.5 Startup File, and change the pendsv_handler and javasick_handler. Then, no error is reported,

The premise of porting ucgui is that it has the LCD Driver function, which can light up the LCD screen, and implement the painting point and obtain the color value of the specified point. Generally, the display supplier will provide the corresponding driver function. The initialization function void LCD _init (), the screen point function void LCD _drawpoint (X, Y, color), and the method for obtaining the color value of the specified point (X, y) function. The key to porting is to match these three functions with the interface functions provided by ucgui.

Open lcddummy in Gui \ lcddriver. in the c file, find the int LCD _l0_init (void) initialization function, LCD _l0_setpixelindex (int x, int y, int pixelindex), unsigned int LCD _l0_getpixelindex (INT X, int y) read the color value function and fill in the LCD Driver function, for example:

 

The definition of the LCD configuration must be modified based on the selected screen size and color depth. There are many instructions on the network, which are not repeated here.

Make a record of some issues I encountered in Keil uvision4.

During compilation, the. \ output \ TFT touch screen. axf: Error: l6218e: Undefined symbol exit (Referred From jerror. O) error occurs.

I found some answers on the network, saying that the microlibrary cannot be used in the compilation configuration options, for example:

 

After removing this option, I found that the compilation was successful. Download to the development version, always cannot run, debugging found that the hardware error handling interrupt void hardfault_handler (void) was started.

So I selected the micro-database and went to ucgui/JPEG/jerror. in C, locate exit (exit_failure) in the error_exit (j_common_ptr Cinfo) function, comment out this line, and use return to return directly.

Re-compile and pass. Download to the Development Board to run properly.

Summary: I used the demo of the Struggle routine UCOS + ucgui. After I used printf, I chose LDR r0, =__ main without using microlib, single-step debugging may fail at full speed. then I chose use microlib and found many errors, such as _ use_two_region_memory. I found that the struggling startup file was written by myself. Then I changed the v3.5 Startup File, and because it was transplanted UCOS, I changed pendsv_handler and javasick_handler according to his startup file, the error just disappeared, but another ucgui-related error was reported because the ucgui was transplanted,
The exit in/JPEG/jerror. C is undefined, and the line is commented out directly, and the return is successful. Now printf can be used normally.

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.