Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
jerryscript-mbed/ | 12-May-2024 | - | 2,283 | 1,065 | ||
js/ | 12-May-2024 | - | 98 | 48 | ||
source/ | 12-May-2024 | - | 93 | 47 | ||
tools/ | 12-May-2024 | - | 281 | 161 | ||
.gitignore | D | 12-May-2024 | 108 | 10 | 9 | |
Makefile | D | 12-May-2024 | 2.2 KiB | 95 | 57 | |
Makefile.travis | D | 12-May-2024 | 1.7 KiB | 41 | 11 | |
README.md | D | 12-May-2024 | 2.6 KiB | 75 | 49 | |
mbed-os.lib | D | 12-May-2024 | 77 | |||
mbed_app.json | D | 12-May-2024 | 102 | 8 | 7 | |
template-mbedignore.txt | D | 12-May-2024 | 147 | 11 | 10 |
README.md
1# JerryScript with mbed OS 5 2 3TL;DR? jump straight to [quickstart](#quick-start) 4 5## Introduction 6 7This directory contains the necessary code to build JerryScript for devices 8capable of running mbed OS 5. It has been tested with the following boards 9so far: 10 11- [Nordic Semiconductor NRF52 Development Kit](https://developer.mbed.org/platforms/Nordic-nRF52-DK/) 12- [NXP Freedom K64F](https://developer.mbed.org/platforms/FRDM-K64F/) 13- [STM NUCLEO F401RE](https://developer.mbed.org/platforms/ST-Nucleo-F401RE/) 14- [Silicon Labs EFM32 Giant Gecko](https://developer.mbed.org/platforms/EFM32-Giant-Gecko/) 15 16## Features 17 18### Peripheral Drivers 19 20Peripheral Drivers are intended as a 1-to-1 mapping to mbed C++ APIs, with a few 21differences (due to differences between JavaScript and C++ like lack of operator 22overloading). 23 24- [DigitalOut](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.1/APIs/io/DigitalOut/) 25- [InterruptIn](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.1/APIs/io/InterruptIn/) 26- [I2C](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.1/APIs/interfaces/digital/I2C/) 27- setInterval and setTimeout using [mbed-event](https://github.com/ARMmbed/mbed-events) 28 29## Dependencies 30 31### mbed CLI 32 33mbed CLI is used as the build tool for mbed OS 5. You can find out how to install 34it in the [official documentation](https://docs.mbed.com/docs/mbed-os-handbook/en/5.1/dev_tools/cli/#installing-mbed-cli). 35 36### arm-none-eabi-gcc 37 38arm-none-eabi-gcc is the only currently tested compiler for jerryscript on mbed, 39and instructions for building can be found as part of the mbed-cli installation 40instructions above. 41 42### make 43 44make is used to automate the process of fetching dependencies, and making sure that 45mbed-cli is called with the correct arguments. 46 47### nodejs 48 49npm is used to install the dependencies in the local node_modules folder. 50 51### gulp 52 53gulp is used to automate tasks, like cloning repositories or generate source files. 54If you create an own project, for more info see [mbed-js-gulp](https://github.com/ARMmbed/mbed-js-gulp). 55 56### (optional) jshint 57 58jshint is used to statically check your JavaScript code, as part of the build process. 59This ensures that pins you are using in your code are available on your chosen target 60platform. 61 62## Quick Start 63 64Once you have all of your dependencies installed, you can build the example project as follows: 65 66```bash 67git clone https://github.com/ARMmbed/mbed-js-example 68cd mbed-js-example 69npm install 70gulp --target=YOUR_TARGET_NAME 71``` 72 73The produced file (in build/out/YOUR_TARGET_NAME) can then be uploaded to your board, and will 74run when you press reset. 75