PDA

View Full Version : Programming for Palm OS?


jreagles16
11-12-2006, 02:21 AM
Hi,

I'm asking a favor from all of the 1src members. I would like to start to learn how to program for palm OS. I'm just about to finish highschool and was interested to do it as a hobby. Maybe someday become a pro. I consider myself fairly knowledgable on Palm OS and now want to take it to the next step and contribute.

1) I was wondering if there are any links or anything info that you could post to help me get started.

2) What language is good to start out with. I have heard pascal and pearl? But I thought pascal is becoming out dated and I have had people say start with c++( which sounds like the ultimate language) but does it really take five years to learn?

3) Also, I was wondering what were your feelings and thoughts when your first started? What did you start with and any other useful info?

4) First goal, I would love to learn how to skin and also create small little freeware tracker apps maybe in a couple of years.
Second goal, is to utlimately create games and really good reliable apps like Kinoma 4, Warfare Incorprated, skin UI, !NEW OS!( someday I would like to create a new Operating system that is free[like linux, but for palm]) and so on. Hopefullly in four years or so.

I have no knowledge and My goals are probably really high but I was wondering if you guys could help. I appreciate it a lot.


Thank you again for taking the time to help.



I love my E/E2 and treo 700p.

Tam Hanna
11-13-2006, 02:19 AM
Hi,
I write a bit about programming in my Palm OS Blog - the link to TamsPAlm is in my signature....

If you dig through the Development category and also gobble up the editorials, you should have a good overview of the contents of my brain =)

jreagles16
11-13-2006, 03:06 AM
cool thank you very much. I'll look at it.

I love my mom
11-13-2006, 07:24 AM
He he, I asked this same question on that beautiful Frebruary day long ago.... If you search you can dig up some threads containing the advice they gave me. Do you have any past experience in programming? It really reallly helps.

jreagles16
11-13-2006, 02:49 PM
Nope none should I rethink this?


I love palm I'm always playing around with it. Dimrty beat me to one app I wanted to created the poision pill arg. But I probably would have been to late anyways.

How long does it take to learn a language is it like learnng a foregin language?

Thanks for the tip I'll search the threads I have been google searching and found some good starting points.

Thanks again for the help. Sorry if this is repetive question.

jreagles16
11-13-2006, 02:56 PM
lol hey dimtry (if you don't mind me asking) I remember reading an interview about you and was wondering what language did you laern first cause you said pascal.


Well my question is do you recommend learning pascal first?

thanks for anyinfo.

dmitrygr
11-13-2006, 03:03 PM
for palm first i did is pascal, as PalmPascal was onboard, and easy to learn with plenty of examples. In general I first learned C. MY father forced me to learn it back when I was six. :-)

I love my mom
11-15-2006, 05:35 PM
I learned PP first, then C. But I feel it would better to learn C first. BTW, Philllippe just released NaPP Pascal ARM compiler.

Learning a Programming language is nothing like a foreign language. It's much much easier. Shouldn't take you more than two or three weeks to get the basics of a language.

MikeB
11-16-2006, 01:27 PM
I would recommend C++ as your goal, since that is probably what will be a good, dominant language by the time you are fully up to speed. Especially if you are wanting to get into programming highly graphic, responsive, performance applications (either on Palm or elsewhere). C++ (and related C#) are the tools of the professionals.

So, how do you get there from here? Many languages will give you the basics on programming and the thought process needed to "think like a programmer." I believe that you want to learn object oriented techniques early, since if you start with a procedural language (pure C, Pascal, or Basic), then you will have to unlearn some stuff. I heard it said that it would be easier and faster to teach someone programming from the ground-up in OO than trying to convert an "old-school" programmer over.

For the Palm, start in the Palm/Access Developer areas to see what's available.

I like OrbForms Designer/Architect, since it gives you a taste of OO programming with a C++-like environment, but doesn't bog you down with all of the environment details like Codewarrior or gcc would. And you can begin developing within a few weeks. So, the better you become with that, the less your learning curve would be to get to the professional environment. Plus it will tell you if you even like programming.

There are others that would have strong arguments for basic and pascal. Just my advice (I manage sw engineers): if you really do want to become a pro developer, those will not get you there as fast.

That's my 2c.

Nitron
11-16-2006, 06:30 PM
There are so many different places you can start, it's ridiculous.
I started programming Palm by reading the O'Reilly book "Palm Programming" (but I already knew ANSI C) and then started messing with NS/Basic to get a feel for the environment. I recommend staying away from NS/Basic and I'm pretty sure Dmitry would agree. I then started up with C again, first with Codewarrior but now with PRC-Tools. OnBoardC is nice also, I guess, although it's somewhat limiting.
There are tons of places for information on Palm programming. There are multiple developers here and on the official palm-dev-forum. I just picked up O'Reilly's "Palm OS Network Programming" and it's quite good but assumes you already know the platform. Good luck.

Off-topic: Anybody notice that the tooltip on the :shortcut: says "command" and the :command: says "shortcut"?

potter
11-17-2006, 11:11 AM
Off-topic: Anybody notice that the tooltip on the :shortcut: says "command" and the :command: says "shortcut"?
Yeah, I noticed: http://www.1src.com/forums/showthread.php?t=98817

holvoetn
11-17-2006, 12:18 PM
Yeah, I noticed: http://www.1src.com/forums/showthread.php?t=98817So you did ... I bumped that thread ;)

jreagles16
11-18-2006, 12:42 AM
Thanks for all the heplful info.


For a compiler what do you guys think of borland?

Cause I can get a free copy and was wondering what your inputs are on it.


Thank you very much for your help.

GadgetGuru05
11-18-2006, 12:51 AM
COBOL was useless for me and it was the first touch with programming and i hated it.
Than i played with HTML, DHTML, XML, JAVA, JAVA SCRIPT, FLASH, MAYA etc...
But i love the graphic part like user interface design... im more an artist than a programmer.... but i do know a good basic of everything.

Nitron
11-18-2006, 11:25 AM
Thanks for all the heplful info.


For a compiler what do you guys think of borland?

Cause I can get a free copy and was wondering what your inputs are on it.


Thank you very much for your help.

I'm not sure Borland can do Palm stuff...I'd still recommend PRC-Tools, since it's still free. It's a little bit more complicated than Borland or Codewarrior because you have to deal with Makefiles and whatnot, but there are "project templates" out there that you can use to get started with it. If you can find it/afford it, Codewarrior is the way to go, though (again, I'm pretty sure Dmitry would agree on Codewarrior, since we've had this conversation.)
If Borland can compile with a target of m68k, though, try it.

Ryukotse
02-12-2007, 07:54 PM
would visual basics turn over to palm basic be a worth while to use for programming my palm? Im only a highschool senior learning visual basic and i already have c++ and visual c++ down, so do you think thats good? And using hotpaw basic to interperite it? Just wanted to know.

Modnar
02-12-2007, 08:22 PM
Yeah I though I would have a crack at programming and more so specifically palm programming as I going to be learning it in uni this year so i thought i would learn at least something now so its easier when I come to it. I'm looking into c++ (for palm) and visual basic (got the software for it from MS :D ) and using something like palm OS dev suite to make the prc's in the end when I get better at the language! But stick with c++ on windoze at the moment!

Ryukotse
02-13-2007, 08:42 PM
ofcourse, i have c++ down as well as visual c++, and visual basic is at its learning stage in my mind.though i really don't like windows, i only use it because of my feild of programming and the languages i learn are c++ and vb. Not because i prefer it or anything, on this laptop i use it for that and aim, but my main os is either ubuntu, dsl, dreamlinux or something along the lines of suse or redhat, And well the ndis wrappers for linux aren't as lovable for my wireless card as i wish they were. I enjoy either a LILO or GRUB loader to give me either a choice between my windows os and my Linux os. "Linux=Love". I know palm has hotpawbasic and you can buy the software but im not into that at the moment. Another question, and im sure i could look into it my self but its better for a reliable source to be asked instead. Does microsoft visual studios 6.0 enterprise edition have any tools for .prc file creation or any palm programming software attachments or anything of that sort? Oh and if anyone knows a good CGI software for palm let me know, i would really like to find one similar to blender to take up my time.

phreakonaleash
02-14-2007, 01:07 PM
My suggestion: get good at windows/ console programming first. It will make your life sooo much easier when you step over to palm. The console has maybe a 100 functions in the APi tops, while palm has... well alot.

Start with soemthing easy in C, OnBC, then move to PODS, then PRC_tools, then, if you are rich like everyone else here, go codewarrior.

JUst a thougght...

Ryukotse
02-14-2007, 01:11 PM
i take it all of those languages sans c are different languages than i know as it is. What language is codewarrior based on if any, or is it an entire language itself. And where can i get information on learning these other languages for free if any.

I love my mom
02-14-2007, 01:15 PM
Codewarrior is C, as is PODS, PRC Tools, and OnboardC, they're all just different compilers.

Codewarrior is the best compiler, but it's 400 bucks.

Ryukotse
02-14-2007, 01:19 PM
hmm, well i did use borland for c++ last year in ctec. It was such a pain but i got the hang of it so a compiler isn't much of an issue. And how different is the c from the newer c++ and the even new c#? And how can i learn the refrences of C for free? And again does anyone know if they ported blender or another cgi software to palm os?

dmitrygr
02-14-2007, 01:22 PM
learn c, it is the best for palmos: http://en.wikipedia.org/wiki/The_C_Programming_Language_(book)

Ryukotse
02-14-2007, 01:25 PM
two more quick questions, does anyone know if those compilers were made for debian, or suse, and can i compile c in a c++ compiler for testing on windows before i port it over to the palmos?

potter
02-14-2007, 01:46 PM
Some additional notes:
Codewarrior, PODS, and PRC tools can can do C and C++.
OnBoard C can only do C.
The Palm APIs are in C, thus callable from C, C++ and many other languages.
Codewarrior was the official development platform for Palm OS development.
PODS is now the official development platform for Palm OS development.
Codewarrior was originally a Mac compiler and it still works best on a Mac.
PODS, PRC tools and OnboardC are all free. However, OnboardC needs a resource editor. Last time I check it was integrated with RsrcEdit which is not free (shareware). However it is possible to use Bird, which is free. PODS is actually Eclipse with some configurations and additional tools to be an IDE around the PRC Tools compiler.
PRC tools does work under Linux. It is actually just gcc built as a cross compiler with a few additional tools.
Last I check PODS did not work under Linux, however since Eclipse does, and PRC Tools does I would expect one should be able to get it operational under Linux. Since Access is moving towards Linux, I would expect them to eventually release a Linux disptribution of PODS. You can test your applications on your desktop using the Palm OS Emulator or Palm OS Simulator. The Palm OS Emulator is available under Windows, Mac or Linux. Only supports Palm OS 1.0 through 4.X.
The Palm OS Simulator is currently only available under Windows. Supports Palm OS 5.0 and above.
It is possible to use gdb to debug applications on the Emulator.

bh77a
02-14-2007, 07:14 PM
Blender has not been ported to Palm.

_Em
02-14-2007, 08:04 PM
ANSI C is the original language, and is the successor to B (which is why it was called C). It has been a standard programming language since the mid 80's, although in some areas, Pascal was once more popular for hardware-ignorant programming (not necessarily hardware independant, but you don't need to know all the registers, etc. of the specific chips your device is using).

C++ is a pseudo-object-oriented wrapper around C. It's basically C with some extra libraries that make it function more like an object oriented language such as LISP. C code will compile with a C++aware compiler. C++ code won't compile with a standard C compiler.

C# is Microsoft's version of Java, and uses a similar syntax to C++, but compiles to bytecode that can run on a virtual machine.

ObjectiveC is a language built from the ground up to be object oriented, but holds on to the rules of ANSI C wherever possible.

A compiler takes code written in the language it compiles, and converts it into binary instructions for whatever hardware target it is designed to compile for. Compilers generally recognize various patterns in human written code and convert those patterns into optimized routines that work well on the target hardware. This means that different compilers will have different characteristics -- some will result in smaller file sizes, some will result in faster code execution, some will have better sanity checks (fewer compiled-in bugs, more checks for syntax related errors), etc. CodeWarrior was a compiler/development environment originally designed by a company called MetroWerks for the Macintosh computers running Motorola 680x0 CPUs, and competed with Apple's MPW-based compilers. When Palm came on the scene, CodeWarrior was already compiling C code for the Motorola 680x0 family of processors, so Metrowerks made a tweaked version that complied with Palm's OS APIs and libraries/headers.

PRC Tools has its roots in the gcc compiler, which is the Open Source (GNU) community's answer to the cc (short for c compiler) compiler originally written for AT&T Unix. This development was tweaked by volunteers to handle Palm's OS APIs and libraries/headers, similarly to what Metrowerks did with their Macintosh compiler.

The difference here is that Macs were designed around a GUI interface, and CodeWarrior reflects this. Until the advent of OS X and Apple's XCode IDE, CodeWarrior was the de facto standard environment because of the attention paid to user interface detail and the quirks of the Motorola chipset. GCC on the other hand is a command line toolset used by those who know their way around OS design; it has one purpose only, and that is to convert programming code to binary data. No editor, no automatic library linking, etc. That is all left up to the end user.

I think Potter handled the rest of the details :)

dmitrygr
02-14-2007, 08:16 PM
C++ is truely object oriented, not pseudo, unless i misunderstood something?

khertan
02-15-2007, 02:58 AM
"unless i misunderstood something?" C++ is just a hack to get c object oriented ... there are many things that let's many people say that c++ isn't a truely object language for example many people consider statically-typed language aren't full object oriented. But many other consider it like a real object oriented language ...

It s like the mac/pc debate ... A geek war ...

phreakonaleash
02-15-2007, 01:00 PM
PODS, PRC tools and OnboardC are all free.
However, OnboardC needs a resource editor. Last time I check it was integrated with RsrcEdit which is not free (shareware). However it is possible to use Bird, which is free.

There is a fix in the OBC UserGroups' file section/experimantal versions

_Em
02-15-2007, 02:53 PM
"unless i misunderstood something?" C++ is just a hack to get c object oriented ... there are many things that let's many people say that c++ isn't a truely object language for example many people consider statically-typed language aren't full object oriented. But many other consider it like a real object oriented language ...

It s like the mac/pc debate ... A geek war ...
Indeed... to both parts :)
C++ is an object oriented extension to c; it allows you to write code in an object-oriented manner, but the language and compiler aren't based on objects, such as LISP or even Python are. In LISP and Python for example, you can run code recursively inside itself, debug live running code, swap out objects at runtime, re-define ANY part of the language to suit your needs, etc. C++ has no notion of lambda constructs, has stratified scoping, and has some language rules that don't persist through areas of scope.

The basic answer is that you can write fully object oriented code in C++, but the language itself is not truly object oriented.

lordbah
12-29-2007, 11:08 AM
PRC tools does work under Linux. It is actually just gcc built as a cross compiler with a few additional tools.
Last I check PODS did not work under Linux, however since Eclipse does, and PRC Tools does I would expect one should be able to get it operational under Linux. Since Access is moving towards Linux, I would expect them to eventually release a Linux disptribution of PODS. You can test your applications on your desktop using the Palm OS Emulator or Palm OS Simulator. The Palm OS Emulator is available under Windows, Mac or Linux. Only supports Palm OS 1.0 through 4.X.
The Palm OS Simulator is currently only available under Windows. Supports Palm OS 5.0 and above.


As far as I can tell, it's still true (as posted back in February) that Access doesn't supply any way of testing Palm OS 5 apps on Linux. Or am I missing something?

phreakonaleash
12-29-2007, 11:57 AM
They do. They released a Garnet VM emulator (http://tamspalm.tamoggemon.com/2007/04/18/access-publishes-garnet-vm-emulator/), which, unlike the simulator, is a full ARM emulator. It's slow, but far more powerful than the simulator.

lordbah
12-29-2007, 07:13 PM
They do. They released a Garnet VM emulator (http://tamspalm.tamoggemon.com/2007/04/18/access-publishes-garnet-vm-emulator/), which, unlike the simulator, is a full ARM emulator. It's slow, but far more powerful than the simulator.

Thru their web interface I don't see this tool. Maybe I'm following the wrong links. (Wanting to develop something to install on my Palm today, I had no reason to follow any Access Linux links). But then if you really can't install applications, what's the point anyway? Eh, maybe it's been updated since that blog entry, I'll download it and see.

phreakonaleash
12-29-2007, 10:27 PM
You can install things on the vm.... :)

The VM has nothing to do with ALP, it's its own entity from ACCESS like the netfront browser.

Tomohawk
12-30-2007, 10:48 AM
I have been using the DevC++ IDE system for several years. It's a no-nonsense IDE, but it does let you write code and compiles with the gcc. The developers are working on extensions for PalmOS too, but nothing yet.

All freeware.

I love my mom
12-30-2007, 01:16 PM
I have been using the DevC++ IDE system for several years. It's a no-nonsense IDE, but it does let you write code and compiles with the gcc. The developers are working on extensions for PalmOS too, but nothing yet.

All freeware.

I use DevC++ myself. I'd like to see it come to the PalmOS, but I'm very content with PRC-Tools until then.

phreakonaleash
12-30-2007, 01:18 PM
Well, since prc-tools is gcc under cygwin and Dev-C++ is basically gcc under mingw (minimalist gnu for windows) plus a GUI, it should be fairly straight forward to uild prc-tools under mingw.
Heck it might work better, not being tied to cygwin so much.

lordbah
01-25-2008, 07:05 AM
You can install things on the vm.... :)


I'm going to need a hint. I can start gvm, I can start gras-client. In GC the "ping" command says the GVM is running but not accepting sessions. But I have no idea whether or not I need "sessions" - there is almost no documentation with this thing. Neither "applaunch hello1.prc" nor "dbimport hello1.prc" succeeds. Sounds like I am where you were when you wrote your blog entry that there is no way to install apps. I tried making an "autoload" folder (under GVM, under bin, and under linux_rel) and putting hello1.prc in it, and using "appswitch hello1" but that doesn't work either ("can't open session").

choisum
01-27-2008, 07:08 AM
ANSI C is the original language, and is the successor to B (which is why it was called C).

Oh, K&R C predated ANSI C. A verly long time ago I was interviewed on the differences between them :eek:

lordbah
02-11-2008, 06:30 AM
Does anyone have this thing working who can walk me through it?

javispedro
04-06-2008, 07:31 AM
I'm going to need a hint. I can start gvm, I can start gras-client. In GC the "ping" command says the GVM is running but not accepting sessions. But I have no idea whether or not I need "sessions" - there is almost no documentation with this thing.You have to launch gvm with -G (check the readme).

I tried to setup this to test if I could use it to debug ARMlets, but as the docs say, the Debug Nub does not work at all using gvm.

I guess the only way to debug ARMlets is either
A) put lots of printf's
B) build a serial cable and connect my T|X real device with the computer, then use POD (Palm OS Debugger).

nova_seph
10-14-2008, 10:11 PM
Just to get it clear. Is there any actual support for Palm/Garnet OS 5 App Development under Linux? (meaning, an ARM compiler, emulator, and idk what else, cmon i'm a just hobbyst empiric programmer). I'd love to program for my Palm TX, but right now, I'm just reading lots of stuff, and have SrcEdit (Source Editor), Bird (Resource Editor), and OnBoardC. But without a keyboard for my palm, this is just too much for me. I'd like to write/compile/test apps in linux.
Any walkthrough somewhere?

Jerramy
10-15-2008, 10:00 AM
Often, I edit text files on a CF card using my PC, then use CF2DOC to convert it to DOC format for OnboardC. Although I do have a keyboard for my palm, it's still much easier to type on a PC. If you have a CF card reader in your palm, it's the easiest way to go in my opinion.

phreakonaleash
10-15-2008, 10:53 AM
Just to get it clear. Is there any actual support for Palm/Garnet OS 5 App Development under Linux? (meaning, an ARM compiler, emulator, and idk what else, cmon i'm a just hobbyst empiric programmer). I'd love to program for my Palm TX, but right now, I'm just reading lots of stuff, and have SrcEdit (Source Editor), Bird (Resource Editor), and OnBoardC. But without a keyboard for my palm, this is just too much for me. I'd like to write/compile/test apps in linux.
Any walkthrough somewhere?
aptitude install prc-tools wine
SImulators run under wine. prc-tools is gcc for compiling palmos apps. google prc-tools tutorial for help with make etc if you've not used it before.

Arm Native apps ARE NOT FEASIBLE under linux with prc-tools. it is possible under Metrowerks codewarrior (also runs under wine, somewhat nicely: http://appdb.winehq.org/objectManager.php?bShowAll=true&bIsQueue=false&bIsRejected=false&sClass=version&sTitle=&sReturnTo=&iId=4675 <-- i think a garbage rating is a little harsh, because I use it just fine under 1.13, even with breakpoints.)