A complete Palm OS development environment for macOS ARM (Apple Silicon) with pre-built toolchain, SDK, and hello world template. Supports both Palm OS 4 (68K) and Palm OS 5 (native ARM via PEAL).
This is a fork of savaughn/palmdev-macos. It adds Palm OS 5 (ARM) support via PEAL, the Palm OS SDK 5r3, a dual-target Makefile and a portable ZIP build. Background and a walkthrough: palm2000.com
# Clone this repository
git clone https://github.com/User7142/palmdev-macos.git palmdev-macos
cd palmdev-macos
# Run setup (downloads toolchain and SDK)
./setup-toolchain.sh
# Build hello world
cd helloworld
make build
# Output: build/HelloWorld.prc ready to install on Palm device!- Pre-built prc-tools - m68k-palmos-gcc (68K) and arm-palmos-gcc (ARM) compilers for macOS ARM
- Palm OS SDK - Headers and libraries for Palm OS 4 and 5r3
- PEAL - Palm Executive ARM Loader for native ARM apps on Palm OS 5
- Build tools - pilrc, build-prc, peal-postlink, pilot-link
- Dual-target Makefile template - Build for Palm OS 4 or 5 with one command
- Hello World template - Ready-to-build sample application
- Automated setup - One-command installation
- macOS 11+ (Big Sur or later)
- Apple Silicon
- Homebrew installed
- ~100MB disk space
The setup script will:
-
Download prc-tools from GitHub releases
- Installs to local
toolchain/directory - Includes m68k-palmos-gcc 2.95.3
- Installs target directories to
/usr/local/{arm,m68k}-palmos/
- Installs to local
-
Install support tools via Homebrew
- pilrc (resource compiler)
- pilot-link (device communication)
-
Download Palm OS SDK from jichu4n/palm-os-sdk
- Installs to
/usr/local/palmdev/ - Includes SDKs for Palm OS 1.0 through 5r4
- Installs to
-
Configure toolchain with palmdev-prep
- Writes GCC specs files to
/usr/local/lib/gcc-lib/ - Writes trap numbers to
/usr/local/share/prc-tools/ - Configures SDK paths for compilation
- Writes GCC specs files to
The Makefile automatically finds the toolchain - no need to source any config files!
# Build the hello world app (Palm OS 4, 68K)
cd helloworld
make buildAll build output goes to the build/ directory.
For native ARM performance on Palm OS 5 devices (e.g. Tungsten T3), use the dual-target Makefile template:
# Create a new project from templates
mkdir myapp && cd myapp
cp ../templates/Makefile .
cp ../templates/app.rcp .
cp ../templates/palmos5/main_arm.c .
cp ../templates/palmos5/stub_m68k.c .
cp ../templates/palmos5/pace.h .
# Edit Makefile: set APP_NAME, CREATOR_ID, ARM_SOURCES
# Build for Palm OS 5 (ARM native with 68K stub)
make build TARGET=palmos5
# Or build for Palm OS 4 (pure 68K) with the same Makefile
cp ../templates/palmos4/main.c .
make build TARGET=palmos4A Palm OS 5 ARM app consists of:
- 68K stub - loaded by Palm OS, detects ARM CPU, loads ARM code via PEAL
- ARM binary - native ARM code packed as
armcresources bypeal-postlink - PACE wrappers (
pace.h) - call Palm OS APIs from ARM via 68K emulator callbacks
PEAL loads and executes ARM code on Palm OS 5. Components:
peal/postlink/- Host tool that converts ARM ELF to Palm OS resourcespeal/m68k/- 68K loader compiled into the stubpeal/arm/- ARM entry point (pealstub.c, must be linked first)
# Install to Palm via USB
pilot-xfer -i build/HelloWorld.prcDrag and drop the build/HelloWorld.prc file onto the POSE window.
Copy the build/HelloWorld.prc file to your HotSync install folder.
Install Xcode Command Line Tools:
xcode-select --installInstall Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"The SDK installation requires sudo. You'll be prompted for your password.
Make sure you're using the flags in the Makefile:
m68k-palmos-gcc -palmos3.5 -nostdinc ...The -nostdinc flag prevents macOS system headers from conflicting with Palm OS headers.
Run palmdev-prep to configure the SDK:
export PATH="$PWD/toolchain/usr/local/bin:$PATH"
sudo -E env "PATH=$PATH" palmdev-prepAfter building hello world:
- Read the source -
helloworld/HelloWorld.cis fully commented - Modify the UI - Edit
helloworld/HelloWorld.rcpfor resources - Study Palm OS APIs - Check SDK headers in
sdk/sdk-4/include/orsdk/sdk-5r3/include/ - Try ARM development - Use
templates/for a Palm OS 5 ARM project - Build something cool - Games, utilities, audio apps, MIDI synths!
To update the toolchain:
# Re-run setup to get latest versions
./setup-toolchain.shFound a bug? Have a feature request? Want to share your Palm OS app?
- Open an issue
- Submit a pull request
- Share your creations!
This template and setup scripts are provided as-is for Palm OS development.
- prc-tools: GPL
- Palm OS SDK: Palm OS License (educational/non-commercial use)
- Support tools: Various open source licenses
- jichu4n - Palm OS SDK and Homebrew tap
- savaughn - prc-tools macOS ARM builds
- Palm, Inc. - Original Palm OS SDK and documentation
- prc-tools community - Maintaining the GCC toolchain
These pre-built binaries are for macOS ARM (Apple Silicon) only.