[Long Version]
I’m working on including a full blown Pebble App builder for radicalflow.io where you can build Pebble apps from a good looking HTML canvas. RadicalFlow translates the positioned HTML elements over to C code and builds the PBW for you.You can download the C code with all the elements as well in zip format for further editing. We hacked together a prototype last night for positioning label elements with the main properties (background color, font color, frame, text alignment). My next step was getting the compiler ready to build the files into PBW format for further testing.
I was using CloudPebble for the testing last night, but the need to compile PBW straight from our app wasn’t possible…I took the journey into setting up an AWS 64bit Ubuntu Server.
This is the process I did to setup the server from start to finish.
[Short version]
I built an AWS 64bit Ubuntu Server for the Pebble SDK. Here are the steps I took.
- Spin up an AWS 64 bit Ubuntu Server 12.04.2 LTS
SSH into dev box using the PEM key you used for the EC2 instance.
- Update all security packages if it mentions updates are available
sudo apt-get update
- Check which directory you are in. If you’re not in /home/ubuntu navigate there
cd /home/ubuntu
- Create Directory for pebble-dev
mkdir pebble-dev
- Change directory to pebble-dev
cd pebble-dev
- Pull the PebbleKit file into your directory. You can use my URL for now
wget http://wesleylorenzini.com/pebble_files/PebbleKit-v1.1.1.zip
- Check that both the zip and pebble-dev dir are in your folder
ls
- Make sure to have unzip installed.
sudo apt-get install unzip
- Unzip PebbleKit
unzip PebbleKit-v1.1.zip
- Install mpc libraries as well as 32 bit compatibility
sudo apt-get install libmpc2 libmpc2:i386 ia32-libs
- Download ARM Tools
wget http://developer.getpebble.com/files/sdk-release-001/arm-cs-tools-ubuntu-12.04-2012-12-22.tar.bz2
- untar files
tar xjf arm-cs-tools-*.tar.bz2
- Add the binary installation directory to your path with this command
export PATH=/home/ubuntu/pebble-dev/arm-cs-tools/bin:$PATH
- Test that it works. If you get a return like…”arm-none-eabi-gcc (32-bit ARM EABI Toolchain )JBS-2012….” Then it’s setup correctly
arm-none-eabi-gcc --version
- test compile
echo "int main(void) {return 0;}" | arm-none-eabi-gcc -x c -
- If you get “warning: cannot find entry symbol _start;”Then it’s setup correctly.
- Make sure a file called “a.out” was created in the Pebble/sdk/build directory
ls
- Install Python libraries and pipsudo
sudo apt-get install dpkg-dev python-dev python-pip
- Open sdk Pebble DIR
cd Pebble/sdk
- Install the Python library dependencies
pip install --user -r requirements.txt
- Run
./waf configure
If you get…”‘configure’ finished successfully (0.056s)”
then it worked! - Run
./waf build
- Check if sdk.pbw is in the Pebble/sdk/build directory if it is then you’re set!
- If you want to grab that file you will need a web server Make sure you have port 8080 enabled in the EC2 Security Groups!
python -m SimpleHTTPServer 8080