Installing Pebble SDK on Amazon Web Services (AWS)

Posted on May 30, 2013 by

0


[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 then translates the positioned 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 since it hasn’t been updated to the newest version of the SDK and 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 therecd /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
    wget http://wesleylorenzini.com/pebble/PebbleKit-v1.1.zip
  8. Check that both the zip and pebble-dev dir are in your folder

    ls
  9. Make sure to have unzip installed.sudo apt-get install unzip
  10. Unzip PebbleKit unzip PebbleKit-v1.1.zip
  11. Install mpc libraries sudo apt-get install libmpc2
    sudo apt-get install libmpc2:i386
  12. Install 32 bit compatibilitysudo apt-get install ia32-libs
  13. Download ARM Toolswget http://developer.getpebble.com/files/sdk-release-001/arm-cs-tools-ubuntu-12.04-2012-12-22.tar.bz2
  14. untar files tar xjf arm-cs-tools-*.tar.bz2
  15. Add the binary installation directory to your path with this command export PATH=/home/ubuntu/pebble-dev/arm-cs-tools/bin:$PATH
  16. Test that it worksarm-none-eabi-gcc –version
    If you get a return like…
    “arm-none-eabi-gcc (32-bit ARM EABI Toolchain JBS-2012.03-56-v2011.09-69-17-g3019757) 4.6.3  Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.”
    Then it’s setup correctly
  17. test compileecho “int main(void) {return 0;}” | arm-none-eabi-gcc -x c –
  18. If you get“warning: cannot find entry symbol _start;”Then it’s setup correctly.
  19. Make sure a file called “a.out” was created in the Pebble/sdk/build directoryls
  20. Install Python libraries sudo apt-get install dpkg-devsudo apt-get install python-dev
  21. Install pipsudo apt-get install python-pip
  22. Open sdk Pebble DIR
    cd Pebble/sdk
  23. Since the requirements.txt isn’t available in the Pebble/sdk you can grab from my server wget http://wesleylorenzini.com/pebble/requirements.txt
  24. Install the Python library dependenciespip install –user -r requirements.txt
  25. Run ./waf configureIf you get…”‘configure’ finished successfully (0.056s)”
    then it worked!
  26. Run ./waf build
  27. Check if sdk.pbw is in the Pebble/sdk/build directory if it is then you’re set!
  28. If you want to grab that file you will need a web server python -m SimpleHTTPServer 8080

    Make sure you have port 8080 enabled in the EC2 Security Groups!

Tagged: , , ,