-
update - it looks like it's the reference here: https://github.com/espruino/Espruino/blob/master/.travis.yml#L20
I've asked @tve to add it to the tar file.
-
Thanks Gordon.
For the esp8266 build the 1.5 boot loader is missing so flashing via serial fails:C:\Users\rhys\OneDrive\esp8266\firmware\espruino_1v87_esp8266>..\..\esptool-mast er\esptool.py --port COM3 --baud 115200 write_flash --flash_freq 80m --flash_mod e dio --flash_size 32m 0x0000 "boot_v1.5.bin" 0x1000 espruino_esp8266_user1.bin 0x37E000 blank.bin Connecting... Traceback (most recent call last): File "C:\Users\rhys\OneDrive\esp8266\esptool-master\esptool.py", line 724, in <module> main() File "C:\Users\rhys\OneDrive\esp8266\esptool-master\esptool.py", line 628, in main image = file(filename, 'rb').read() IOError: [Errno 2] No such file or directory: 'boot_v1.5.bin'
There is an issue here:
https://github.com/espruino/Espruino/issues/912This is part of the https://github.com/pfalcon/esp-open-sdk - so I'm not sure if its the ci-travis file that needs updating, or only the makefile.
https://github.com/espruino/Espruino/blob/master/Makefile#L1927
BOOTLOADER = "$(ESP8266_SDK_ROOT)/bin/boot_v1.4(b1).bin"
to
BOOTLOADER = "$(ESP8266_SDK_ROOT)/bin/boot_v1.5.bin"
-
Please take a picture of your wiring and do a table like this:
http://forum.espruino.com/comments/12997920/
Display NodeMCU ESP-12 Colour LED 3V3 3V3 N/A SCLCK D5 GPIO14 Green DN<MOSI> D7 GPIO13 Yellow D/C D2 GPIO04 Orange RST D1 GPIO05 Brown SCE D8 GPIO15 Red GND GND GND Grey VCC 3V3 3V3 Blue BackLight GND GND Purple
As you can see here NodeMCU.D7 is gpio13
I don't think your init it matching how you have wired up.
-
-
Have a look here:
http://forum.espruino.com/conversations/285779/#comment13002694
There might be some clues on how to setup your wiring..The
Nodemcu:D4
type set up may help instead of just using D4 if you are going by the labels on the board... -
The code posted above was changed needed in the c code to compile... Not related
If you see v186.113 then you have the updated firmware.
Ignore the warning about the missing module - it is because the normal esp8266 does not have the module and the web Ide doesn't know it is available.
On the right hand side of the ide try:
>fs=require('fs'); =function () { [native code] }
You should see the 2nd line if the module loaded rather than
undefined
-
-
@ManoBiletsky
The zip file contains espruino_esp8266_user1.bin and espruino_esp8266_user2.binTo compile:
export USE_FILESYSTEM=1
and I commented out USE_GRAPHICS in the Makefile as there is not enough space for both.This change is also needed as the macro fails:
void jswrap_file_skip_or_seek(JsVar* parent, int nBytes, bool is_skip) { if (nBytes<0) { //jsWarn(is_skip ? "Bytes to skip must be >=0" : "Position to seek to must be >=0"); if ( is_skip) jsWarn("Bytes to skip must be >=0"); if ( is_skip <= 0 ) jsWarn( "Position to seek to must be >=0"); return; }
I've not tested with an SD card - however the modules loads!
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.113 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >fs=require('fs'); =function () { [native code] }
-
If I recall there was one line change required to get this to compile. You could try @jumjum online firmware builder, and turn on the fs module in the compile.
-
-
Ok. Got the Esp8266 build working on windows 10!
You need to build the SDK as a standard user. This locked up the first time, however worked after a reboot.
To build the SDK there needs:
cd /mnt/c/ubuntu/ git clone https://github.com/pfalcon/esp-open-sdk sudo apt-get install autotools-dev autoconf sudo apt-get install make unrar autoconf automake libtool gcc g++ gperf flex bison texinfo gawk ncurses-dev libexpat-dev python-dev python python-serial sed git unzip bash help2man wget bzip2 ln -s /usr/bin/aclocal-1.14 /usr/bin/aclocal-1.15 ln -s /usr/bin/automake-1.14 /usr/bin/automake-1.15 cd esp-open-sdk/ make STANDALONE=n
this takes a while to compile!
then:
wget 'http://bbs.espressif.com/download/file.php?id=1021&sid=6e2aef8d5d8e700aca4a7b444c985e10' -O liblwip_536_for_ESP8266_NONOS_SDK_V1.5.0.zip unzip liblwip_536_for_ESP8266_NONOS_SDK_V1.5.0.zip cp liblwip_536.a ../esp-open-sdk/ESP8266_NONOS_SDK_V1.5.4_16_05_20/lib cd ../Espruino In the Makefile this needs to be updated to: boot_v1.4(b1).bin -> boot_v1.5.bin cat ./build-esp-4mb.sh #! /bin/bash export ESP8266_BOARD=1 export FLASH_4MB=1 export ESP8266_SDK_ROOT=/mnt/c/ubuntu/esp-open-sdk/sdk export PATH=$PATH:/mnt/c/ubuntu/esp-open-sdk/xtensa-lx106-elf/bin/ export ESPHOSTNAME=espruino:88 make $*
chmod +x ./build-esp-4mb.sh ./build-esp-4mb.sh
flash over the air from the bash shell:
./build-esp-4mb.sh wiflash
and then we have:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.113 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >
-
make clean ESPRUINO_1V3=1 RELEASE=1 make
LD espruino_1v86.113_espruino_1r3.elf GEN espruino_1v86.113_espruino_1r3.lst GEN espruino_1v86.113_espruino_1r3.bin bash scripts/check_size.sh espruino_1v86.113_espruino_1r3.bin PASS - size of 229496 is under 231424 bytes GEN espruino_1v86.113_espruino_1r3.hex
Seems to work!
-
The Anniversary Update (64 bit only) has a developer mode add on that allows Ubuntu code to run in a windows subsystem.
This means Espruino can be compiled without running in a VM!
The update has not been rolled out - here are the instructions to update manually...
http://www.howtogeek.com/248177/whats-new-in-windows-10s-anniversary-update/
Then turn on developer mode - reboot and add the Linux on windows system:
http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/On my system - in the cmd prompt, I had this error message:
Unsupported console settings. In order to use this feature the legacy console must be disabled.
https://github.com/Microsoft/BashOnWindows/issues/319
Open cmd.exe
Right click title bar -> Properties -> Uncheck Use legacy console
Click OKThen on first run of bash.exe, the sub system is installed.
Then:
cd /mnt/c mkdir ubuntu cd ubuntu sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded sudo apt-get update sudo apt-get install gcc-arm-none-eabi git build-essential git clone https://github.com/espruino/Espruino.git cd Espruino make
Then:
root@OFFICE-PC:/mnt/c/ubuntu/Espruino# ./espruino Interactive mode. Size of JsVar is now 32 bytes Size of JsVarRef is now 4 bytes Added SIGINT hook Added SIGHUP hook Added SIGTERM hook _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.113 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate >console.log('hi from windows 10!'); hi from windows 10! =undefined
Yay!
Will try a cross compile soon!
-
-
Have a look here - this is using pipe with flash reads....
http://forum.espruino.com/conversations/283045/#comment12837928
It's a while back since I wrote it, but could before use.
-
Connected
Disconnected
echo(0);I've had this issue with Windows 10. Even a reset on the board does not fix- it's to do with the USB to serial... If you unplug the USB and plug it in again - all will be fine.
It occurs after flashing....
As you have discovered, via wifi works well - it is about 4x faster than serial too.
-
For the sake of brevity - it looks like there are quite a few constants that are not used!
You could also shorten -
COMMAND_xx
to sayC_xxx
.@Gordon - does the google closure compiler automatically do this - can the code above get passed through and then re-pretty printed to make it human readable again?
-
@ceremcem
http://www.espruino.com/Reference#l_Flash_getFreerequire("flash").getFree()
This method returns an array of objects of the form {addr : #, length : #}, representing
contiguous areas of flash memory in the chip that are not used for anything.
-
-
Each time you do an ota update, it alternates between user1 and user2.
I'm not sure if you can just add the user1 part, and then do an ota into user2 and boot into it? @tve ?
Are you still trying to do this in an oninit() function, or are you trying the simple case?
You should be able to paste the setup stuff directly into the left side of the ide