Pandora Development on the Pandora


hmc

Active Member
Joined
Dec 19, 2011
Messages
787
Location
Bavaria, Germany
Hi guys,


as announced in my introduction mail, I plan to port some software to the Pandora.


I will do this _on_ the Pandora itself.


There is this C/C++ development tools PND available, but this, when started, opens a new graphical terminal, where the tools are available. Outside of that graphical terminal, the tools are not available.


I will probably control most of the development using a SSH terminal on a remote computer.


What would you recommend?


1. Use the PND and somehow make its tools available to the entire system (how?)


or


2. Install all the required tools directly in the Pandora system using opkg install (is there a list of recommended packages to install to start with?)


I could imagine that the second way is more flexible, i.e. gives me more options to extend that system by installing aditional required libraries etc.?


Is there an advantage in using the PND method for me? Does the PND contain some additional and useful magic, compared to the development packages installed via opkg install?


Thanks a lot,


Daniel
 
The tools should be available to the entire system once you have the terminal window open...


I have managed to setup Code::blocks IDE to use the development PND so you can definitely access the compiler binaries.
 
Use opkg to install all the development tools into the OS. You could do this directly on the device if you want, though some people worry about writing to the NAND, so you could also put a copy of the OS on an SD card then boot up using that, kinda like a dual boot
 
The tools should be available to the entire system once you have the terminal window open...

</p>They aren't. I tested it. ...Started the PND, terminal opened. Then I manually opened another terminal -> "make" returned "command not found".Same with a terminal over ssh.Am I doing something wrong here? Daniel
 
Last edited by a moderator:
The tools should be available to the entire system once you have the terminal window open...


I have managed to setup Code::blocks IDE to use the development PND so you can definitely access the compiler binaries.


Nope. As far im concern , dev tools can operate only in terminal window , where dev tools was set up [they wont work globally (for example freamon c++ dev tools)]


--> edit :)


@hmc:


btw you can fool around with terminal and && suffix while starting programs/app [but start before freamons c++ dev tools from PND ] so you'll be able to start C::B / JED or Beaver straight from dev terminal and work with all.. and with gcc/g++ compiler..
 
Last edited:
Erm I fool around with nothing... I launch the devtools pnd, I then launch code::blocks...


code::blocks has a Pandora profile where I setup the relevant gcc g++ etc binaries...


I simply load the 2 PNDs and and can compile... no messing :S
 
Use opkg to install all the development tools into the OS. You could do this directly on the device if you want, though some people worry about writing to the NAND, so you could also put a copy of the OS on an SD card then boot up using that, kinda like a dual boot

I always use an SD card for the OS / booting anyway, so I won't suffer from NAND wear. ;-)


So you recommend not using the PND but installing the packages directly in the main system?


Any starting pointers, which packages are needed? I once had a list of such packages, but I can't find it anymore...


Thanks a lot!
 
perhaps maybe do not do that as it may break your system as the angstrom repo is not in sync with the version of angstrom and kernel we have on the pandora.
 
Erm I fool around with nothing... I launch the devtools pnd, I then launch code::blocks...


code::blocks has a Pandora profile where I setup the relevant gcc g++ etc binaries...


I simply load the 2 PNDs and and can compile... no messing :S

Ah, that should work, but starting IDE straight from dev terminal from freamons dev c++ pnd with 'pnd_run (app) &&' should save a lot of setup stuff (in C:: B)
 
perhaps maybe do not do that as it may break your system as the angstrom repo is not in sync with the version of angstrom and kernel we have on the pandora.

Even if I only install ...-dev packages (and of course the development tools packages)?I see that there is a risk in breaking the system by installing incompatible (binary) libraries for example, but that may not be necessary...?I really need a development environment accessible via ssh terminal.Daniel
 
hmmm Im not sure maybe you could just extract the libs etc from the PND and place them where they need to be?
 
also, even when using the PND and when there is the need to install additional libs (or at least headers / -dev packages) as far as I can see I need to install them on the OS directly and there will be the risk of breaking the OS then, right?


So using the PND won't save me from this risk anyway


I think I will simply isntall all the packages via opkg, and in case anything breaks, Ill need to reinstall the system. It's not such a big deal, if I carefully document all changes to the system, which I usually do anyway.


Daniel
 
A pnd-run means to mount the pnd, run the job inside, then unmount it; this one keeps the terminal open so that it doesn't just exit (and thus unmount the pnd.) You vcould just mount it yourself, as well (doing the 3 steps manually.)


Anyway, once that terminal comes up, the pnd is mounted; inside that terminal, the $PATH and such are just set so that the binaries show up and just work.


You could ssh in and thus get another shell, and its just a matter of setting the $PATH to look in the right place (such as /media/WHATEVER/pandora/cdevtoolswhatever/... something like that, and good to go.


Other options include just installing tools to NAND (Could be risky), or installing OS to SD card and booting from that, then installing willy nilly into that (near infinite 'disk space' then, since you're on SD), or of course cross compilation on another machine but you've written that off.


Or a VM, such as sebt3's setup :)


Lots of options :)


jeff
 
There's always this thread: http://www.gp32x.de/board/index.php?/topic/53964-cross-compiling-is-bollocks-toolchains-are-bollocks-use-your-pandora-to-build-apps/


Which shows a list of packages you'll need from Angstrom's Repository. If I remember right, there's a small hitch, following the instructions seems to bork the ncurses library, after installing the packages, just copy the ncurses from the HF6 install that should be on your NAND (though you're not using it).


Dev work from a desktop is still usually the best, though I generally compile stuff on my Pandora anyway (cross compiling isn't my strong suit). So let me know if you have additional questions, your setup seems very similar to mine.


Also, keep the OS on your NAND around, especially when you're testing a PND you've made, it's nice to have a clean version of the OS to test on, just to make sure dependencies and the like are correct.
 
Last edited by a moderator:
The tools should be available to the entire system once you have the terminal window open...
They aren't. I tested it. ...Started the PND, terminal opened. Then I manually opened another terminal -> "make" returned "command not found".Same with a terminal over ssh.Am I doing something wrong here? Daniel
You could try something like this (probably have to adapt the pnd path):



Code:
/usr/pandora/scripts/pnd_run.sh -p /pandora/menu/cdevtools.pnd -b cdevtools -m

cd /mnt/utmp/cdevtools

source .cdevrc

(Note that for me, mounting the cdevtools pnd this way failed when another PND was active. No idea why that happens.)


I usually do something quick and dirty like this...


On my PC, with X11:


xhost <address of the pandora>


ssh user@<address of the pandora>


On the Pandora:


export DISPLAY=<address of the pc>:0.0


xfce4-panel &


I now have an Pandora XFCE panel exported to the X server on the PC, and can start PNDs right from there.
 
Last edited by a moderator:
Interesting idea. Thanks!


Well, the xhost method will only work on a Linux PC, right?


Or is there some kind of X client software for Windows, too?


If so, this would of course be a much more elegant way than using VNC!


Daniel
 
Well, the xhost method will only work on a Linux PC, right?


Or is there some kind of X client software for Windows, too?
The pnd_run.sh method should work fine over ssh (or if cdevtools are already started, going to the mount directory and sourcing .cdevrc is all the magic that's required, really).


As for X11 on Windows I'm just using Cygwin/X: http://x.cygwin.com/
 
oh great!


Xming might eliminate the need for VNC completely! I wasn't aware that there is any X solution for Windows.


Probably this is also much faster than VNC.


Thanks, will try this.


Daniel
 
Last edited by a moderator:
Back
Top