Pebble sdk - mac中的安装和调试问题

时间:2014-06-06 12:57:12

标签: macos pebble-watch pebble-sdk

我正在学习鹅卵石手表的开发。所以我开始使用模拟器和sdk安装来学习基本的“hello world”程序。

以下链接

https://developer.getpebble.com/2/getting-started/

https://developer.getpebble.com/2/getting-started/hello-world/

此模拟器的链接

https://github.com/Helco/PebbleLocalSim

我在pebble中安装了MAC sdk,但是当我运行

curl -sSL https://developer.getpebble.com/install.sh | sh && source ~/.bash_profile

在终端我收到此错误

 Build failed! Everything installed, but building a new project doesn't work.
    Failure reason: Setting top to                           : /Users/XYZ/pebble-dev/install_test 
Setting out to                           : /Users/XYZ/pebble-dev/install_test/build 
Checking for program gcc,cc              : arm-none-eabi-gcc 
Could not determine the compiler version ['arm-none-eabi-gcc', '-dM', '-E', '-']
(complete log in /Users/LinGoMac/pebble-dev/install_test/build/config.log)
[ERROR   ] The compiler/linker tools could not be found. Ensure that the arm-cs-tools directory is present in the Pebble SDK directory (/Users/XYZ/pebble-dev/PebbleSDK-2.2) 

弹出窗口出现以下错误,要求我发送邮件给pebble

Process:         Python [472]
Path:            /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier:      Python
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  Python [471]

Date/Time:       2014-06-06 14:22:53.826 +0530
OS Version:      Mac OS X 10.7.5 (11G63b)
Report Version:  9

Interval Since Last Report:          21828 sec
Crashes Since Last Report:           12
Per-App Crashes Since Last Report:   7
Anonymous UUID:                      CA26DAE0-4D41-46C1-AC66-745E7957302C

Crashed Thread:  Unknown

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00007fff5fc01028

Backtrace not available

Unknown thread crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000055  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x0000000000000000
   r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000000
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  rip: 0x00007fff5fc01028  rfl: 0x0000000000010203  cr2: 0x00007fff5fc01028
Logical CPU: 1

Binary images description not available


External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 181
    thread_create: 0
    thread_set_state: 0

Model: iMac12,1, BootROM IM121.0047.B1F, 4 processors, Intel Core i5, 2.7 GHz, 4 GB, SMC 1.71f22
Graphics: AMD Radeon HD 6770M, AMD Radeon HD 6770M, PCIe, 512 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1333 MHz, 0x02FE, 0x45424A3231554538424655302D444A2D4620
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1333 MHz, 0x02FE, 0x45424A3231554538424655302D444A2D4620
AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x9A), Atheros 9380: 4.0.67.5-P2P
Bluetooth: Version 4.0.8f17, 2 service, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: ST31000528AS, 1 TB
Serial ATA Device: OPTIARC DVD RW AD-5690H
USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfa100000 / 3
USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 4
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8215, 0xfa111000 / 5
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x850b, 0xfa200000 / 2
USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfd100000 / 2
USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0xfd110000 / 4
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd120000 / 3

为了避免这种错误,我甚至尝试了手动安装,但即使在我成功安装了这些链接中描述的所有依赖项之后,我仍然在另外两个场景中发现了相同的错误

  1. 当我安装了所有依赖项并且我尝试构建“hello world”程序时,我遇到了同样的问题而且它无法构建程序,而是表示command build not found
  2. 创建新项目

    pebble new-project hello_world
    
    进入hello_world目录后,我运行了构建并抛出了错误

    -bash: build: command not found
    
    1. 我尝试安装依赖项的另一次解释here
    2. 我遇到了这个问题 命令: brew install SDL SDL_ttf SDL_image --universal

      错误:

      Warning: sdl-1.2.15 already installed, it's just not linked
      Error: You must `brew link sdl' before sdl_ttf can be installed
      Error: You must `brew link sdl' before sdl_image can be installed
      

      我确信在为我的小贩安装PYTHON和SDL时会出现问题,但我无法找到问题的根源

2 个答案:

答案 0 :(得分:1)

您的系统(OS X 10.7)与Pebble SDK提供的最新版本的arm-cs-tools编译器不兼容。您应该可以通过手动下载此older version of arm-cs-tools here然后在pebble-dev文件夹中解压缩来解决此问题:

cd ~/pebble-dev/
tar -zxvf ~/Downloads/arm-cs-tools-osx-10.7-2013-04-04.tar.bz2

然后通过运行以下命令来测试工具:

export PATH=~/pebble-dev/arm-cs-tools/bin:$PATH
echo "int main(void) {return 0;}" | arm-none-eabi-gcc -x c -

这应该给你一个警告并生成一个a.out文件。如果这样做有效,您可以返回项目并运行pebble build

有关旧安装说明,请参阅this page(SDK 1.x - 只需查看安装编译器的后半部分)。

如果仍然无法让它工作,CloudPebble是一个很好的入门方式。

答案 1 :(得分:0)

如果您可以运行pebble new-project hello_world,那么您可能已正确安装了SDK。

您似乎正在尝试build来构建项目。您需要pebble build