Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Nano-X issues

Altera_Forum
Honored Contributor II
1,583 Views

Hello, 

 

I'm running uClinux on the NEEK controlling an external touch screen display (Elo Touch) with Nano-X included in the kernel config. 

 

Everything works fine. I set Nano-X configuration to use tslib for touchscreen device.  

 

Set the right parameters on uClinux for TSLIB and performing calibration (ts_calibrate) works well. 

 

Now starting Nano-X, my touch events won't get recognized. 

 

Does the Nano-X windowing environment need extra Elo touch screen drivers to support touch handling? 

 

Can someone provide advices on that problem? 

 

Thank you in advance. 

 

D.
0 Kudos
11 Replies
Altera_Forum
Honored Contributor II
467 Views

Hi, 

 

 

--- Quote Start ---  

 

Now starting Nano-X, my touch events won't get recognized. 

 

Does the Nano-X windowing environment need extra Elo touch screen drivers to support touch handling? 

 

--- Quote End ---  

 

 

Please see '/nios2-linux/uClinux-dist/user/microwin/src/drivers/mou_tslib.c'. 

 

# include <stdio.h># include <errno.h># include <string.h> # include "device.h" extern SCREENDEVICE scrdev; # include <tslib.h> static struct tsdev *ts; static char devnode; #define TSLIB_DEVNODE "/dev/input/event0" //#define TSLIB_DEVNODE "/dev/input/event1" # define TSLIB_PRESSURE_THRESH 100 static int tslib_open(MOUSEDEVICE *pmd) { if (getenv("TSLIB_TSDEVICE")) Is it 'event0' ? 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Hi, 

 

yep, its event0.
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Hi, 

 

 

--- Quote Start ---  

 

yep, its event0. 

 

--- Quote End ---  

 

 

I can't help you because I don't have the same device. So I recommend you to trace the program from 'ts_read()' by using gdb or printf. 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Hi, 

 

i was not able to find some problems with the tslib. 

 

Actually the Nano-X application won't work anymore. 

Starting the Nano-X server is working fine. 

BUT when I start the NanoWM the systems freezes. 

 

I tested it with the following system design: http://www.nioswiki.com/@api/deki/files/115/=neek_ocm_spi.zip (thread: http://alteraforum.org/forum/showthread.php?p=79862) and the How-to-FrameBuffer of the NiosWiki. Did no changes to the design. Just tried to run Nano-X on the LCD of the NEEK. 

 

May it be some problems with the Nano-X application or even some broken hardware on the NEEK?  

 

Advices or ideas are appreciated. 

 

Cheers, 

D.
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Hi, 

 

 

--- Quote Start ---  

 

i was not able to find some problems with the tslib. 

 

Actually the Nano-X application won't work anymore. 

Starting the Nano-X server is working fine. 

BUT when I start the NanoWM the systems freezes. 

 

--- Quote End ---  

 

 

How does it freeze? Normal 'ts_calibrate' for NEEK's touch panel will work well? If you feel any hardware malfunction, please try other 'Terasic' samples. 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Hi, 

back again at work. 

 

The ts_calibrate works well, yes. I'm able to calibrate the touch. 

 

But when I'm starting nano-X the appearing mouse cursor won't react on touches. 

When I'm starting the nanowm application the lcd or vga monitor as well won't show any environment. The NIOSII command shell (I'm running uClinux over JTAG console) just freezes and won't react.  

 

Cheers, 

D.
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Hi, 

 

 

--- Quote Start ---  

 

The ts_calibrate works well, yes. I'm able to calibrate the touch. 

 

--- Quote End ---  

 

 

This means the hardware and its driver are working well. 

 

 

--- Quote Start ---  

 

The NIOSII command shell (I'm running uClinux over JTAG console) just freezes and won't react.  

 

--- Quote End ---  

 

 

Shell freezes ? Even though 'nanowm &'? 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Yes, I always start the processes with the & infix. 

 

Actually I tested nanowm on the LCD of the NEEK the last days and the shell is not going to freeze but the nanowm environment won't show on the LCD neither. Now the shell freezes only when I'm trying to get the uClinux apps display on the vga monitor (1024x768, 24-bit).  

 

I always "git clean -f -x -d" , clean (make clean) the uClinux-dist build environment and reconfigure the build system with the proper ptf file before running the kernel compilation for another hardware design. 

 

D.
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Hi, 

 

 

--- Quote Start ---  

Yes, I always start the processes with the & infix. 

 

Actually I tested nanowm on the LCD of the NEEK the last days and the shell is not going to freeze but the nanowm environment won't show on the LCD neither. Now the shell freezes only when I'm trying to get the uClinux apps display on the vga monitor (1024x768, 24-bit).  

 

--- Quote End ---  

 

 

Maybe the kernel is freezing. Can you check it by using telnet or others? And is there any possibility that you are overwriting into the other kernel region? 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Hi, 

 

I also thought that the application is overwriting the kernel region. 

A question on the side: Could the overwriting be fixed with an MMU-included processor system? I'm still running MMU-less uClinux on the board. 

 

Thanks in advance. 

 

D.
0 Kudos
Altera_Forum
Honored Contributor II
467 Views

Of course the MMU enable full Linux system prevernts overriding of Kernel space by userland applications and thus is a lot safer. Moreover only the MMU enabled distribution decently supports threaded applications. 

 

So if you have enough FPGA resources for the MMU and are not too tight with CPU performance, you maybe should convert. 

 

-Michael
0 Kudos
Reply