ARMmbed / ARMmbed/mbed-js-example

Building for RTL8195AM/RTL8711AM

Open
#14 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Hi team

I am having trouble finding out the correct name for the RTL8195AM board to give to the TARGET=xxx part of the gulp file.
I tried giving TARGET=REALTEK_RTL8195AM and TARGET=RTL8195AM but none of these seems to get the build generated

Also on ubuntu gulp --target=xxx (for the two cases above) show this error

/Downloads/mbedjs/mbed-js-repl-example$ gulp --target=RTL8195AM
[17:19:38] Using gulpfile ~/Downloads/mbedjs/mbed-js-repl-example/Gulpfile.js
[17:19:38] Starting 'make-build-dir'...
[17:19:38] Finished 'make-build-dir' after 104 μs
[17:19:38] Starting 'makefile'...
[17:19:38] Starting 'bundle'...
[17:19:38] Starting 'ignorefile'...
[17:19:38] Finished 'makefile' after 35 ms
[17:19:38] Starting 'get-jerryscript'...
[17:19:38] Finished 'get-jerryscript' after 73 μs
[17:19:38] Starting 'getlibs'...
[17:19:38] Finished 'ignorefile' after 29 ms
[17:19:38] Finished 'getlibs' after 10 ms
$ make getlibs
make: Nothing to be done for 'getlibs'.
[17:19:38] Finished 'bundle' after 79 ms
[17:19:38] Starting 'cppify'...
[17:19:38] 'cppify' errored after 29 ms
[17:19:38] Error: Command failed: python jerryscript/tools/js2c.py --ignore pins.js --no-main
Traceback (most recent call last):
File "jerryscript/tools/js2c.py", line 126, in
main()
File "jerryscript/tools/js2c.py", line 121, in main
with open(os.path.join(script_args.output_path, 'jerry-targetjs.h'), 'w') as gen_file:
IOError: [Errno 13] Permission denied: './source/jerry-targetjs.h'
`python jerryscript/tools/js2c.py --ignore pins.js --no-main` (exited with error code 1)
at callback (/home/xxxxxxx/Downloads/mbedjs/mbed-js-repl-example/node_modules/child-process-promise/lib/index.js:33:27)
at ChildProcess.exithandler (child_process.js:277:5)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:897:16)
at Socket.stream.socket.on (internal/child_process.js:340:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:548:12)

So thinking this was an issue with not running this command using sudo, i added the same and then ran, only stumble on a different issue:

Using gulpfile /home/nareshkrish/Downloads/mbedjs/mbed-js-repl-example/Gulpfile.js
[17:20:49] Starting 'make-build-dir'...
[17:20:49] Finished 'make-build-dir' after 115 μs
[17:20:49] Starting 'makefile'...
[17:20:49] Starting 'bundle'...
[17:20:49] Starting 'ignorefile'...
[17:20:49] Finished 'makefile' after 35 ms
[17:20:49] Starting 'get-jerryscript'...
[17:20:49] Finished 'get-jerryscript' after 71 μs
[17:20:49] Starting 'getlibs'...
[17:20:49] Finished 'ignorefile' after 29 ms
[17:20:49] Finished 'getlibs' after 11 ms
$ make getlibs
make: Nothing to be done for 'getlibs'.
[17:20:49] Finished 'bundle' after 80 ms
[17:20:49] Starting 'cppify'...
[17:20:49] Finished 'cppify' after 24 ms
[17:20:49] Starting 'build'...
[17:20:50] Found native packages: mbed-js-repl
$ make BOARD=RTL8195AM EXTRAS=/home/nareshkrish/Downloads/mbedjs/mbed-js-repl-example/node_modules/mbed-js-repl/.
[17:20:51] build/make
[17:20:51] Finished 'build' after 1.27 s
[17:20:51] Starting 'default'...
[17:20:51] Finished 'default' after 23 μs
cd jerryscript/targets/mbedos5 && pip install -r tools/requirements.txt && rm -f source/js_encoded.cpp && rm -f source/pins.cpp && rm -f source/main.cpp && make BOARD=RTL8195AM EXTRA_SRC="/home/nareshkrish/Downloads/mbedjs/mbed-js-repl-example/node_modules/mbed-js-repl/.:../../../source" EXTERN_BUILD_DIR=../../../out/RTL8195AM NO_JS=1
Requirement already satisfied: pycparser<=2.17 in /usr/local/lib/python2.7/dist-packages (from -r tools/requirements.txt (line 1))
Requirement already satisfied: simpleeval in /usr/local/lib/python2.7/dist-packages (from -r tools/requirements.txt (line 2))
Requirement already satisfied: pycparserext in /usr/local/lib/python2.7/dist-packages (from -r tools/requirements.txt (line 3))
Requirement already satisfied: ply>=3.4 in /usr/local/lib/python2.7/dist-packages (from pycparserext->-r tools/requirements.txt (line 3))
make[1]: Entering directory '/home/nareshkrish/Downloads/mbedjs/mbed-js-repl-example/build/jerryscript/targets/mbedos5'
python tools/generate_pins.py RTL8195AM
Traceback (most recent call last):
File "tools/generate_pins.py", line 247, in
main()
File "tools/generate_pins.py", line 237, in main
pins = enumerate_pins(pins_file, ['./tools'] + list(includes), defines)
File "tools/generate_pins.py", line 154, in enumerate_pins
parser=GnuCParser())
File "/usr/local/lib/python2.7/dist-packages/pycparser/__init__.py", line 86, in parse_file
text = preprocess_file(filename, cpp_path, cpp_args)
File "/usr/local/lib/python2.7/dist-packages/pycparser/__init__.py", line 49, in preprocess_file
('Original error: %s' % e))
RuntimeError: Unable to invoke 'cpp'. Make sure its path was passed correctly
Original error: [Errno 2] No such file or directory
Makefile:72: recipe for target 'source/pins.cpp' failed
make[1]: Leaving directory '/home/nareshkrish/Downloads/mbedjs/mbed-js-repl-example/build/jerryscript/targets/mbedos5'
make[1]: *** [source/pins.cpp] Error 1
Makefile:14: recipe for target 'all' failed
make: *** [all] Error 2
events.js:182
throw er; // Unhandled 'error' event
^

Error: Command `make BOARD=RTL8195AM EXTRAS=/home/nareshkrish/Downloads/mbedjs/mbed-js-repl-example/node_modules/mbed-js-repl/.` exited with code 2
at ChildProcess.handleSubShellExit (/home/nareshkrish/Downloads/mbedjs/mbed-js-repl-example/node_modules/gulp-run/command.js:166:13)
at Object.onceWrapper (events.js:318:30)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)

Kinda stuck. I really want to try the js on mbed stuff and run it on some custom rtl8195 board but not able to proceed. Any help would be appreciated.

Thanks
Naresh K

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Gulpfile.js and trace the build through jerryscript/tools/js2c.py, then inspect tools/generate_pins.py and the Makefiles under jerryscript/targets/mbedos5. Reproduce the RTL8195AM build and determine whether the reported permission and missing cpp failures are handled by the project. Done means the documented build completes for the target without those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.