maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   N900 programming (Dummies/N00B etc) guides? (https://talk.maemo.org/showthread.php?t=50069)

kingoddball 2010-04-15 06:37

N900 programming (Dummies/N00B etc) guides?
 
Hello!
I'm looking at playing with some programming.
I have made a simple helloworld on the SDK.
I would like to find a wiki or something similar to learn how to make some more software? Even a guide to add a button :eek:

I have an 'end goal' which is to port Arduino IDE to N900 and other similar ARM devices (Pandora). I can program arduino's (Wiring is the language - Similar to C).

I'm not a linux user, I use OSX.
I do have a copy of Mint Linux (8 - community edition/XFCE) running via VMware which I use quite a bit, but as for terminal commands and such - I have no clue. I use copy and paste.

With the helloworld I made, when I close the program xterm does not get released correctly and I can not regain control (only tested in N900 emulator in the SDK). I'm sure what I need is a button with an end command.

There only programming skills I used to have was using a full IDE (Like visual basic, XCode and similar).
I have never had to work using text based only (except arduino and html).

Is there a graphical IDE available that could help me?

Thank you all very much!

http://i369.photobucket.com/albums/o...ll/N900SDK.jpg

Edit: I am very proud of a crappy helloworld! VERY!

noobmonkey 2010-04-15 06:43

Re: N900 programming (Dummies/N00B etc) guides?
 
Hi KingoddBall - i'm suprised you have got as far as you have without reading the deeloper guides? - some of the tmo people have been very hard with guides etc.....

http://wiki.maemo.org/Documentation/...eveloper_Guide

With regards to the ide - it depends on what you are programming? (C etc....)

There is QT, that comes in a range of styles, but QT, is pretty much an IDE :D

kingoddball 2010-04-15 06:46

Re: N900 programming (Dummies/N00B etc) guides?
 
C is fine. I understand the basic concepts of it from my younger days and Wiring/Processing programming.

QT - May I ask if that has something similar build (compile) and will just work for N900 or is it going to be tricky like trying to get XCode to compile for ARM devices?

I am very sorry for the stupid questions. (I am reading the dev guides now [probably print them])

noobmonkey 2010-04-15 06:50

Re: N900 programming (Dummies/N00B etc) guides?
 
have to admit i use PYQT - so i have no idea about C and compiling :|

But a quick google search brings up these
http://qt.nokia.com/developer/faqs/79

http://stackoverflow.com/questions/6...-xcode-project

lllddd 2010-04-15 07:07

Re: N900 programming (Dummies/N00B etc) guides?
 
Do all your coding in Qt IDE (Creator and whatnot).

Then use MADDE as the environment to compile; it has the entire N900 libraries, headers and toolchains bundled. The current MADDE version is Qt4.5 based and supposedly the next one will have Qt4.6/PR1.2 built in and I'm eagerly awaiting that release. There is a distribution for Linux, OSX, and Windows to create a common compiler environment amongst those platforms.

Once you've completed the coding of the Qt application (you can still compile it natively within QtCreator for testing on your desktop, and there is a way to use MADDE toolchains within QtCreator), launch the MADDE terminal, go to your code repository and run:

mad qmake <.pro file>
mad make

and there's your binary. Copy it to your phone into say... /opt/test/ (easiest with a simple scp). chmod +x the binary you've copied over onto the n900, and execute it within XTerminal.

vahe 2010-04-15 08:33

Re: N900 programming (Dummies/N00B etc) guides?
 
thanks, but how about putting links in your post to make it user friendly?

noobmonkey 2010-04-15 08:55

Re: N900 programming (Dummies/N00B etc) guides?
 
google qt creator and madde is in one of the repos :)

kingoddball 2010-04-15 09:02

Re: N900 programming (Dummies/N00B etc) guides?
 
I am downloading QT for OSX QT Downloads - Will this work?


Is MADDE the toolchain I will need to compile? Sorry - ARM cores are new to me.
I found a guide to make a HelloWorld in QT but it's done using Linux - Similar in OSX, too?

I can not wait until I get the grasp of making some basic software. I used to program back in Windows 98-XP days! (Made some cool stuff, but all VB6 language). Well before all this ARM stuff became popular.

gunni 2010-04-15 09:15

Re: N900 programming (Dummies/N00B etc) guides?
 
You may want to look here for Madde and QtCreator on Mac:
http://wiki.maemo.org/MADDE/QtCreato...ration_for_Mac

And here for some MADDE examples:
http://wiki.maemo.org/MADDE

lllddd 2010-04-15 10:30

Re: N900 programming (Dummies/N00B etc) guides?
 
Quote:

Originally Posted by kingoddball (Post 611492)
I am downloading QT for OSX QT Downloads - Will this work?

It should work. gunni gave the links to get MADDE and QtCreator tied together. Be aware that PR1.1 firmware only has Qt4.5 as the baseline, so I've only used the v4.5 SDK (plus MADDE current is Qt4.5).

I don't care/worry too much about the runtime device debugger section just yet. Most of the things I'm doing are manual labor... eg I use QtCreator for development and and to test the application UI locally on the desktop to make sure there are no broken code blocks. Then I use MADDE to do the n900 device build for me and copy the executable over.

Quote:

Is MADDE the toolchain I will need to compile? Sorry - ARM cores are new to me. I found a guide to make a HelloWorld in QT but it's done using Linux - Similar in OSX, too?
MADDE is the only cross-platform toolchain you'll need to build complete n900 applications (easiest install method I know of). Don't concern yourself about the particular core, as that only affects you if you're using some device specific code like hardware access, kernel access, etc. But if you're only mostly doing user applications, then using Qt and standard Linux libs are all you need to know.

Qt is meant to be virtually write-once, compile anywhere SDK; it's that flexible, although with some caveats. So your single HelloWorld source code can be compiled for any platform supported by Qt (windows, linux, maemo, osx); it all depends on your output target.

I can't speak more from an expert p.o.v because like you, I'm just starting to delve into maemo+Qt and I was a little daunted with simply getting started. But once I got MADDE installed and QtCreator there, it made it a lot more obvious.

My first attempt is a project I'm hosting on google (http://code.google.com/p/maemocalllogviewer/) which is a call log viewer which displays a bit more information that the standard N900 call log. You can grab the source code from there and compile for yourself (using my example of going into MADDE, and doing "mad qmake MaemoCallLogViewer.pro" and "mad make"). I've also uploaded a compiled binary on the project site.

kingoddball 2010-04-16 22:33

Re: N900 programming (Dummies/N00B etc) guides?
 
Hi Again,

I have been trying at this for the past two days with a big failure.
MADDE is fully installed.... Can not get it to work..
No matter what 'mad' 'mad-admin' or anything i get command not found..

-bash: mad: command not found

Are there any other options?

lllddd 2010-04-17 00:42

Re: N900 programming (Dummies/N00B etc) guides?
 
Unsure about OSX installs. But if "command not found" is shown, then you might need to add mad to your PATH environment variable within the MADDE session (under Windows it's /bin).

Where's your MADDE toolchains installed to? Basically all the madde commands are offset from that, ie <MADDE_install>/bin/mad

kingoddball 2010-04-17 00:55

Re: N900 programming (Dummies/N00B etc) guides?
 
Thank you for your support. I have given up on trying this under OSX..

Ever since I upgraded to SnowLeopard I have had nothing but trouble with programming and pretty much everything else. I'm sure I am not the only one here having these issues with 10.6.x.

BUT! I am NOT giving up! I am going to try it all again, on my VMware Mint Linux.
I just wanted to have all the software being created on my main OS.. Back to VM!
I'll report back if it fails again.. Then maybe I'll finally give up :(

kingoddball 2010-04-17 08:01

Re: N900 programming (Dummies/N00B etc) guides?
 
I am attempting the linux way now...

I have installed QT (1.3.80) and MADDE 32bit...
The madde folders have no "targets"!

Help? Where is the qmake required for QT?

I have found a /cache folder with fremantle-qt .tar.gz
I'm guessing that is what I need - how or what do I with with that?
I used: $ tar zxf file.tar.gz and it's running but spitting back a bunch of errors.

can not write and no space left on target?? (VM is set up to take as much HDD as it needs)

lllddd 2010-04-17 12:04

Re: N900 programming (Dummies/N00B etc) guides?
 
I suppose you downloaded your MADDE sources from http://tablets-dev.nokia.com/MADDE.php and did the basic install using the instructions from http://wiki.maemo.org/MADDE

Under Windows, these are the files in /cache in MADDE, but when I installed madde I didn't need to manually extract them because the installer did that itself:
arm-2007q3-51sb6-arm-none-linux-gnueabi_w32.tar.bz2
fetch_aliases
fremantle-arm-sysroot-2.2009-51-1-qt453.tar.gz
madde.conf
qt-tools-4.5.3-windows.tar.gz

If installed correctly, all the build tools for the N900/ARM platform are located under /targets/fremantle-qt-0951/bin - the "mad" command uses the contents of /targets/default to determine the build target. For that reason, you shouldn't use "$ qmake" but instead "$ mad qmake" and "$ mad make" when building.

Note that even though you've set the VM to have expandable drive sizes, Linux doesn't do dynamic sizing automatically and partitions are created with fixed values. You can see how much space you've got left on Linux/OSX by doing "$ df -k"

kingoddball 2010-04-17 13:06

Re: N900 programming (Dummies/N00B etc) guides?
 
Thank you very much (again).
I am redoing all my VM Linux setup again.

I Will setup /scratchbox with QT support aswell.
Then do Madde again. I have changed the hdd to a set 20GB. Should be better.

Thank you!

lllddd 2010-04-18 02:34

Re: N900 programming (Dummies/N00B etc) guides?
 
Installation MADDE into Linux was very straightfoward; btw, I instaleld scratchbox a few weeks ago and found the process was a bit more involved than MADDE - although be careful if you are trying to install scratchbox on Linux-64bits because the scratchbox tools are only 32-bit so follow the instructions for 64-bit Linux carefully if you are planning on such an adventure (mostly related to VDSO32 stuff)

Here's what madde installed into Linux looks like:
~/.madde/0.6.14/ # the toolchain
~/bin/mad # soflink to mad command

you only need to add ~/bin to your PATH environment (also to your .bashrc if you don't have it there): $ export PATH=$PATH:~/bin

There is no "MADDE terminal" as such on Linux or OSX, you execute the "mad" command directly from your terminal/xterm.


All times are GMT. The time now is 15:54.

vBulletin® Version 3.8.8