ARMmbed / ARMmbed/mbed-js-v2

gulp build fails if toolchain is specified by MBED_GCC_ARM_PATH

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
9
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The following command fails if gcc toolchain is specified only by the MBED_GCC_ARM_PATH environment variable.
`gulp build --js ./source/main.js --target=K64F`

Error Message:
```
mbed-js-v2 user$ gulp build --js ./source/main.js --target=K64F
[14:55:21] Using gulpfile ~/mbed/mbed-js-v2-org/gulpfile.js
[14:55:21] Starting 'bundle'...
[14:55:21] Starting 'pip-requirements'...
[14:55:21] Starting 'make-build-dir'...
[14:55:21] Finished 'make-build-dir' after 601 μs
[14:55:21] Finished 'bundle' after 147 ms
[14:55:22] Finished 'pip-requirements' after 827 ms
[14:55:22] Starting 'cppify'...
[14:55:22] Starting 'generate-pins'...
[14:55:22] Finished 'cppify' after 171 ms
[14:55:24] 'generate-pins' errored after 1.67 s
[14:55:24] ChildProcessError: `python /Users/user/mbed/mbed-js-v2/mbed-js/tools/generate_pins.py K64F` failed with code 1
at ChildProcess. (/Users/user/mbed/mbed-js-v2/node_modules/child-process-promise/lib/index.js:132:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:554:12)

```

To avoid the error, the gcc toolchain path should be included in the PATH environment variable.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with gulpfile.js and trace the generate-pins task that invokes mbed-js/tools/generate_pins.py for the K64F target. Reproduce the command with only MBED_GCC_ARM_PATH set, then verify that the build completes without requiring the toolchain path to be added separately to PATH.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript, python
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.