nanogui: Thread: How do I implement nano-X on ARM9 board(mini2440)?


[<<] [<] Page 1 of 1 [>] [>>]
Subject: How do I implement nano-X on ARM9 board(mini2440)?
From: Tatsuya SHIMIZU ####@####.####
Date: 15 May 2010 15:43:55 -0000
Message-Id: <AANLkTil0-DOBv_xhJApg5Dx4b1xKRTbhkEvU3hxCzj8v@mail.gmail.com>

Hi all,

I am a beginner in nano-x window system ( actually, I'm not familiar
with Linux...).
I wanna implement nano-x on ARM9 board(mini2440).

Did anyone make a success in it?


In my case, I had an error...

OS : RedHat9 on Windows XP ( with VMware Player)
Compiler : gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)
Source Code : microwindows-full-0.91.tar.gz
Target Board : mini2440

There is Linux 2.6.32.2 on mini2440.
"fb0" is available.

I compiled nano-X. And I'm trying to compile following sample code.

============================================
//sample1.c
#define MWINCLUDECOLORS
#include <stdio.h>
#include <nano-X.h>

int main(void)
{
        GR_WINDOW_ID window_id;
        GR_EVENT event;

        if(GrOpen() < 0)
        {
                printf("Can't open graphics\n");
                return(0);
        }

        window_id = GrNewWindow(GR_ROOT_WINDOW_ID, 20, 20, 100, 60, 4,
WHITE, BLUE);

        GrMapWindow(window_id);

        for( ; ; )
        {
                GrGetNextEvent(&event);
        }
        GrClose();

        return(0);
}

#Makefile
all : sample1

sample1 : sample1.c
        arm-linux-gcc -o sample1 sample1.c -I./include/microwin -L./lib -lnano-X

*sample1.c is top of include and lib directory.
============================================

I had an error.
============================================
arm-linux-gcc -o sample1 sample1.c -I./include/microwin -L./lib -lnano-X
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld:
sample1: hidden symbol `__aeabi_uidiv' in
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_udivsi3.o)
is referenced by DSO
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld:
final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
============================================

Does anyone have an idea?


I'll show you how I compiled nano-X.
I edited config and microwindows-0.91/src/nanox/clientfb.c.
config file is shown at end of this mail.
and I edit following lines in clientfb.c because I had an error.
//#include <asm/page.h>		/* For definition of PAGE_SIZE */ //
comment-out this line
#define PAGE_SIZE sysconf(_SC_PAGESIZE) // add this line

I'm sorry I pasted all settings of config file because I forgot what I edit.

ARCH                     = LINUX-ARM
BIGENDIAN                = N
ARMTOOLSPREFIX           = arm-linux-
MIPSTOOLSPREFIX          = mipsel-linux-
POWERPCTOOLSPREFIX       = powerpc-linux-
SHTOOLSPREFIX            = sh-linux-gnu
RTEMSTOOLSPREFIX         = i386-rtemself-

OPTIMIZE                 = Y
DEBUG                    = N
VERBOSE                  = N
THREADSAFE               = N

MICROWIN                 = N
NANOX                    = Y
SHAREDLIBS               = Y
NWIDGET                  = N
OBJFRAMEWORK             = N

MICROWINDEMO             = N
NANOXDEMO                = N

NANOWM                   = N

SCREEN_PIXTYPE           = MWPF_TRUECOLOR565

LINK_APP_INTO_SERVER     = N

HAVE_SHAREDMEM_SUPPORT   = N

HAVE_FILEIO              = Y

HAVE_BMP_SUPPORT         = N
HAVE_GIF_SUPPORT         = N
HAVE_PNM_SUPPORT         = N
HAVE_XPM_SUPPORT         = N

HAVE_JPEG_SUPPORT        = N
INCJPEG                  =
/user/projects/ipaq/buildroot-oz/output/staging/include/
LIBJPEG                  =
/user/projects/ipaq/buildroot-oz/output/staging/arm-linux/lib/libjpeg.so

HAVE_PNG_SUPPORT         = N
INCPNG                   = /usr/include
LIBPNG                   = /usr/lib/libpng.a
LIBZ                     = /usr/lib/libz.a

HAVE_TIFF_SUPPORT        = N
INCTIFF                  = /usr/include
LIBTIFF                  = /usr/lib/libtiff.a

HAVE_FNT_SUPPORT         = Y
HAVE_FNTGZ_SUPPORT       = N
FNT_FONT_DIR             = "fonts/bdf"

HAVE_T1LIB_SUPPORT       = N
INCT1LIB                 = /usr/include
LIBT1LIB                 = /usr/lib/libt1.a

HAVE_FREETYPE_SUPPORT    = N
INCFTLIB                 = /usr/include
LIBFTLIB                 = /usr/lib/libttf.so
FREETYPE_FONT_DIR        = "fonts/truetype"

HAVE_FREETYPE_2_SUPPORT  = N
INCFT2LIB                = /usr/include
LIBFT2LIB                = /usr/lib/libfreetype.a

HAVE_PCF_SUPPORT         = N
HAVE_PCFGZ_SUPPORT       = N
PCF_FONT_DIR             = "fonts/pcf"

HAVE_HZK_SUPPORT         = N
HZK_FONT_DIR             = "fonts/chinese"

HAVE_BIG5_SUPPORT        = N

HAVE_GB2312_SUPPORT      = N

HAVE_JISX0213_SUPPORT    = N

HAVE_KSC5601_SUPPORT     = N

HAVE_EUCJP_SUPPORT       = N
EUCJP_FONT_DIR           = "fonts/japanese"

NOFONTSORCLIPPING        = N

ERASEMOVE                = N
UPDATEREGIONS            = N

GRAYPALETTE              = N

ifneq ($(ARCH), ELKS)

X11                      = N

ifeq ($(X11), Y)
SCREEN_WIDTH             = 640
SCREEN_HEIGHT            = 480
SCREEN_DEPTH             = 4
USE_EXPOSURE		 = N
else

FBVGA                    = N
FRAMEBUFFER              = Y
FBVGA                    = N
VTSWITCH                 = N
FBREVERSE                = N

HAVETEXTMODE             = Y

VGALIB                   = N

HWVGA                    = N

GPMMOUSE                 = N
SERMOUSE                 = N
SUNMOUSE                 = N
NOMOUSE                  = Y
IPAQMOUSE                = N
ZAURUSMOUSE              = N
TUXMOUSE                 = N
ADSMOUSE                 = N
EPMOUSE                  = N
VHMOUSE                  = N
MTMOUSE                  = N
PSIONMOUSE               = N
YOPYMOUSE                = N
HARRIERMOUSE             = N

TTYKBD                   = N
SCANKBD                  = N
ZAURUSKBD                = N
PIPEKBD                  = N
IPAQKBD                  = N
NOKBD                    = Y

endif

SA1100_LCD_LTLEND        = N
INVERT4BPP               = N

ifeq ($(ARCH), RTEMS)
RTEMS_BUILD              = /tools/build-i386-elf-rtems
RTEMS_BSP                = pc386
LINK_APP_INTO_SERVER     = Y
endif
endif

ifeq ($(ARCH), ELKS)
ASMVGADRIVER             = N
CVGADRIVER               = N
HERCDRIVER               = N
DBGDRIVER                = N

SERMOUSE                 = N
endif


*I will use touchscreen after seeing some picture on LCD.
But I don't know how to use it.
*I turned off a lot of functions because I could not install libraries
related to those well.
Subject: Re: [nanogui] How do I implement nano-X on ARM9 board(mini2440)?
From: "Greg Haerr" ####@####.####
Date: 15 May 2010 15:57:51 -0000
Message-Id: <0f8301caf447$53afb580$6564a8c0@winXP>

: Source Code : microwindows-full-0.91.tar.gz

You should use the latest source on the website,
microwindows-src-snapshot.tar.gz, the v0.91 is
quite old.  This isn't the cause of your problem,
I don't think though.

: arm-linux-gcc -o sample1 sample1.c -I./include/microwin -L./lib -lnano-X
: 
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld:
: sample1: hidden symbol `__aeabi_uidiv' in
: 
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_udivsi3.o)
: is referenced by DSO
: 
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld:
: final link failed: Nonrepresentable section on output

Looks like you have a problem with your cross-compiler.
Perhaps try adding -lm, or run "nm libnanoX.a" and see where the call to 
uidiv
is made from which source files.  This will help debug
your compiler problem.  There may be another helper library
that is not installed.  uidiv sounds like unsigned int divide
helper function.

Regards,

Greg 

Subject: Re: [nanogui] How do I implement nano-X on ARM9 board(mini2440)?
From: Tatsuya SHIMIZU ####@####.####
Date: 15 May 2010 19:22:31 -0000
Message-Id: <AANLkTilGfRnjSu8enBTqOopNKeFWRMfVnulqKNWrq4UJ@mail.gmail.com>

Thank you for your reply, Greg.

I tried to add -lm, but could not compile it.

And I downloaded microwindows-full-snapshot.tar.gz, and compiled it.
I got an error message blow.

make[1]: *** No rule to make target
`/home/foo/microwin/src/obj/fonts/X6x13.o', needed by
`/home/foo/microwin/src/bin/nano-X'. Stop.
make: *** [subdir-/home/foo/microwin/src/nanox] error2


And I also tried to run "nm libnano-X.a", uidiv is called by client.o.
There are no difinition uidiv in my cross libraries.

Actually I downloaded binary cross compiler from
http://www.dragonwake.com/download/arm9-download/linux-toolchain/arm-linux-gcc-4.3.2.tgz.
I just umcompressed it.

Finally, I tried another way that explained on following bage.
http://linux-arm-porting.blogspot.com/2009/05/porting-linux-2613-on-ln2410.html
But I could not execute software on mini2440.
I just coded simple "hello world", mini2440 said "No such a file".
If I compiled it with arm-linux-gcc-4.3.2, I can execute it.

This is not related to microwindows... Just cross compiler problems...


Does anyone know good environment for mini2440 (and how to use
mini2440's touchscreen and so on)?

thank you.

Tatsuya.
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.