0

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

按照下面的链接

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

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

还有这个模拟器的链接

https://github.com/Helco/PebbleLocalSim

我安装了pebblesdkMAC但是当我运行

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

创建新项目

pebble new-project hello_world

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

-bash: build: command not found
  1. 还有一次我试图安装这里解释的依赖项

我遇到了问题 命令: 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 时会出现一些问题,但我无法找到问题的根源

4

2 回答 2

1

您的系统 (OS X 10.7) 与 Pebble SDK 提供的最新版本的 arm-cs-tools 编译器不兼容。您应该可以通过在此处手动下载此旧版本的 arm-cs-tools然后将其解压缩到您的 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

请参阅此页面以获取旧的安装说明(SDK 1.x - 只需查看安装编译器的后半部分)。

如果您仍然无法使用它,CloudPebble是一个很好的入门方式。

于 2014-06-09T23:53:59.737 回答
0

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

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

于 2014-06-06T19:41:48.293 回答