Build javascript for mbed (jerryscript)

preparation

Setup mbed CLI to your env.

s.a. Setup mbed CLI using ARM gcc on BoW (Bash on Windows, almost the same as Ubuntu 14.04 trusty)

install dependencies

install Node.js

$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ node --version
v6.9.5

install gulp

$ sudo npm install gulp-cli -g

build jerryscript

$ git clone https://github.com/ARMmbed/mbed-js-example
$ cd mbed-js-example
$ npm install
$ gulp --target=NUCLEO_F401RE

Your binary will be created "./build/out/NUCLEO_F401RE/mbedos5.bin"

Quote:

Do not install "tools" python module, since there is a problem of name conflict. If you installed the "tools" module, the following error will occur.

Traceback (most recent call last):
  File "tools/generate_pins.py", line 39, in <module>
    from tools.targets import Target
ImportError: No module named targets

If this error occurs, execute the command shown below.

$ sudo pip uninstall tools


1 comment on Build javascript for mbed (jerryscript):

12 Jul 2019

Hi, I'm having the problem you mentioned "File "tools/generate_pins.py", line 37, in <module> from tools.targets import Target ImportError: No module named tools.targets"

I have executed the command "pip uninstall tools" but the error is still there and i'm unable to make. I'm using Windows 10. Waiting for your positive response. Regards' Sohaib

Please log in to post comments.