torpor said:
I work in embedded systems development for a major European aerospace and industrial applications company. I have, on my home development systems, 32 different cross-compiling environments for various platforms, and every one of them has their own requirements and administrative headaches. Its a damned nuisance to have to set things up when I want to switch platforms.
Cool, but normally you set up your cross-compiler once and after that you can just use it, no need to switch around stuff afterwards. Also having yet another compiler on your system itself is also a pain because it will create the same nightmare - you can't expect the same environment for a toaster compared to a Pandora.
I have, so far, on my system, compilers for: x86, x86_64, ARM (via OE), ARM (CS G++), MIPS, MIPS (via PSPSDK), AVR - and everything is working really nice. I was even able to share files between those compilers so I don't have to have redundant files on my system. If I ever have the feeling that I loose control over all my compilers, I will just write a script so its the same steps to compile for any system. But for now, I simply put a small text in my Makefiles where I note down how I compiled the project and when that was. It takes me a single look and I know how to compile stuff.
IF the compiler is onboard the Pandora from the get-go, I don't need to do anything special to any other machine, I don't have to even *have* another machine be involved in the development process: I can just use the Pandora, itself, to write apps for the Pandora. This is a highly, highly useful feature, and the day that compilers being removed from their target systems became a norm, was a sad day indeed..
You can also do this if you download the compiler later on. And yes, you will also need libraries and header files which will probably result in problems if you try to compile anything else than "hello world" or the SDL tutorials (as I could imagine, that SDL comes pre-installed on the Pandora, maybe even with headers)
Try this: take a 12 year old product off the shelf, and wonder where the compiler went? The answer is this: its gone with the computer it was originally installed on. Having a compiler installed on the Pandora means that, for as long as the Pandora hardware itself is operational, and functional, then apps can be written for the thing.
Right, and back then, I also didn't understand why there was a compiler on the device itself. While it might be nice to have a really basic way of doing things on your hardware (like bash scripts which we have on the Pandora) there is no need for a full C compiler for example - only programmers know how to use it and they probably have their own preference and will still want to grab their required packages and IDE from elsewhere as the system can't come with everything they need except for a "hello world" application.
I have to support other programmers in my job, and occasionally in my hobby projects, too .. I know the hassles and stupidity involved in guiding someone through setting up their development environment. I've seen otherwise intelligent and capable people fall on the floor in tears because their carefully-crafted cross-compiling environment has gone down the drain with the latest MS patch or virus or whatever ..
I haven't had a single problem setting up my cross-compiling environment for ARM. It was even a lot easier than I thought it would be.
Having a compiler onboard means there will *always* be a compiler for the Pandora, always, no matter what else happens in the average development environment. In fact, I believe I will make the Pandora, itself, my primary development machine for Pandora projects .. simply mount the filesystem on my PC with a large monitor, and set up my Makefiles to do the builds on the Pandora itself .. this is going to be a much smoother system than having to cross-compile, package, transfer the package, install the package on Pandora, etc.
Its not like we will go to the gcc svn and destroy it so it can't be ran on ARM anymore, you can always grab it later on, making your pandora your primary dev. machine.
And I hope you know, that you can do it the other way around too? Compile on your computer, mount the directory with the binary on your Pandora via network and execute it without "packaging, transfering the package and installing it" (which is not a part of development though imo, otherwise you would have to do it on Pandora too)?
Compiling on your x86 is probably a good bit faster than compiling on the Pandora itself and you (probably) have a large monitor to control your debugger from with direct access to the source files the binary was build from with exactly the same object files which you can easily re-create while testing your fullscreen application on the pandora.
Sure, I can understand newbies thinking its stupid to have a compiler onboard. Its easy to ignore the arguments for 'why its not "cool"'. I have 20 years of experience on this issue: its just plain *RIGHT* to put a compiler on the Pandora, and there are no good reasons to exclude it, period.
Why don't we include TONS of free e-books, documentations, movies, games, ... Right, because they are only useful for a small minority of the users. I'm fine if there is stuff which shows off the features of your new device, but a compiler is nothing special and no-one will care if its there when they first boot their machine up as the average consumer would like to see graphics and sound output probably.
Hello-World Tutorial without Pandora-compiler-onboard:
One time setup: install compiler package and required libraries
1. Edit your code on the Pandora, press build, run.
Hello-World Tutorial with cross-compiling:
1. For your environment, find a compiler which is linked from the wiki if you use x86, which you probably do. Good luck if you have a special environment on your PC or an uncommon setup on your pandora if you really want to be that special.
2. Install all the libs that the Pandora has included on its filesystem, on your other PC or mount them via network BUT you probably have or want to compile them yourself anyway.
3. Compile yourfile.c on your cross-development machine. Good luck but you won't need it as its extremly simple unless you depend on really strange libs with tons of dependencies.
4. Transfer binary to Pandora or use the mounted network share, run.
5. Hope you don't have a library/linking issue that stalls your flow but seeing how you compiled with the libs from the pandora itself, there shouldn't be any problem..