Installing Pebble SDK on Amazon Web Services (AWS)

[Long Version]

I’m working on including a full blown Pebble App builder for 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.


  1. Spin up an AWS 64 bit Ubuntu Server 12.04.2 LTS
  2. aws amiSSH into dev box using the PEM key you used for the EC2 instance.
  3. Update all security packages if it mentions updates are available

    sudo apt-get update
  4. Check which directory you are in. If you’re not in /home/ubuntu navigate there
    cd /home/ubuntu
  5. Create Directory for pebble-dev
    mkdir pebble-dev
  6. Change directory to pebble-dev

    cd pebble-dev
  7. Pull the PebbleKit file into your directory. You can use my URL for now
  8. Check that both the zip and pebble-dev dir are in your folder

  9. Make sure to have unzip installed.
    sudo apt-get install unzip
  10. Unzip PebbleKit
  11. Install mpc libraries as well as 32 bit compatibility 
    sudo apt-get install libmpc2 libmpc2:i386 ia32-libs
  12. Download ARM Tools
  13. untar files
    tar xjf arm-cs-tools-*.tar.bz2
  14. Add the binary installation directory to your path with this command
    export PATH=/home/ubuntu/pebble-dev/arm-cs-tools/bin:$PATH
  15. 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
  16. test compile
    echo "int main(void) {return 0;}" | arm-none-eabi-gcc -x c -
  17. If you get “warning: cannot find entry symbol _start;”Then it’s setup correctly.
  18. Make sure a file called “a.out” was created in the Pebble/sdk/build directory 

  19. Install Python libraries and pipsudo 
    sudo apt-get install dpkg-dev python-dev python-pip
  20. Open sdk Pebble DIR 
    cd Pebble/sdk
  21. Install the Python library dependencies
    pip install --user -r requirements.txt
  22. Run 
    ./waf configure

    If you get…”‘configure’ finished successfully (0.056s)”
    then it worked!

  23. Run
     ./waf build
  24. Check if sdk.pbw is in the Pebble/sdk/build directory if it is then you’re set!
  25. 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