Help setting up dev environment on ubuntu


richiz

Member
Joined
Jan 4, 2011
Messages
338
Hi


having a few troubles in setting up my dev env. Firstly which is the way to go? Seems cross compiling isnt favourable but why? I assume cross compiling is compiling on your laptop then copying the pnd to your pandora?


Ive seen someone say you can ssh onto your pandora and build directly but I would prefer to compile on my laptop and use a pandora emulator if one exists?


Forgive my ignorance, last time i used c+f was when i was doing some tutorials for the GBA and that involvd using a batch make file but recently ive been learning python which skips the compiling process so im bit fuzzy on it (not that i was ever really good.
 
Hi


having a few troubles in setting up my dev env. Firstly which is the way to go? Seems cross compiling isnt favourable but why? I assume cross compiling is compiling on your laptop then copying the pnd to your pandora?


Ive seen someone say you can ssh onto your pandora and build directly but I would prefer to compile on my laptop and use a pandora emulator if one exists?


Forgive my ignorance, last time i used c+f was when i was doing some tutorials for the GBA and that involvd using a batch make file but recently ive been learning python which skips the compiling process so im bit fuzzy on it (not that i was ever really good.

seen that : http://www.gp32x.de/board/index.php?/topic/58490-yactfeau/ ?
 
Last edited by a moderator:
having a few troubles in setting up my dev env. Firstly which is the way to go? Seems cross compiling isnt favourable but why? I assume cross compiling is compiling on your laptop then copying the pnd to your pandora?
Crosscompiling works nicely. There are several working solutions atm. Just have a look into the gp32x.de boards to get an idea. Sebt3 already pointed out a possible toolchain setup, and I also created one: http://www.gp32x.de/board/index.php?/topic/58443-crosscompiler-toolchain-based-on-openpandora-org-ipks/
 
Last edited by a moderator:
Thanks I'll give this a go.


I'm really unfamiliar with the whole toolchain set-up though but I'll report back soon enough.
 
I've been trying to get started with c++ and the pandora (done programming before, but not on linux and not c++), I've got Ivanovic's toolchain by running the script, I've also installed KDevelop 4, but I cannot figure out what exactly I should be doing with the toolchain and with KDevelop (or any other IDE) to get to a point where I can code and be able to run and compile for PC and pandora etc.


I'm using Xubuntu if it makes any difference.


Can anyone help/point me in the right direction? :blink:


Thanks in advance.
 
Last edited by a moderator:
I've been trying to get started with c++ and the pandora (done programming before, but not on linux and not c++), I've got Ivanovic's toolchain by running the script, I've also installed KDevelop 4, but I cannot figure out what exactly I should be doing with the toolchain and with KDevelop (or any other IDE) to get to a point where I can code and be able to run and compile for PC and pandora etc.


I'm using Xubuntu if it makes any difference.


Can anyone help/point me in the right direction? :blink:


Thanks in advance.

Kdevelop produce autotools and/or cmake build method for a project. If you choose autotools then use the pandora_configure.sh script Ivanovic's toolchain provide. If you prefer using cmake, have a look in the install script there is a comment about how to build wesnoth using his toolchain.
 
Kdevelop produce autotools and/or cmake build method for a project. If you choose autotools then use the pandora_configure.sh script Ivanovic's toolchain provide. If you prefer using cmake, have a look in the install script there is a comment about how to build wesnoth using his toolchain.
I've been trying for a while and I can't get anything configured, the closest thing I can find is to configure cmake for a project in KDevelop. I'm also not entirely sure what to do with pandora_configure.sh or PandoraToolchain.cmake. :unsure:
 
Apologies for the double post, but anyhow.


After stumbling around I figured out to put the contents of PandoraToolchain.cmake into the CMakeLists.txt file KDevelop has in a project, then after going on Project -> Configure selection it now seems to work and I've got a little hello world on my pandora screen. :D


I don't know if this is obvious but it's how I got it working, although with projects using qt4 I'm getting build errors:



Code:
/usr/include/qt4/QtCore/qatomic_i386.h: In member function 'bool QBasicAtomicInt::deref()':

/usr/include/qt4/QtCore/qatomic_i386.h:132:29: error: output number 0 not directly addressable

/usr/include/qt4/QtCore/qatomic_i386.h:132:29: warning: use of memory input without lvalue in asm operand 2 is deprecated

make[2]: *** [CMakeFiles/test3.dir/test3.cpp.o] Error 1



Unsure what's relevant, I couldn't find anything particularly useful to me on google for this.



The code in qatomic_i386.h where it errors is here:



Code:
inline bool QBasicAtomicInt::deref()

{

        unsigned char ret;

    asm volatile("lock\n"

                 "decl %0\n"

                 "setne %1"

                 : "=m" (_q_value), "=qm" (ret)

                 : "m" (_q_value)

                 : "memory");

    return ret != 0;

}


My guess would be to do with using qatomic_i386.h rather than an arm version maybe?


Any help appreciated.


Oh, and thanks sebt3 :)
 
(wild guess) setting these might help :



Code:
set(QT_HEADERS_DIR /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include)

set(QT_INCLUDE_DIR /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include)

set(QT_BINARY_DIR  /usr/bin)

set(QT_LIBRARY_DIR /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib)

set(QT_MKSPECS_DIR /usr/local/angstrom/arm/share/qt4/mkspecs)

set(QMAKESPEC linux-pandora-g++)
 
(wild guess) setting these might help :
Tried that in CMakeLists.txt and cmake_install.cmake in the build directory but still getting the same error :( , tried changing it to point into the toolchain as I don't have a /usr/local/angstrom/ directory but that didn't work either.


I also tried just using Qt instead of KDevelop but I couldn't figure out how to configure it for cross compiling.


On a positive note KDevelop has decided SDL exists :) .


EDIT: Actually SDL won't build either '/usr/bin/ld: cannot find -lSDL_image'


EDIT2: I'm trying to switch to Qt4 instead of KDevelop (IMO Qt Creator is much nicer), but still cannot find a way of making it cross compile, have added the pandora qmake files into a directory in qt's mkspec directory, tried adding a build step using that makespec instead of the standard one but this seems to do nothing, any ideas/pointers? (tried googling but can't find anything that actually helps or makes sense to me)


EDIT3: Finally figured it out, using additional arguments in Qt creator to set spec changes it from the default spec. Got Qt working fine now. :D
 
Last edited by a moderator:
Back
Top