3ba286f3e1
* Rename modified fdlibm to jerry-libm
* Move third-party/fdlibm to jerry-libm
* Rename original fdlibm.h to jerry-libm-internal.h
* And remove it from the public headers.
* Rename jerry-libm's public header to math.h
* This also makes jerry-core sources include `<math.h>`. Therefore,
should anyone want to use a different libm implementation with
jerry, it becomes possible. (The same way as we provide a minimal
libc with standard headers, but should it be insufficient or
conflicting for someone, it can be replaced.)
* Drop `s_` prefix from jerry-libm sources
* The original fdlibm implementation had various prefixes (e.g., `k_`
for sources of kernel routines, and `w_` for wrapper routines), but
after the specialization of fdlibm to jerry, only `s_` remained.
Since it does not encode anything anymore, it can be dropped.
* Stylistic edits to jerry-libm's CMakeLists
* Align project name with other CMakeLists in the code base
* Move Jerry-LibM under Apache License
* Using the same approach as was used by linux-wireless when ath5k
driver license needed clarification. Solution was proposed by SFLC.
External mail for future reference: http://lwn.net/Articles/247806/
* Tests & checks
* Remove FD from the name of libm unit test-related files
* Make vera++ and cppcheck check jerry-libm
* Targets
* Speculative update of targets to use jerry-libm
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
About
Files in this folder (embedding/esp8266) are copied from examples/project_template of esp_iot_rtos_sdk and modified for JerryScript. You can view online from this page.
How to build JerryScript for ESP8266
1. SDK
Follow this page to setup build environment
2. Patch ESP-SDK for JerryScript
Follow this page to patch for JerryScript building. Below is a summary after SDK patch is applied.
3. Building JerryScript
cd ~/harmony/jerryscript
make -f ./targets/esp8266/Makefile.esp8266 clean
make -f ./targets/esp8266/Makefile.esp8266
Output files should be placed at $BIN_PATH
4. Flashing for ESP8266 ESP-01 board (WiFi Module)
Steps are for ESP8266 ESP-01(WiFi) board. Others may vary. Refer http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family page.
4.1 GPIO0 and GPIO2
Before flashing you need to follow the steps.
- Power off ESP8266
- Connect GPIO0 to GND and GPIO2 to VCC
- Power on ESP8266
- Flash
4.2 Flashing
make -f ./targets/esp8266/Makefile.esp8266 flash
Default USB device is /dev/ttyUSB0. If you have different one, give with USBDEVICE, like;
USBDEVICE=/dev/ttyUSB1 make -f ./targets/esp8266/Makefile.esp8266 flash
5. Running
- Power off
- Disonnect(float) both GPIO0 and GPIO2
- Power on
Sample program here works with LED and a SW with below connection.
- Connect GPIO2 to a LED > 4K resistor > GND
- Connect GPIO0 between VCC > 4K resistor and GND
If GPIO0 is High then LED is turned on longer. If L vice versa.