marcelstoer / docker-nodemcu-build Goto Github PK
View Code? Open in Web Editor NEWDocker image to build NodeMCU firmware for the ESP8266 on your machine
Home Page: https://hub.docker.com/r/marcelstoer/nodemcu-build/
License: MIT License
Docker image to build NodeMCU firmware for the ESP8266 on your machine
Home Page: https://hub.docker.com/r/marcelstoer/nodemcu-build/
License: MIT License
Hello. I try to make bin files but at the end of running docker command I have this:
xtensa-lx106-elf-gcc -L/opt/nodemcu-firmware/sdk/esp_iot_sdk_v1.5.4.1/lib -L/opt/nodemcu-firmware/sdk/esp_iot_sdk_v1.5.4.1/ld -Wl,--gc-sections -Wl,-Map=mapfile -nostdlib -T../ld/nodemcu.ld -Wl,@../ld/defsym.rom -Wl,--no-check-sections -Wl,--wrap=_xtos_set_exception_handler -Wl,-static -u WEBSOCKET_module_selected -u OW_module_selected -u BIT_module_selected -u UART_module_selected -u DHT_module_selected -u NET_module_selected -u NODE_module_selected -u FILE_module_selected -u GPIO_module_selected -u SPI_module_selected -u PWM_module_selected -u CJSON_module_selected -u WIFI_module_selected -u TMR_module_selected -u ADC_module_selected -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -lwpa -lwpa2 -lmain -lsmartconfig -lssl -lcrypto user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a pcm/.output/eagle/debug/lib/pcm.a platform/.output/eagle/debug/lib/libplatform.a task/.output/eagle/debug/lib/libtask.a libc/.output/eagle/debug/lib/liblibc.a lua/.output/eagle/debug/lib/liblua.a lwip/.output/eagle/debug/lib/liblwip.a coap/.output/eagle/debug/lib/coap.a mqtt/.output/eagle/debug/lib/mqtt.a u8glib/.output/eagle/debug/lib/u8glib.a ucglib/.output/eagle/debug/lib/ucglib.a smart/.output/eagle/debug/lib/smart.a spiffs/.output/eagle/debug/lib/spiffs.a fatfs/.output/eagle/debug/lib/libfatfs.a cjson/.output/eagle/debug/lib/libcjson.a crypto/.output/eagle/debug/lib/libcrypto.a dhtlib/.output/eagle/debug/lib/libdhtlib.a tsl2561/.output/eagle/debug/lib/tsl2561lib.a http/.output/eagle/debug/lib/libhttp.a websocket/.output/eagle/debug/lib/libwebsocket.a esp-gdbstub/.output/eagle/debug/lib/libgdbstub.a net/.output/eagle/debug/lib/libnodemcu_net.a modules/.output/eagle/debug/lib/libmodules.a -Wl,--end-group -lm -o .output/eagle/debug/image/eagle.app.v6.out
../tools/esptool.py elf2image .output/eagle/debug/image/eagle.app.v6.out -o ../bin/
esptool.py v1.2-dev
make[1]: Leaving directory '/opt/nodemcu-firmware/app'
make -C tools remove-image spiffsimg/spiffsimg
make[1]: Entering directory '/opt/nodemcu-firmware/tools'
if [ -r ../bin/spiffs-4mb.dat ]; then rm -f ../bin/$(cat ../bin/spiffs-4mb.dat)-4mb.bin; fi; if [ -r ../bin/spiffs-32mb.dat ]; then rm -f ../bin/$(cat ../bin/spiffs-32mb.dat)-32mb.bin; fi; if [ -r ../bin/spiffs-8mb.dat ]; then rm -f ../bin/$(cat ../bin/spiffs-8mb.dat)-8mb.bin; fi;
rm -f ../bin/spiffs*.dat
make[2]: Entering directory '/opt/nodemcu-firmware/tools/spiffsimg'
gcc -g -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -I. -I../../app/spiffs -I../../app/include -DNODEMCU_SPIFFS_NO_INCLUDE --include spiffs_typedefs.h main.c ../../app/spiffs/spiffs_cache.c ../../app/spiffs/spiffs_check.c ../../app/spiffs/spiffs_gc.c ../../app/spiffs/spiffs_hydrogen.c ../../app/spiffs/spiffs_nucleus.c -o spiffsimg
make[2]: gcc: Command not found
Makefile:8: recipe for target 'spiffsimg' failed
make[2]: *** [spiffsimg] Error 127
make[2]: Leaving directory '/opt/nodemcu-firmware/tools/spiffsimg'
Makefile:40: recipe for target 'spiffsimg/spiffsimg' failed
make[1]: *** [spiffsimg/spiffsimg] Error 2
make[1]: Leaving directory '/opt/nodemcu-firmware/tools'
Makefile:276: recipe for target 'spiffs-image-remove' failed
make: *** [spiffs-image-remove] Error 2
Maybe related to #7 but I am not sure.
I've encountered two problems building the firmware on OS X.
First, the documentation says to checkout the dev-esp32 branch and then do a "git submodule update --recursive". But because the esp32-esp-idf submodule hasn't been initialised it doesn't update ... I first had to run "git submodule init"
Second, on trying to run configure-esp32 the first time I get a permissions error:
2019-07-29 22:12:18 (91.2 KB/s) - '/opt/nodemcu-firmware/cache/toolchain-esp32-linux-x86_64-20181106.0.tar.xz' saved [28975720/28975720]
Uncompressing toolchain
tar: esp32-linux-x86_64-20181106.0/build.log.bz2: Cannot open: Permission denied
I think it first failed to decompress the toolchain archive and then when I did it manually I think I got the symbolic links (eg for xtensa-esp32-elf-ar) messed up.
I think the instructions for "Flashing the built binary" might / should reference the setting:
#define SPIFFS_FIXED_LOCATION 0x100000
Presumably the section should include something like:
If you set your build to a fixed location using something like:
#define SPIFFS_FIXED_LOCATION 0x100000
then the command to flash the image will become
esptool.py --port <USB-port-with-ESP8266> write_flash 0x100000 <NodeMCU-firmware-directory>/bin/nodemcu_[integer|float]_<Git-branch>.bin
I created a new docker volume then:
docker run --rm -ti -v /volume1/docker/esp32/:/opt marcelstoer/nodemcu-build bash
cd /opt
git clone --recurse-submodules https://github.com/nodemcu/nodemcu-firmware.git
cd nodemcu-firmware
git checkout dev-esp32
but it aborts with a listing of all the app/include/ files that will be overwritten.
I know we've touched on this on a firmware issue but I use a config script to build my user_*.h
files and it is really just so much easier than having to mess around tweaking this -- or in the case fo a cloud build services the potential vulnerabilities / exploits that allowing the direct upload of these files would introduce and an alternative to have to extended the GUI. We could leave the GUI for novice use but allow uploaded configs for advanced configuration. So this is my default config:
;
; ESP-01 512KB Module config
;
flash_size = 512K
bit_rate = 115200
client_ssl = disable
gpio_interrupt = enable
spiffs_cache = enable
sha2 = disable
builtin = string,table,coroutine,math,debug_minimal
modules = node,file,gpio,wifi,net,i2c,tmr,uart,ow,bit
The source is here on gist. I chose Lua because this is a Lua project and I need Lua on my host for luac.cross
anyway, but this given that docker images don't have Lua installed as standard, we could easily reimplement in Python or even bash.
Hi there!
Thanks for this super useful container!
I managed to build my custom firmware and add support for a non conventional (128x32) oled screen.
I struggled a little bit to run the docker command on Windows so I thought I would share the simple trick I found. You need to specify the full path in the command and you need to add a double forward back slashes (//
) in front of the two paths. The command is then:
docker run --rm -it -v //c/Users/<user>/nodemcu-firmware://opt/nodemcu-firmware marcelstoer/nodemcu-build
I can submit a pull request with an updated README file if it helps.
Thanks!
I think the instructions for "Flashing the built binary" might / should reference the setting:
#define SPIFFS_FIXED_LOCATION 0x100000
Presumably the section should include something like:
If you set your build to a fixed location using something like:
#define SPIFFS_FIXED_LOCATION 0x100000
then the command to flash the image will become
esptool.py --port write_flash 0x100000 /bin/nodemcu_[integer|float]_.bin
There is a commit about to be merged into nodemcu-firmware:dev that automates the building of the spiffs image containing files. Could you please add this file into the single .bin file that your build script generates?
i found error when use docker run --rm -ti -v "{pwd}":/opt/nodefirmware docker-nodemcu-build build-esp32
error output sed: -e expression #1, unknown option to
s'`
OS: Windows 10 Pro
Docker: Docker version 18.09.2, build 6247962
livecd Ubuntu 16.04 LTS, after installing git and docker (17.05.0-ce):
cd ~
git clone https://github.com/nodemcu/nodemcu-firmware.git
Cloning into 'nodemcu-firmware'...
remote: Counting objects: 14202, done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 14202 (delta 23), reused 30 (delta 12), pack-reused 14138
Receiving objects: 100% (14202/14202), 100.65 MiB | 3.67 MiB/s, done.
Resolving deltas: 100% (9499/9499), done.
Checking connectivity... done.
sudo docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build
Unable to find image 'marcelstoer/nodemcu-build:latest' locally
latest: Pulling from marcelstoer/nodemcu-build
9fb6c798fa41: Pull complete
3b61febd4aef: Pull complete
9d99b9777eb0: Pull complete
d010c8cf75d7: Pull complete
7fac07fb303e: Pull complete
a9b2cca3f218: Pull complete
b3af545b8284: Pull complete
d1dfec3e935f: Pull complete
e8ef04736ed5: Pull complete
bf66f7c97847: Pull complete
Digest: sha256:763f25d549f9af009c0dfb1cfdb970f028dd90b1d94b71d39cd616ce82a73ca5
Status: Downloaded newer image for marcelstoer/nodemcu-build:latest
fatal: Not a git repository (or any parent up to mount point /opt/nodemcu-firmware)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Ok..
cd ~
git init
cd /
sudo git init
Ok, one more time
cd ~
sudo docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
how to fix it and build? Thanks.
This commit breaks this script: nodemcu/nodemcu-firmware@a3145da
There is no file with gz format and I have this in console when run:
###\nodemcu-firmware>docker run -e "INTEGER_ONLY=1" --rm -it -v ###/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build
cp: cannot stat 'tools/esp-open-sdk.tar.gz': No such file or directory
lfs-image step should not attempt to build an integer image when app/include/user_config.h: #define LUA_NUMBER_INTEGRAL is commented-out.
lfs-image step ignores #define LUA_NUMBER_INTEGRAL and attempts to build the integer image. The attempt fails and throws an error:
docker run --rm -ti -e "IMAGE_NAME=test" -v "{PWD}":/opt/nodemcu-firmware -v "{PWD}":/opt/lua marcelstoer/nodemcu-build lfs-image
Adding files: ../lua/_init.lua ../lua/_main.lua ../lua/_preload.lua
creating LFS_float_test.img
creating LFS_integer_test.img
./luac.cross.int: ../lua/_main.lua:1: malformed number near '27.60'
Offending Source Code Line:
local BFCVAL = 27.60
REF: https://github.com/marcelstoer/docker-nodemcu-build/
INTEGER_ONLY and FLOAT_ONLY are not supported anymore. Please configure LUA_NUMBER_INTEGRAL in app/include/user_config.h as described above.
app/include/user_config.h:
//#define LUA_NUMBER_INTEGRAL
Hello,
first, Id like to thank you for sharing your time and skills with us.
Be warned, I am not a software-oriented fellow, so this may be my fault.
My problem:
wifi.sta.sethostname("myNodeMCU")
did not work on my (first) docker build (however it does over the dev branch of freightanic).
NodeMCU returned some "call to nil" .
Could this be a configuration problem? (undefined some modules I had no interest on,
but kept the wifi module)
Best Regards
CS
I'm on linux. I get the following error with docker when I try to build after configure.
xxxx@home-desktop ~/code/esp32/tools/nodemcu-firmware dev-esp32 ● docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build build
sed: -e expression #1, char 99: unknown option to `s'
Firstly, thanks for your great work ...
I'm trying to do a build on OSX High Sierra using Docker Community Edition v18.06.1 and am getting the error when I try docker run --rm -ti -v 'pwd':/opt/nodemcu-firmware marcelstoer/nodemcu-build build:
fatal: Not a git repository (or any parent up to mount point /opt/nodemcu-firmware)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
docker run --rm -ti -v 'pwd':/opt/nodemcu-firmware marcelstoer/nodemcu-build shows the "Welcome to the Docker image ... " message
I cloned the nodemcu-firmware repo (into my user folder), checked permissions, checked ownership, git status ... just can't figure it out.
Does anyone have any clues, suggestions or things to check?
I compiled the nodemcu firmware in a Docker environment and burned it into modules.I wrote a LUA script using ESPlorer, and after debugging, I wanted to compile it into firmware.Just add the LUA script file to the "\nodemcu-firmware\local\fs" path. After recompiling, no new firmware will be generated and the compilation fails.The compilation information is as follows:
Segmentation fault
Makefile:74:recipe for target 'spiffsscript' failed
make[1]: *** [spiffsscript] Error 139
make[1]: Leaving directory '/opt/nodemcu-firmware/tools'
Makefile:348:recipe for target 'spiffs-image' failed
make: *** [spiffs-image] Error 2
Before I compiled, I enabled the configuration in the user_config.h file:
#define BUILD_SPIFFS
#define SPIFFS_FIXED_LOCATION 0x100000
#define SPIFFS_MAX_FILESYSTEM_SIZE 0x20000
#define SPIFFS_SIZE_1M_BOUNDARY
How can I compile LUA script files into the firmware?
I think the instructions for "Flashing the built binary" might / should reference the setting:
#define SPIFFS_FIXED_LOCATION 0x100000
Presumably the section should include something like:
If you set your build to a fixed location using something like:
#define SPIFFS_FIXED_LOCATION 0x100000
then the command to flash the image will become
esptool.py --port <USB-port-with-ESP8266> write_flash 0x100000 <NodeMCU-firmware-directory>/bin/nodemcu_[integer|float]_<Git-branch>.bin
This link:
Follow the instructions at https://docs.docker.com./installation.
takes you to a 404 page. From reading information on the docs page, it looks like they reorganized the documentation. Unfortunately it isn't clear from looking at the docs page where you should go to get the appropriate page.
Steps to reproduce:
build/foo
in nodemcu-firmwaresrec_cat: nodemcu_float_build/foo_20160601-2046.bin: 1: open: No such file or directory [2]: No such file or directory
Exploratory fix:
git rev-parse --abbrev-ref HEAD | sed -r 's/[\/\\]+/_/g'
This will replace every occurrence of /
, and \
with _
.
Digest: sha256:c7926b18f6d6e22a2a31b4e60c2f5f055c2ca3c61d6530f29ef52bda787981a2
Status: Downloaded newer image for marcelstoer/nodemcu-build:latest
fatal: Not a git repository (or any parent up to mount point /opt/nodemcu-firmware)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
cp: cannot stat 'tools/esp-open-sdk.tar.gz': No such file or directory
Docker Version:
Docker version 1.12.0-rc2, build 906eacd, experimental
Hi all, I too have been struggling to get the docker command to run under windows. Issue #7 had the answer in using c:\users\nodemcu-firmware path on the host os (with //c/Users//nodemcu-firmware in the docker command), this works whereas other paths on the host os do not. I think it is something to do with automatic shares for c:\Users created by virtualbox guest additions, but not sure exactly why.
After figuring that out, I could run the build, however it always fails at some point through with a similar output to;
xtensa-lx106-elf-ar ru .output/eagle/debug/lib/liblibc.a .output/eagle/debug/obj/c_ctype.o .output/eagle/debug/obj/c_math.o .output/eagle/debug/obj/c_stdio.o .output/eagle/debug/obj/c_stdlib.o .output/eagle/debug/obj/c_string.o
xtensa-lx106-elf-ar: creating .output/eagle/debug/lib/liblibc.a
xtensa-lx106-elf-ar: unable to rename '.output/eagle/debug/lib/liblibc.a'; reason: Operation not permitted
make[2]: *** [.output/eagle/debug/lib/liblibc.a] Error 1
make[2]: Leaving directory/opt/nodemcu-firmware/app/libc' make[1]: *** [.subdirs] Error 2 make[1]: Leaving directory
/opt/nodemcu-firmware/app'
make: *** [.subdirs] Error 2
It's not always the same file that it stops on (sometimes it is cjson.a or whatever), but it always is the renaming that drops the ball.
I think it is something to do with the virtual folder mount, as I also sometimes get time sync warnings like such and such file has timestamp 0.063s in the future. Anyone able to help here?
I've long wanted to adjust the "welcome" message to something more unique so that it's obvious that you built the firmware with the Docker image. In resemblance to what my cloud builder produces it could look like this:
NodeMCU firmware built with Docker provided by frightanic.com
branch: master
commit: <Git-revision>
SSL: false
modules: <not-sure-yet->
build created on 2017-10-01 16:41
powered by Lua 5.1.4 on SDK 2.1.0
the error is here jmattsson/esp-toolchains#1,
it seem the link don't work on windows file system.
have any suggest to solve.
I was trying to reflect the last changes in readme.md by copying the "options" section of the "build" command to the "lfs-image" command and detected the "build" section is missing entirely.
Hi Marcel,
Thank you for making this excellent tool. I have got it to run and complile the binary files without any visible issues on my x64 Win7 setup, however after burning the integer version of dev140 to a 4Mb flash NodeMcu PCB I get the following out of the serial port but Lua doesn't start up at 9600 baud. I've used your build tool to make dev140 on the same board without any trouble yesterday.
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 28296, room 16
tail 8
chksum 0xfd
load 0x00010003, len 131075, room 0
With the latest revision 28e1c0a I added support for timezone setting. It's documented at https://github.com/marcelstoer/docker-nodemcu-build#options but would have to be added to the CN README as well.
@lou-lan could you please take care of this?
"clean" appears to be the default. "all" and "flash" would be handy.
I get this in powershell, cmd prompt, and otherwise:
PS C:\Dev\nodemcu-firmware> docker run --rm -it -v //c/Dev/nodemcu-firmware marcelstoer/nodemcu-build
fatal: Not a git repository (or any of the parent directories): .git
cp: cannot stat 'tools/esp-open-sdk.tar.gz': No such file or directory
Did I do something wrong?
PS -- Is there an IRC or Gitter channel for this?
Hi, I'm trying to use docker esp32 on windows 10. I followed instructions to Configure modules and features for ESP32, then got following errors with configure-esp32.
I ran:
docker run --rm -it -v c:/Users/Daniel/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build configure-esp32
got following errors:
Setting IDF_PATH and re-invoking...
make[1]: Entering directory '/opt/nodemcu-firmware'
make[2]: Entering directory '/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig'
make[2]: /opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/check-lxdialog.sh: Command not found
cc -c -DLOCALE -MMD /opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c -o mconf.o
In file included from /opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c:23:0:
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:38:10: error: #include expects "FILENAME" or <FILENAME>
#include CURSES_LOC
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:103:2: error: unknown type name 'chtype'
chtype atr; /* Color attribute */
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:200:16: error: unknown type name 'WINDOW'
int on_key_esc(WINDOW *win);
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:221:17: error: unknown type name 'WINDOW'
void attr_clear(WINDOW * win, int height, int width, chtype attr);
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:221:54: error: unknown type name 'chtype'
void attr_clear(WINDOW * win, int height, int width, chtype attr);
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:223:21: error: unknown type name 'WINDOW'
void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x);
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:224:19: error: unknown type name 'WINDOW'
void print_button(WINDOW * win, const char *label, int y, int x, int selected);
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:225:18: error: unknown type name 'WINDOW'
void print_title(WINDOW *dialog, const char *title, int width);
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:226:15: error: unknown type name 'WINDOW'
void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box,
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:226:66: error: unknown type name 'chtype'
void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box,
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:227:8: error: unknown type name 'chtype'
chtype border);
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:228:18: error: unknown type name 'WINDOW'
void draw_shadow(WINDOW * win, int y, int x, int height, int width);
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c: In function 'conf':
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:97:29: error: 'KEY_MAX' undeclared (first use in this function)
#define ERRDISPLAYTOOSMALL (KEY_MAX + 1)
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c:671:45: note: in expansion of macro 'ERRDISPLAYTOOSMALL'
if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:97:29: note: each undeclared identifier is reported only once for each function it appears in
#define ERRDISPLAYTOOSMALL (KEY_MAX + 1)
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c:671:45: note: in expansion of macro 'ERRDISPLAYTOOSMALL'
if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c: In function 'show_help':
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c:793:27: error: 'stdscr' undeclared (first use in this function)
help.max_width = getmaxx(stdscr) - 10;
^
In file included from /opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c:23:0:
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c: In function 'conf_choice':
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/lxdialog/dialog.h:97:29: error: 'KEY_MAX' undeclared (first use in this function)
#define ERRDISPLAYTOOSMALL (KEY_MAX + 1)
^
/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf.c:855:9: note: in expansion of macro 'ERRDISPLAYTOOSMALL'
case -ERRDISPLAYTOOSMALL:
^
Makefile:171: recipe for target 'mconf.o' failed
make[2]: *** [mconf.o] Error 1
make[2]: Leaving directory '/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig'
make[1]: *** No rule to make target '/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/conf-idf', needed by '/opt/nodemcu-firmware/sdk/esp32-esp-idf/tools/kconfig/mconf-idf'. Stop.
make[1]: Leaving directory '/opt/nodemcu-firmware'
Makefile:10: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2
>
Can someone tell me what's wrong?
Adding files to the ../local/fs directory doesn't seem to do anything, the file system remains empty. Should the file section already be included in the bin output?
If I burn the bin files (00000,10000 individually the ESP goes into a loop with a bad file system.
Burning the file system bin to the indicated location seems to push the file system to a new address.
Install docker toolbox
Run "C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh" aka "Docker Quickstart Terminal" shortcut
See:
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com
Start interactive shell
Jaroslaw@lpatop MINGW64 ~
$
Run "C:\Program Files\Docker Toolbox\kitematic\Kitematic.exe" aka Kitematic (Alpha)
Search nodemcu-build by marcelstoer
Click Create...
After download, run.
See container logs:
fatal: Not a git repository (or any of the parent directories): .git
cp: cannot stat 'tools/esp-open-sdk.tar.gz': No such file or directory
Proceed according to https://hub.docker.com/r/marcelstoer/nodemcu-build/:
Open cmd:
Go to C:\Users\Jaroslaw (cmd already opens up in that dir)
Run git clone https://github.com/nodemcu/nodemcu-firmware.git
See, folder is there.
Go in to that folder.
Run:
docker run --rm -ti -v //c/Users/Jaroslaw/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build
See output:
docker: An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/containers/create: open //./pipe/docker_engine: The system cannot find the file specified..
See 'docker run --help'.
There is a bug somewhere, either in documentation of in image.
PS. Thank you very much for this project.
I would like to add a feature to allow selecting only specific files to add to the LFS image.
There could be a file containing a list of files to add using unix wildcards if desired.
Could be useful for complete projects containing an init.lua and other files. Obviously the init.lua does not need to be in the LFS.
The file could look like this:
startup.lua main.lua
modules/*.lua drivers/*.lua misc/logging.lua
the filename would be passed as parameter to lfs-image.
If given use its content else pack all files.
It would be great if there was a link to the output image that was the same for each build (it can have the branch name). This would make the build/burn cycle easier as I don't need to change the input filename for the burner after each build. I was thinking that add a 'ln -f ' would suffice.
For a project I need wps support in the nodemcu firmware. To enable that I have added wifi.wps.* commands in app/modules/wifi.c and I have added -lwps to the Makefile in modules. All builds well, but after flashing the firmware I get problems in a reboot every some seconds. Commenting out the calls to libwps.a and only having the lua commands in place makes the problem disappear. Is there a know issue why there is no wps support in nodemcu?
Cheers,
Arnulf
(Arnulf Wiedemann)
D:\IoT\NodeMCU V2\nodemcu-firmware>docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
marcelstoer/nodemcu-build latest b9049eff6bf7 2 days ago 342MB
marcelstoer/nodemcu-build ok f24c34189836 7 days ago 342MB
D:\IoT\NodeMCU V2\nodemcu-firmware>docker run --rm -ti -v "D:\IoT\NodeMCU V2\nodemcu-firmware":/opt/nodemcu-firmware marcelstoer/nodemcu-build build
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"build\": executable file not found in $PATH": unknown.
on windows10
I act according to the instructions? but get next error
clone-repo(https://github.com/nodemcu/nodemcu-firmware) - > docker console - > cd to local coy - >
docker run --rm -ti -v pwd
:/opt/nodemcu-firmware marcelstoer/nodemcu-build
fatal: Not a git repository (or any parent up to mount point /opt/nodemcu-firmware)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
I am try to debug and add features to the firmware (dev-esp32 branch). But using docker to compile it takes like 30+ minutes. I would like know if there is a way to only compile changed source code and reuse other compiled objects to link a new binary?
How to enable Trigonometric functions in
https://github.com/nodemcu/nodemcu-firmware
before
docker run --rm -ti -v pwd
:/opt/nodemcu-firmware marcelstoer/nodemcu-build ?
need math.sin(), math.cos(), math.tang() and more
HypriotOS: root@black-pearl in /opt/nodemcu-firmware on master
$ docker run --rm -ti -v pwd
:/opt/nodemcu-firmware marcelstoer/nodemcu-build
exec format error
docker: Error response from daemon: Cannot start container e87f1580bba3af57b5031d5882f09110a7f4396f2ac5f60f8a84ce37c0a44d1d: [9] System error: exec format error.
any sugestions?
Build failed: The command '/bin/sh -c sudo apt-get update -y && sudo apt-get install -y wget unzip git make python-serial srecord bc' returned a non-zero code: 127
Not really an issue with the code in this repo (as far as I can tell), but I couldn't find another way of making you aware of this.
Hello.
I downloaded master firmware and put it under my user directory and i assign all permissions also to Eveyone.
After i launched this command:
docker run --rm -it -v //c/Users/S227233/nodemcu-firmware-master:/opt/nodemcu-firmware marcelstoer/nodemcu-build build
But i had this:
fatal: Not a git repository (or any parent up to mount point /opt/nodemcu-firmware)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
I also tryied this command:
docker run --rm -it -v //c/Users/S227233/nodemcu-firmware-master:/opt/nodemcu-firmware --env GIT_DISCOVERY_ACROSS_FILESYSTEM=1 marcelstoer/nodemcu-build build
But i had this othe one:
fatal: Not a git repository (or any of the parent directories): .git
I have problems also with LFS images:
docker run -it -v //c/Users/S227233/nodemcu-firmware-master:/opt/nodemcu-firmware -v //d/_PERSONALE/_NODE_MCU/_NUOVO_CODICE_CON_LFS --env GIT_DISCOVERY_ACROSS_FILESYSTEM=1 marcelstoer/nodemcu-build lfs-image
Error: No cross compiler found. You need to build the firmeware first.
Thanks in advance.
P.S.
Note: i use a company proxy...but i don't know if it is important because anyway docker works
@lou-lan if you find time for this in the next few weeks I would be very grateful
Hi,
this is a suggestion to bring the docker building behavior near(er) to the cloud-building service (on https://nodemcu-build.com/).
NodeMCU images built on the cloud service identify themselves on the ESP after startup as follows:
NodeMCU custom build by frightanic.com
branch: master
commit: 2e67ff5a639a13260fd4fb3c3b627ccdc2845616
SSL: false
modules: file,gpio,net,node,tmr,uart,wifi,ws2812,file,gpio,net,node,tmr,uart,wifi,file,gpio,net,node,tmr,uart,wifi
build built on: 2017-09-10 12:53
powered by Lua 5.1.4 on SDK 2.1.0(116b762)
lua: cannot open init.lua
Whereas NodeMCU images built with Docker identify themselves on the ESP after startup as follows:
NodeMCU 2.1.0 built with Docker provided by frightanic.com
branch: master
commit: 443e8219527f5b2190324a969a4586f9d3d731bf
SSL: false
build created on 2017-11-18 21:49
powered by Lua 5.1.4 on SDK 2.1.0(116b762)
lua: cannot open init.lua
The difference is the display of the selected modules, which is IMHO incredible useful. I would submit a pull request, but I assume the code is already around somewhere (on the clould build service)?
Hi there, thanks for all your awesome work! I am just getting into working with the nodemcu 0.9 and I have not been able to figure out what to do with the LFS image..
the README shows the use of the docker image to
~at one point, I thought the firmware build would take care of the SPIFFS/LFS needs..
I have the default init.lua
in the local/lua
folder along with the credentials.lua
file
I also put a copy of an mqtt lua example into the local/fs
dir
once I built and flashed the firmware, I run nodemcu-tool fsinfo and see this:
$ nodemcu-tool --port /dev/ttyUSB0 --debug --io-debug fsinfo --raw --connection-delay=1500
[config] ~ debug mode enabled
[config] ~ io-debug mode enabled - rx/tx messages are passed to logger
[config] ~ baudrate = 115200 (type:string)
[config] ~ port = /dev/ttyUSB0 (type:string)
[config] ~ connectionDelay = 1500 (type:string)
[config] ~ minify = false (type:boolean)
[config] ~ compile = false (type:boolean)
[config] ~ keeppath = false (type:boolean)
[config] ~ remotename = null (type:object)
[config] ~ run = false (type:boolean)
[config] ~ all = false (type:boolean)
[config] ~ json = false (type:boolean)
[config] ~ raw = true (type:boolean)
[config] ~ softreset = false (type:boolean)
[serialport] ~ TX: print("echo1337")
[serialport] ~ RX: >
>
> print("echo1337")
[serialport] ~ RX: echo1337
[serialport] ~ RX: >
>
>
[serialport] ~ TX: print("echo1337")
[serialport] ~ RX: >
>
> print("echo1337")
[serialport] ~ RX: echo1337
[serialport] ~ RX: >
>
>
[serialport] ~ TX: print("echo1337")
[serialport] ~ RX: print("echo1337")
[serialport] ~ RX: echo1337
[serialport] ~ RX: >
[serialport] ~ TX: print(node.info());
[serialport] ~ RX: print(node.info());
[serialport] ~ RX: 2
[serialport] ~ RX: 2 0
[serialport] ~ RX: 9171440
[serialport] ~ RX: 1458400
[serialport] ~ RX: 4096 2
[serialport] ~ RX: 40000000
[serialport] ~ RX: >
[NodeMCU-Tool]~ Connected
[device] ~ Arch: esp8266 | Version: 2.2.0 | ChipID: 0x8bf1f0 | FlashID: 0x1640e0
[serialport] ~ TX: print(file.fsinfo())
[serialport] ~ RX: print(file.fsinfo())
[serialport] ~ RX: 109185
[serialport] ~ RX: 4016
[serialport] ~ RX: 113201
[serialport] ~ RX: >
[serialport] ~ TX: local l = file.list();for k,v in pairs(l) do uart.write(0,k..":"..v..";") end print("")
[serialport] ~ RX: local l = file.list();for k,v in pairs(l) do uart.write(0,k..":"..v..";") end print("")
[serialport] ~ RX: mqtt2cloud.lua:969;LFS.img:2429;
[serialport] ~ RX:
[serialport] ~ RX: >
mqtt2cloud.luaLFS.img[NodeMCU-Tool]~ disconnecting
somewhat different than what I have seen in examples, but is that it, and its working as it should?
I am looking for a high level explanation of what is supposed to be done with the nodemcu regarding the filesystems.. there seems to be docs talking about all the parts, but what is the LFS for? do you need one on the nodemcu in order to run lua code on it?
Thanks for any pointers!
Over at the firmware project we have been seeing an influx of features for ESP32 in the recent weeks and months: https://github.com/nodemcu/nodemcu-firmware/pulls?q=is%3Apr+is%3Aopen+label%3AESP32 New contributors are providing fixes and new modules for that branch.
It is definitely high time we get ESP32 support for this Docker image. I took a few steps into that direction back in March but due to lack of time it was abandoned.
In theory it all sounds fairly straightforward:
build
that detects the branch i.e. platform ESP32 vs ESP8266srec_cat
to bundle the three binaries
I think the instructions for "Flashing the built binary" might / should reference the setting:
#define SPIFFS_FIXED_LOCATION 0x100000
Presumably the section should include something like:
If you set your build to a fixed location using something like:
#define SPIFFS_FIXED_LOCATION 0x100000
then the command to flash the image will become
esptool.py --port <USB-port-with-ESP8266> write_flash 0x100000 <NodeMCU-firmware-directory>/bin/nodemcu_[integer|float]_<Git-branch>.bin
RE: https://hub.docker.com/r/marcelstoer/nodemcu-build/
...using the IMAGE_NAME option in the "Create the Firmware" step with user_config.h "#define LUA_NUMBER_INTEGRAL" enabled:
docker run --rm -it -e "IMAGE_NAME=firmware" -v "//c/Users/Joe/Projects/NodeMCU/nodemcu-firmware":/opt/nodemcu-firmware marcelstoer/nodemcu-build build
...produces the expected result file name:
nodemcu_integer_firmware.bin
=-=
...using the IMAGE_NAME option in the "Create an LFS Image" step with user_config.h "#define LUA_NUMBER_INTEGRAL" enabled:
docker run --rm -ti -e "IMAGE_NAME=firmware" -v "//c/Users/Joe//Projects/NodeMCU/nodemcu-firmware":/opt/nodemcu-firmware -v "//c/Users/Joe/Projects/NodeMCU/user-apps":/opt/lua marcelstoer/nodemcu-build lfs-image
...produces an unexpected result file name:
firmware_int.img
Based on the documentation for the IMAGE_NAME option, the expected result file name should have:
nodemcu_integer_firmware.img
=-=
I have successfully built the firmware and after build I got the following files in the bin directory
0x00000.bin
0x10000.bin
nodemcu_float_master_20180201-1623.bin
nodemcu_float_master_20180201-1623.map
nodemcu_integer_master_20180201-1623.bin
nodemcu_integer_master_20180201-1623.map
Then I have flashed "nodemcu_float_master_20180201-1623.bin" to the module and tried to write a small script which uses event monitoring, but I get the following error.
init.lua:20: attempt to index field 'eventmon' (a nil value)
When I built the firmware, I made sure that the following definition is uncommented.
#define WIFI_SDK_EVENT_MONITOR_ENABLE
Can someone tell me what wrong I must be doing?
I tried to use the couldbuild as well and I face the same issue..
Regards
Rakesh
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.