microsoft / pxt

Microsoft MakeCode (PXT - Programming eXperience Toolkit)
https://makecode.com
MIT License
2.09k stars 581 forks source link

Following pxt-microbit readme throws an error at pxt serve #2238

Closed adamcarriere closed 7 years ago

adamcarriere commented 7 years ago

Trying to get a pxt dev environment set up so I can create my own target, starting by trying pxt-microbit.

Following the instructions in the pxt-microbit README gives the following output when running pxt serve:

Could not determine target's pxt-core location, falling back to default: C:\Users\Adam Carriere\Documents\...\pxt
Using target PXT/microbit with build engine yotta
  Target dir:   C:\Users\Adam Carriere\Documents\...\pxt-microbit
  PXT Core dir: C:\Users\Adam Carriere\Documents\...\pxt
building node_modules/pxt-core...
[run] cd node_modules/pxt-core; jake.cmd
local pxt-core built.
building sim...
[run] cd sim; node ../node_modules/typescript/bin/tsc
Could not determine target's pxt-core location, falling back to default: C:\Users\Adam Carriere\Documents\...\pxt
building target.json in C:\Users\Adam Carriere\Documents\...\pxt-microbit...
building libs/core
  skip native build of non-project
building libs/radio
  skip native build of non-project
building libs/devices
  skip native build of non-project
building libs/bluetooth
  skip native build of non-project
building libs\blocksprj
*** yotta target bbc-microbit-classic-gcc
INTERNAL ERROR: Error: spawn yotta ENOENT
    at exports._errnoException (util.js:1018:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Cloning the pxt-microbit repo next to the pxt repo, following the Build instructions, and running jake serve gives:

[serve] cd ../pxt-microbit; node ../pxt/built/pxt.js serve
Could not determine target's pxt-core location, falling back to default: C:\Users\Adam Carriere\Documents\...\pxt
Using target PXT/microbit with build engine yotta
  Target dir:   C:\Users\Adam Carriere\Documents\...\pxt-microbit
  PXT Core dir: C:\Users\Adam Carriere\Documents\...\pxt
building node_modules/pxt-core...
[run] cd node_modules/pxt-core; jake.cmd
local pxt-core built.
building sim...
[run] cd sim; node ../node_modules/typescript/bin/tsc
Could not determine target's pxt-core location, falling back to default: C:\Users\Adam Carriere\Documents\...\pxt
building target.json in C:\Users\Adam Carriere\Documents\...\pxt-microbit...
building libs/core
updating shims.d.ts (size=32980)...
  skip native build of non-project
building libs/radio
updating shims.d.ts (size=6197)...
  skip native build of non-project
building libs/devices
updating shims.d.ts (size=961)...
  skip native build of non-project
building libs/bluetooth
updating shims.d.ts (size=5607)...
  skip native build of non-project
building libs\blocksprj
*** yotta target bbc-microbit-classic-gcc
INTERNAL ERROR: Error: spawn yotta ENOENT
    at exports._errnoException (util.js:1018:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
jake aborted.
TypeError: task.fail is not a function
    at ChildProcess.ch.on (C:\Users\Adam Carriere\Documents\...\pxt\jakeutil.js:106:18)
    at emitTwo (events.js:106:13)
(See full trace by running task with --trace)

These instructions for the Command Line Tool work fine:

mkdir microbit
cd microbit
pxt target microbit
pxt serve

It should also be noted that the Target Creation instructions also fail to run with pxt serve

Hopefully I'm just overlooking/missing something simple. This is all happening on Windows 10.

pelikhan commented 7 years ago

Make sure you have yotta installed and in the path. http://docs.yottabuild.org/#installing

adamcarriere commented 7 years ago

Almost!

Now I'm getting:

'srec_cat' is not recognized as an internal or external command,
operable program or batch file.
ninja: build stopped: subcommand failed.
error: command ['ninja'] failed

I'm assuming I need to install srec_cat now?

adamcarriere commented 7 years ago

Okay I got everything up and running!!! 😄 🎆

Steps needed:

  1. Install Yotta (manual install for Windows)
  2. Make sure C:\Python27\Scripts is in the Path
  3. Download SRecord 1.64 and move it to C:\
  4. Add C:\srecord_dir to the Path

Can this be added to the documentation?

pelikhan commented 7 years ago

Care to package your first PR? :)

adamcarriere commented 7 years ago

Done!

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.