C++/QT/ARM Processors Cross-compiling/Programming Problem

  • Thread starter Saeed Amrollahi
  • Start date

S

Saeed Amrollahi

dear all {C++|QT|Embedded Systems} developers
Hello
before anything, Happy new year.
In advance please accept my apologizes, if my question(s) are somehow off-topic.
If so, please give me some advice to choose appropriate discussion groups.

Recently, I'm involved in a QT/ARM Processor software development project.
The general components of the project is:
Processor: Mini440 FriendlyARM (400 MHz Samsung S3C2440 ARM926T),
www.friendlyarm.net
www.arm9.net
OS: Linux (Kernel version 2.6.32)
Programming Language: C++ (GCC/g++)
GUI Framework: QT
The main purpose of the project is to develop a GUI for the
embedded handheld device, using QT/Embedded Linux.

The output of command uname -a on host computer (development machine) is:
$ uname -a
Linux scorpion 3.5.0-39-generic #60~precise1-Ubuntu SMP Wed Aug 14 15:38:41 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux
The output of command uname -a on embedded ARM-based device is:
Liunx FriendlyARM 2.6.32-FriendlyARM #5 Wed Jun 6 15:50:50
HKT 2012 armv4tl unknown.
My first question is:
Q. Is it important to host and target computers have the same architecture,
I mean both should be 32-bits (x86 or i586/i686) or both should be 64-bits (x86_64)?

I did the following steps:
1. I wrote a simple GUI using QT Creator (2.7.0) based on QT Designer (5.0.2)
on a desktop Linux machine (host computer)
2. Based on knowledge, I gained in last two months from books and Intenet about Cross-compiling,
and tool-chain and other many many related concepts, I found I have to install another
software from Trolltech called Qtopia, the Embedded version of QT. I tries
to install the latest version of Qtopia called qtopia-core-opensource-src-4.3.5
at this point I had a lot of problems at configuration, building and making the
software. One problem is g++ on host is 4.8.1 (very new), but the Qtopia
is for about 7 years ago. When I tries to build the Qtopia from source
the g++ compiler issues several C++ errors, for example:
error: 'ptrdiff_t' does not name a type
error: 'append' was not declared in this scope, and no declaration, where found
by argument-dependent lookup
Of course, I solved these problems, but it's obvious g++ issues these errors
because Qtopia was written using C++98, but g++ 4.8.1 is based on C++11
my questions are:
Q. Is it important to use which version of GCC with Qtopia?
another thing is which version of QT/Embedded should be used?
Q. Do I have to use the old versions of QT/Embedded like Qtopia or
I can use the newer versions like qt-everywhere-opensource-src-4.8.4?

another problem is about kernel version: is it important
Q. Is it important to host and target computers have the same kernel number (x.y.z)?

As you can see, I lost in details of cross-compiling and porting written software
from host to embedded device. I almost have no problem in using QT and writing C++ in desktop version.
At last, I appreciate you to give a your general but practical guideline/tips
to cross-compiling from x86 GCC to FreindlyARM platform.

Please shed some light.
TIA

-- Saeed Amrollahi Boyouki
 
Ad

Advertisements

J

Jorgen Grahn

.
Recently, I'm involved in a QT/ARM Processor software development project. ....
Q. Is it important to host and target computers have the same architecture,
I mean both should be 32-bits (x86 or i586/i686) or both should be
64-bits (x86_64)?

No. That's why the distinction "host" and "target" exists. They
don't have to have /anything/ in common. With the right compiler and
libraries you can build MC68020 AmigaDOS software on a PDP-11, or
whatever ...

On the other hand, it makes life a lot easier if they are identical so
you don't have to cross-compile at all. But if the target is too rare
or too slow/limited to support a compiler, that's not an option.

....
another problem is about kernel version: is it important
Q. Is it important to host and target computers have the same kernel number (x.y.z)?

Only if it is to the cross-compilation tools you use, and that seems
unlikely. One of the main purposes of a cross-compiler is to make the
binaries produced independent from host environment details.

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top