-
-
Tried to use Vagrant and the vagrantfile in the repo folder. All pre-req scripts ran fine. But when I tried to do a make I get errors... :( :
Is making your own build is a requirement to use SD card on ESP32?
Bash output when I try to do a make from the VM (I'm totally clueless about non-web build systems):
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ sudo make clean && BOARD=ESP32 make Cleaning targets Generating platform configs Generating pin info Generating JS wrappers WRAPPERSOURCES = src/jswrap_array.c src/jswrap_arraybuffer.c src/jswrap_dataview.c src/jswrap_date.c src/jswrap_error.c src/jswrap_espruino.c src/jswrap_flash.c src/jswrap_functions.c src/jswrap_interactive.c src/jswrap_io.c src/jswrap_json.c src/jswrap_modules.c src/jswrap_pin.c src/jswrap_number.c src/jswrap_object.c src/jswrap_onewire.c src/jswrap_pipe.c src/jswrap_process.c src/jswrap_promise.c src/jswrap_regexp.c src/jswrap_serial.c src/jswrap_storage.c src/jswrap_spi_i2c.c src/jswrap_stream.c src/jswrap_string.c src/jswrap_waveform.c libs/compression/jswrap_heatshrink.c libs/filesystem/jswrap_fs.c libs/filesystem/jswrap_file.c libs/math/jswrap_math.c libs/graphics/jswrap_graphics.c libs/network/jswrap_net.c libs/network/http/jswrap_http.c libs/network/js/jswrap_jsnetwork.c libs/network/jswrap_wifi.c libs/network/esp32/jswrap_esp32_network.c targets/esp32/jswrap_esp32.c libs/network/telnet/jswrap_telnet.c libs/bluetooth/jswrap_bluetooth.c libs/crypto/jswrap_crypto.c libs/neopixel/jswrap_neopixel.c DEFINES = -DGIT_COMMIT=1921e46 -DBUILDNUMBER="274" -DESP_PLATFORM -DESP32=1 -DJSVAR_MALLOC -DUSE_DEBUGGER -DUSE_TAB_COMPLETE -DUSE_HEATSHRINK -DUSE_FILESYSTEM -DUSE_FLASHFS -DUSE_MATH -DUSE_GRAPHICS -DUSE_NET -DUSE_ESP32 -DUSE_TELNET -DBLUETOOTH -DUSE_CRYPTO -DMBEDTLS_CIPHER_MODE_CTR -DMBEDTLS_CIPHER_MODE_CBC -DMBEDTLS_CIPHER_MODE_CFB -DUSE_SHA256 -DUSE_SHA512 -DUSE_TLS -DUSE_AES -DUSE_NEOPIXEL -DESP32 -DEMBEDDED CC libs/compression/heatshrink/heatshrink_encoder.o CC libs/compression/heatshrink/heatshrink_decoder.o CC libs/compression/compress_heatshrink.o In file included from libs/compression/heatshrink/heatshrink_decoder.h:7:0, from libs/compression/heatshrink/heatshrink_decoder.c:3: libs/compression/heatshrink/heatshrink_decoder.c: In function 'heatshrink_decoder_sink': libs/compression/heatshrink/heatshrink_config.h:8:45: warning: conversion to 'size_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion] [#define](http://forum.espruino.com/search/?q=%23define) HEATSHRINK_STATIC_INPUT_BUFFER_SIZE 32 ^ libs/compression/heatshrink/heatshrink_decoder.h:37:5: note: in expansion of macro 'HEATSHRINK_STATIC_INPUT_BUFFER_SIZE' HEATSHRINK_STATIC_INPUT_BUFFER_SIZE ^ libs/compression/heatshrink/heatshrink_decoder.c:101:18: note: in expansion of macro 'HEATSHRINK_DECODER_INPUT_BUFFER_SIZE' size_t rem = HEATSHRINK_DECODER_INPUT_BUFFER_SIZE(hsd) - hsd->input_size; ^ libs/compression/heatshrink/heatshrink_decoder.c:111:24: warning: conversion to 'uint16_t {aka short unsigned int}' from 'size_t {aka unsigned int}' may alter its value [-Wconversion] hsd->input_size += size; ^ libs/compression/heatshrink/heatshrink_decoder.c: In function 'st_yield_literal': libs/compression/heatshrink/heatshrink_decoder.c:210:21: warning: conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Wconversion] uint8_t c = byte & 0xFF; ^ libs/compression/heatshrink/heatshrink_decoder.c: In function 'st_backref_index_msb': libs/compression/heatshrink/heatshrink_decoder.c:223:35: warning: conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Wconversion] uint16_t bits = get_bits(hsd, bit_ct - 8); ^ libs/compression/heatshrink/heatshrink_decoder.c:226:25: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] hsd->output_index = bits << 8; ^ libs/compression/heatshrink/heatshrink_encoder.c: In function 'heatshrink_encoder_sink': libs/compression/heatshrink/heatshrink_decoder.c: In function 'st_backref_count_msb': libs/compression/heatshrink/heatshrink_decoder.c:245:35: warning: conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Wconversion] uint16_t bits = get_bits(hsd, br_bit_ct - 8); ^ libs/compression/heatshrink/heatshrink_decoder.c:248:25: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] hsd->output_count = bits << 8; ^ libs/compression/heatshrink/heatshrink_encoder.c:149:29: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] uint16_t write_offset = get_input_offset(hse) + hse->input_size; ^ libs/compression/heatshrink/heatshrink_encoder.c:151:20: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] uint16_t rem = ibs - hse->input_size; ^ libs/compression/heatshrink/heatshrink_encoder.c:152:22: warning: conversion to 'uint16_t {aka short unsigned int}' from 'size_t {aka unsigned int}' may alter its value [-Wconversion] uint16_t cp_sz = rem < size ? rem : size; ^ libs/compression/heatshrink/heatshrink_decoder.c: In function 'st_yield_backref': libs/compression/heatshrink/heatshrink_decoder.c:282:30: warning: conversion to 'uint16_t {aka short unsigned int}' from 'size_t {aka unsigned int}' may alter its value [-Wconversion] hsd->output_count -= count; ^ libs/compression/heatshrink/heatshrink_encoder.c:156:24: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] hse->input_size += cp_sz; ^ libs/compression/heatshrink/heatshrink_decoder.c: In function 'get_bits': libs/compression/heatshrink/heatshrink_decoder.c:317:25: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] accumulator <<= 1; ^ libs/compression/heatshrink/heatshrink_encoder.c: In function 'st_step_search': libs/compression/heatshrink/heatshrink_encoder.c:276:20: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] uint16_t end = input_offset + msi; ^ libs/compression/heatshrink/heatshrink_encoder.c:277:22: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] uint16_t start = end - window_length; ^ libs/compression/heatshrink/heatshrink_encoder.c:281:24: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] max_possible = hse->input_size - msi; ^ libs/compression/heatshrink/heatshrink_encoder.c: In function 'st_yield_tag_bit': libs/compression/heatshrink/heatshrink_encoder.c:311:34: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] hse->outgoing_bits = hse->match_pos - 1; ^ libs/compression/heatshrink/heatshrink_encoder.c: In function 'st_yield_br_inde': libs/compression/heatshrink/heatshrink_encoder.c:337:34: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] hse->outgoing_bits = hse->match_length - 1; ^ libs/compression/heatshrink/heatshrink_encoder.c: In function 'st_yield_br_length': libs/compression/heatshrink/heatshrink_encoder.c:353:38: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] hse->match_scan_index += hse->match_length; ^ libs/compression/heatshrink/heatshrink_encoder.c: In function 'find_longest_match': libs/compression/heatshrink/heatshrink_encoder.c:492:14: warning: conversion to 'int16_t {aka short int}' from 'int' may alter its value [-Wconversion] for (pos=end - 1; pos - (int16_t)start >= 0; pos--) { ^ libs/compression/heatshrink/heatshrink_encoder.c:505:31: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int16_t {aka short int}' may change the sign of the result [-Wsign-conversion] match_index = pos; ^ libs/compression/heatshrink/heatshrink_encoder.c:524:16: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] return end - match_index; ^ libs/compression/heatshrink/heatshrink_encoder.c: In function 'push_outgoing_bits': libs/compression/heatshrink/heatshrink_encoder.c:535:16: warning: conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Wconversion] bits = hse->outgoing_bits >> (hse->outgoing_bits_count - 8); ^ libs/compression/heatshrink/heatshrink_encoder.c:538:16: warning: conversion to 'uint8_t {aka unsigned char}' from 'uint16_t {aka short unsigned int}' may alter its value [-Wconversion] bits = hse->outgoing_bits; ^ libs/compression/heatshrink/heatshrink_encoder.c:544:37: warning: conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Wconversion] hse->outgoing_bits_count -= count; ^ libs/compression/heatshrink/heatshrink_encoder.c: In function 'push_literal_byt': libs/compression/heatshrink/heatshrink_encoder.c:581:33: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] uint16_t processed_offset = hse->match_scan_index - 1; ^ libs/compression/heatshrink/heatshrink_encoder.c:582:29: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion] uint16_t input_offset = get_input_offset(hse) + processed_offset; ^ libs/compression/heatshrink/heatshrink_encoder.c: In function 'save_backlog': libs/compression/heatshrink/heatshrink_encoder.c:598:20: warning: conversion to 'uint16_t {aka short unsigned int}' from 'size_t {aka unsigned int}' may alter its value [-Wconversion] uint16_t rem = input_buf_sz - msi; // unprocessed bytes ^ libs/compression/heatshrink/heatshrink_encoder.c:599:25: warning: conversion to 'uint16_t {aka short unsigned int}' from 'size_t {aka unsigned int}' may alter its value [-Wconversion] uint16_t shift_sz = input_buf_sz + rem; ^ libs/compression/heatshrink/heatshrink_encoder.c:606:24: warning: conversion to 'uint16_t {aka short unsigned int}' from 'size_t {aka unsigned int}' may alter its value [-Wconversion] hse->input_size -= input_buf_sz - rem; ^ CC libs/filesystem/fat_sd/fattime.o In file included from libs/compression/compress_heatshrink.c:15:0: /vagrant/src/jsutils.h:124:22: fatal error: esp_attr.h: No such file or directory compilation terminated. make: *** [libs/compression/compress_heatshrink.o] Error 1 make: *** Waiting for unfinished jobs.... libs/compression/heatshrink/heatshrink_decoder.c: At top level: cc1: warning: unrecognized command line option '-Wno-expansion-to-defined' In file included from /vagrant/src/jsvar.h:17:0, from /vagrant/src/jswrap_date.h:14, from libs/filesystem/fat_sd/fattime.c:6: /vagrant/src/jsutils.h:124:22: fatal error: esp_attr.h: No such file or directory compilation terminated. make: *** [libs/filesystem/fat_sd/fattime.o] Error 1 libs/compression/heatshrink/heatshrink_encoder.c: At top level: cc1: warning: unrecognized command line option '-Wno-expansion-to-defined' make: *** wait: No child processes. Stop.
-
Thanks, that was what I did. It downloaded the idf and extensa stuff into folders, but running make command printed a couple of the ‘cannot execute binary file’ errors.
The ESP32 page in Espruino mentioned getting build tools beforehand but
apt-get build-tools
as example given does not run on Mac OS. I wonder if I’m missing that step. -
I need to use SD card and disable FlashFS so I followed the instructions on https://www.espruino.com/ESP32. When I run make
make clean && BOARD=ESP32 make
, I hit error:
espruino/Espruino/xtensa-esp32-elf/bin//xtensa-esp32-elf-gcc: cannot execute binary file
I suspect this is related to not having the build tools needed for Mac. If so what do I need in order to run make?
-
@Gordon for my purpose I have to get the entire message before deciding next step of actions. Does this mean it’s best practice to always buffer the data for the busy case you mentioned above even for Espruino boards? I’ve been wrapping the message from ESP32 board with a start and end chars (<,>)so Espruino can understand whole messages, is there a proper way to detect start and end of transmission?
Thanks!
-
-
Been trying to debug this for awhile, with this code:
function onInit(){ setInterval(function(){ console.log("X"); },1000) }
upload to board, then
save()
disconnect usb and then reconnect, connect to terminal, nothing outputted. If I type
load()
then it the interval prints:
>load() =undefined WARNING: --- gap_setScan 0 WARNING: Scan stop failed WARNING: set rssi scan not implemeted yet WARNING: has central connection not implemented yet Loading 1746 bytes from flash... Running onInit()... X X X X X
Pico immediately prints after reconnect without needing to manually kicking it. Im on v1.99. I'll try downgrade the firmware to see if it's a regression.
-
-
-
I switched board to another one (NODEMCU ESP32), switched to GPIO16/17, and did a simple test
ESP32:
Serial2.setup(115200,{rx:D17, tx:D16}); Serial.print("hello");
on Espruino
Serial2.setup(115200); Serial2.on('data', function (str) { console.log(str); }); //output: l ohel >
Strange. Can confirm that message sent from Espruino is received on ESP32 as entire blob instead of per character...
-
Hi,
When I run the WIFI sample from the documentation my board initially would connect but on subsequent code upload would reset preceded by this message:
Brownout detector was triggered ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:2364 load:0x40078000,len:0 load:0x40078000,len:10880 entry 0x40078c4c E (28) boot: ota data partition invalid, falling back to factory WARNING: has simple connection not implemented yet Loading 1566 bytes from flash...
Do I have a bad board?
Thanks!
-
@DrAzzy this is the board I’m using:
-
-
Hi,
I need to use WIFI and have an original espruino and an esp32 lying board around. Eventually will just get an espruino WIFI, but seems like fun to tinker using the esp32 as the wifi 'board' so I did :)
So the strategy I have in mind is connecting the two via serial have them communicate that way. Tried the simple loopback test and seemed to work fine. With the actual connection I'm getting garbage character most of the time.
on ESP32:
Serial2.setup(9600,{rx:d12,tx:d13}); setInterval(function(){ Serial2.send("Hello from ESP32")},1000);
On Espruino:
Serial4.setup(9600); Serial4.on('data', function (data) { print("<Serial4> "+data); });
Result:
<Serial4> ª <Serial4> µ <Serial4> l <Serial4> o <Serial4> <Serial4> f <Serial4> v <Serial4> <Serial4> m <Serial4> E <Serial4> S <Serial4> P <Serial4> 3 <Serial4> 2
Is there anything different I need to do? Thanks!
-
Thanks Gordon! mapInPlace sure is much faster. Here's my fade code with callback:
function fade(b, direction, callback) { var m = 1; var clone = new Uint8Array(b.length); clone.set(b); var interval = setInterval(function () { if(direction===0){ E.mapInPlace(b, clone, function (x) { return x * m; }); }else{ E.mapInPlace(b, clone, function (x) { return x - (x * m); }); } m *= direction===0?0.85:0.95; leds.buffer = clone; leds.flip(); if (m <= (direction===0?0.01:0.1)) { clearInterval(interval); if (callback) { callback(); } E.mapInPlace(b, clone, function (x) { return direction===0?0:x; }); leds.buffer = clone; leds.flip(); } }, 10); }
-
Hi,
I'm playing with an 8x8 neopixel matrix. I want to do a pixel slideshow by loading images out from a server over time. I'd love to have a fade to black transition before moving to the next image. Anyone knows what's the most performant way to do this? Right now I'm doing a setInterval that loops the uint8array buffer (buffer.forEach) and multiply each index value with a gradual value every tick. This is super slow tho.
Thanks!
-
-
-
-
-
-
I reflashed to 1v98 and drawString seems to not work:
var g = Graphics.createArrayBuffer(8, 8, 1); //console >g.drawString("X"); =undefined >g.buffer.toString() ="0,0,0,0,0,0,0,0" //empty??
tried fillRect works fine:
var g = Graphics.createArrayBuffer(8, 8, 1); //console >g.fillRect(0,0,4,4); =undefined >g.buffer.toString(); ="31,31,31,31,31,0,0,0" //not empty
Am I missing anything?
Thanks!
-
@MacChristmas are you trying to install standard Espruino onto your esp32 board? Or are you trying to build your own custom Espruino to install onto your esp32 board?