Problem description:
I transplanted the tslib test program ts_test.c touch screen operation program into my application program, and found that a segmentation fault occurred when the program ran to the ts_config function. The ts_test program can run on the development board, but why does my program have a segmentation fault?
1 ts = ts_open (tsdevice, 0);
2
3 if (!ts) {
4 perror (tsdevice);
5 exit(1);
6 }
7
8 if (ts_config(ts)) {
9 perror("ts_config");
10 exit(1);
11 }
Solution:
After cross-compiling tslib, some library files and header files will be generated. Copy all the generated library files and header files to the corresponding library file and header file directory of arm-linux-gcc, then re-cross-compile the program and copy it to the development board for running.
Cross compiler header file directory: arm-linux-gcc/4.5.1/arm-none-linux-gnueabi/sys-root/usr/include
Cross compiler library file directory: arm-linux--gcc/4.5.1/arm-none-linux-gnueabi/sys-root/usr/lib
For tslib transplantation, please refer to: http://www.cnblogs.com/ape-ming/p/5134542.html
Reference link: http://www.100ask.org/bbs/forum.php?mod=viewthread&tid=11267
Previous article:Using Libpng library to display PNG images on Tiny6410
Next article:Linux-2.6.39 porting on Tiny6410 - Peripheral driver porting
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- AD package library
- Share a reference implementation of path planning, the key is that there are animated pictures!
- TMS320C6678 chip TI original board development
- How to configure practical Euler angles for sensortile box?
- Participate in the survey and get a 50-yuan JD card. The number of places is limited and will be given away while stocks last!
- How to Design an RTC Circuit
- Xunwei IMX6 development board QT system Sqlite3 transplantation and use
- DSP Transplantation and Optimization of H.264 Encoder
- (Bonus 1) GD32L233 Review - What is Cortex-M23?
- Show off the two development boards I just exchanged