Setting up a Palm OS/Sony Clie Development Environment
Why would I do this in 2019? Because fun! I found this unit in Malaysia and wanted to try and control my BeoVision MX 7000 with it. Turns out that none of the software I tried wanted to work! Actually, even at first, I had trouble trying to install the applications. Everything wanted HotSync? Muhahaha... I remember those old days! The I found this forum thread where everyone is just like "duh, copy the files to the LAUNCHER folder"... and so, I did.. and so, well, the apps worked... but that was about it.
Of course, before even getting the MS to read, I needed to find a reader that would support it. There seems to be (at least) three types of MemoryStick and this thing uses the very first version. I tried my standard card-reader that I use constantly for my camera's SDHC card, but this wouldn't read the MS at all. Fortunately, there was an older reader (with CF slot!) in my box-o-junk that happily read the MS. Of course, it then didn't read the SDHC, so there was a lot of juggling to get data transfered.
So, the apps.. OmniRemote Pro was the closest to work. It supported learning and even supposedly 'recognised' my fake BeoVision remote. But no attempt to send the signal back to the TV worked.
At least I now knew how to run external programs... let's write one!?
Cygwin + PRC-Tools
GCC for Palm OS (or PRC Tools) is a self-contained compiler that sits on top of Cygwin. It even comes with source code examples. I've recorded the steps below to set up a functional development environment... the code even worked on the Sony!
Firstly, download Cygwin 32-bit Setup from here. 64-bit won't work! Once downloaded, run setup-x86.exe -X from the command line to allow unsigned packages. Choose a local mirror and then add http://prc-tools.sourceforge.net/install in the User area below. After adding, both mirrors will be selected... hit next. Search for prc and check the selections...
Make sure you then also choose to install make and pilrc. Hit next and let it all install. Whilst that's happening, go and download the Palm OS SDKs from here. Yes, you'll need to download the whole lot (Download as Zip from the root github folder), but it's not that big. Once downloaded, extract the contents to a new directory called c:\Cygwin\PalmDev.
If everything has been done correctly, then open the Cygwin Terminal and run palmdev-prep.exe.
$ palmdev-prep.exe Checking SDKs in /PalmDev sdk-1 headers in 'include', no libraries sdk-2 headers in 'include', no libraries sdk-3.1 headers in 'include', no libraries sdk-3.5 headers in 'include', libraries in 'lib' sdk-4 headers in 'include', libraries in 'lib' sdk-5r3 headers in 'include', libraries in 'lib' sdk-5r4 headers in 'include', libraries in 'lib' When GCC is given no -palmos options, SDK '5r4' will be used by default Writing SDK details to configuration files... ...done
Yes, we got it installed!... Now grab the code from this link and try and compile it...
$ make m68k-palmos-gcc -O2 -Wall -g -c -o helloworld.o helloworld.c 3 [main] m68k-palmos-gcc (11268) C:\cygwin\bin\m68k-palmos-gcc.exe: *** fatal error in forked process - couldn't allocate heap, Win32 error 487, base 0xEF0000, top 0xF50000, reserve_size 389120, allocsize 393216, page_const 4096 915 [main] m68k-palmos-gcc (11268) cygwin_exception::open_stackdumpfile: Dumping stack trace to m68k-palmos-gcc.exe.stackdump 1 [main] m68k-palmos-gcc 1983 dofork: child -1 - forked process 11268 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 m68k-palmos-gcc -O2 -Wall -g -o helloworld helloworld.o pilrc -q -ro -o helloworld.ro helloworld.rcp build-prc -n helloworld -c helo helloworld helloworld.ro
That error looks a little scary... but whatever... let's see what happens?! Noooo waaaaay....
We got an icon! Does it work?
Look at that glorious string of redundant text! Next I'll come back and write actual source to talk via IRDA. Maybe even to my Matsucom On Hand PC?
January 25th, 2021 - 15:44
Greetings from Perth WA. What version of Windows are you running for the PalmOS tool chain? I used your guide to install it on my Windows 10 64-bit machine but when I try to compile I get messages that a forked process died unexpectedly. I’ve also tried following the guide by pmig96 for installing under Windows 10 but hit another wall there. It’s starting to look like I’ll need to set up an older version of Windows just for PalmOS development. Regards, Andrew.
January 25th, 2021 - 15:50
Hi Andrew,
It was definitely Win10-64bit. Win7 on a VM might be the best choice if no platofrms work.
Otherwise, paste your actual Cygwin log here and we’ll see if we can work it out.
Steven.
January 25th, 2021 - 15:51
Note that there’s a hint here that your packages in Cygwin might be out of whack:
https://stackoverflow.com/questions/9300722/cygwin-error-bash-fork-retry-resource-temporarily-unavailable/14509551#14509551
January 25th, 2021 - 16:41
Thanks Steven for the lightning fast reply. That Stack Overflow thread with clear instructions on how to rebase cygwin was very useful. To make that work I also had to set the peflags as described in the comment https://stackoverflow.com/a/27940600. Now my helloworld example compiles as clean as a whistle without any of the scary messages on your screenshot. My initial goal is to build the IRDA project in Microchip application note AN888. Unfortunately it was built on a slightly different tool chain and I have to work out how to adapt the makefile. Initial attempts at compiling that project are still throwing up fatal errors in forked process so I might have more cygwin issues to deal with.