Comments (28)
Hi!
if You request nodemcu makefile for windows, replace begin lines in origin makefile to:
#copyright (c) 2010 Espressif System
ifndef PDIR
endif
#Base directory for the compiler
XTENSA_TOOLS_ROOT ?= c:/Espressif/xtensa-lx106-elf/bin
AR = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-ar
##xt-ar
CC = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
##xt-xcc
NM = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-nm
##xt-nm
CPP = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-cpp
##xt-cpp
OBJCOPY = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objcopy
##xt-objcopy
#MAKE = xt-make
from nodemcu-firmware.
Is that it? Just add that to the top of the file, call it makefile.windows and it’ll work in Windows??
From: Istvan Puzsar [mailto:[email protected]]
Sent: 28 December 2014 00:03
To: nodemcu/nodemcu-firmware
Cc: scargill
Subject: Re: [nodemcu-firmware] Make Files (#56)
Hi!
if You request nodemcu makefile, replace begin lines in makefile to:
#copyright (c) 2010 Espressif System
ifndef PDIR
endif
#Base directory for the compiler
XTENSA_TOOLS_ROOT ?= c:/Espressif/xtensa-lx106-elf/bin
AR = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-ar
##xt-ar
CC = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
##xt-xcc
NM = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-nm
##xt-nm
CPP = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-cpp
##xt-cpp
OBJCOPY = $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objcopy
##xt-objcopy
#MAKE = xt-make
—
Reply to this email directly or view it on GitHub #56 (comment) .Image removed by sender.
from nodemcu-firmware.
HI!
patch/create nodemcu-firmware makefile, batch files for windows
the linux files not patched
download and install My Espressif DevKit for Windows + Eclipse IDE
http://www.esp8266.com/viewtopic.php?f=9&t=820
download https://github.com/nodemcu/nodemcu-firmware
unzip to c:\Espressif
download http://puzsar.hu/esp8266/nodemcu-firmware-master_patch_win.zip
unzip to c:\Espressif\ (overwrite files if exists)
open c:\Espressif\nodemcu-firmware-master\ directrory
and run makeall_flash.bat this batch file compile files, and write to flash
please check com port number in flash*.bat
tested in windows xp 32bit
__
Dear Nodemcu!
If like this patch, please include to firmware
Thank You
Istvan
from nodemcu-firmware.
Great, I am downloading.
and is it possible to make this compliant with Linux gcc-toolchain and windows xtensa toolchain.
from nodemcu-firmware.
Hi!
If download before 2014.12.28 23:45 (gmt+2), please download again, the gen_misc*.bat contain bad path.
Sorry, thanks
from nodemcu-firmware.
Just a little clarity please... Assume that the Eclipse installation is already done - has all he projects in Espressif/examples - and that the installation is already compiling and blowing other packages (the setup for this comes with a load of installations already).
So what is then left to do.... change the Makefile?? What else.. when I tried to copy nodemcu-firmware into espressif/examples and then IMPORT in Eclipse - nothing happened - the ok button was greyed out...
from nodemcu-firmware.
Hi
Please view video: http://www.esp8266.com/viewtopic.php?f=9&t=820 to import existed eclipse projects.
Working, tested in xp32bit.
Help to create new existed project, import not eclipse project:
Puzsar
from nodemcu-firmware.
Warning, the directory name doesn't contain spaces!!!
from nodemcu-firmware.
Hi,
I followed your instructions and the compiler returned the following error:
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../
xtensa-lx106-elf/bin/ld.exe: .output/eagle/debug/image/eagle.app.v6.out section
.text' will not fit in region
iram1_0_seg'
collect2.exe: error: ld returned 1 exit status
Any idea where is the problem? (compiler optimization...?)
Thanks
from nodemcu-firmware.
Hi, I followed your instructions and the compiler returned the following error:
I hope that others can help – I am not yet an expert on using that compiler.
from nodemcu-firmware.
Hi there
I have followed the instructions a number of times - in each case there is ONE item missing from your otherwise excellent instructions - you assume everyone has PYTHON27 installed - which of course they don't.
I've just installed the lot on a new machine and followed your further instructions to install the LUA interpreter.
At the end..... I'm getting problems - I have followed the instructions EXACTLY and then installed Python..
c:\Espressif\nodemcu-firmware-master\app\.output\eagle\debug\image>xtensa-lx106-elf-objcopy.exe --only-section .data -O binary eagle.app.v6.out eagle.app.v6.dat a.bin
xtensa-lx106-elf-objcopy.exe: 'eagle.app.v6.out': No such file
c:\Espressif\nodemcu-firmware-master\app\.output\eagle\debug\image>rem xt-objcopy
c:\Espressif\nodemcu-firmware-master\app\.output\eagle\debug\image>xtensa-lx106-
elf-objcopy.exe --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin
xtensa-lx106-elf-objcopy.exe: 'eagle.app.v6.out': No such file
c:\Espressif\nodemcu-firmware-master\app\.output\eagle\debug\image>rem xt-objcopy
c:\Espressif\nodemcu-firmware-master\app\.output\eagle\debug\image>xtensa-lx106-
elf-objcopy.exe --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin
xtensa-lx106-elf-objcopy.exe: 'eagle.app.v6.out': No such file
c:\Espressif\nodemcu-firmware-master\app\.output\eagle\debug\image>c:\Espressif\
nodemcu-firmware-master\tools\gen_appbin_win.py eagle.app.v6.out v6
c:/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-nm.exe: 'eagle.app.v6.out': No such file
no entry point!!
Press any key to continue . . .
from nodemcu-firmware.
Scargill, those messages are a consequence and not the problem. E.g. you cannot link if any object file isn’t created (compiled).
Like in my case, probably you have and error before that cancels the compiling. Check the output messages before those.
from nodemcu-firmware.
I have fixed the eclipse project. now you can import it and build it.
compile ok, gen bin ok, clean ok.
flash not ok with esptool.py. (it seems esptool.py can only flash combined bin?)
flash with nodemcu-flasher ok.
have to install python27 and pyserial27
from nodemcu-firmware.
Hi there
Loaded the master ZIP off your site just now.. unzipped and dumped the whole thing into ECLIPSE. Told Eclipse to import – APP.
Looks good – and ALL seems to compile but no… It’s not finding MAKE…
The AT demo works a treat – the MQTT import works a treat… but I’m having no luck with nodeMCU –I downloaded your code this morning..
Tried this on 2 machines – same result.
08:14:08 **** Build of configuration Default for project nodemcu-firmware ****
"C:\\Espressif\\examples\\nodemcu-firmware-master\\app\\gen_misc.bat" all
C:\Espressif\examples\nodemcu-firmware-master\app>make all
'make' is not recognized as an internal or external command,
C:\Espressif\examples\nodemcu-firmware-master\app>del /F ..\bin\eagle.app.v6.flash.bin ..\bin\eagle.app.v6.irom0text.bin ..\bin\eagle.app.v6.dump ..\bin\eagle.app.v6.S
operable program or batch file.
Could Not Find C:\Espressif\examples\nodemcu-firmware-master\bin\eagle.app.v6.flash.bin
C:\Espressif\examples\nodemcu-firmware-master\app>cd .output\eagle\debug\image
The system cannot find the path specified.
The system cannot find the path specified.
C:\Espressif\examples\nodemcu-firmware-master\app>xtensa-lx106-elf-objdump -x -s eagle.app.v6.out 1>..\..\..\..\..\bin\eagle.app.v6.dump
The system cannot find the path specified.
C:\Espressif\examples\nodemcu-firmware-master\app>xtensa-lx106-elf-objdump -S eagle.app.v6.out 1>..\..\..\..\..\bin\eagle.app.v6.S
C:\Espressif\examples\nodemcu-firmware-master\app>xtensa-lx106-elf-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin
xtensa-lx106-elf-objcopy: 'eagle.app.v6.out': No such file
C:\Espressif\examples\nodemcu-firmware-master\app>xtensa-lx106-elf-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin
xtensa-lx106-elf-objcopy: 'eagle.app.v6.out': No such file
C:\Espressif\examples\nodemcu-firmware-master\app>xtensa-lx106-elf-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin
xtensa-lx106-elf-objcopy: 'eagle.app.v6.out': No such file
C:\Espressif\examples\nodemcu-firmware-master\app>xtensa-lx106-elf-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin
xtensa-lx106-elf-objcopy: 'eagle.app.v6.out': No such file
C:\Espressif\examples\nodemcu-firmware-master\app>gen_appbin.py eagle.app.v6.out v6
xtensa-lx106-elf-nm: 'eagle.app.v6.out': No such file
no entry point!!
Traceback (most recent call last):
File "C:\Espressif\examples\nodemcu-firmware-master\tools\gen_appbin.py", line 69, in <module>
cmd = 'genflashbin%s eagle.app.%s.text.bin '%(ver, ver)+entry_addr+' eagle.app.%s.data.bin '%(ver)+ data_start_addr+' eagle.app.%s.rodata.bin '%(ver)+rodata_start_addr
TypeError: cannot concatenate 'str' and 'NoneType' objects
C:\Espressif\examples\nodemcu-firmware-master\app>xcopy /y eagle.app.v6.irom0text.bin ..\..\..\..\..\bin\
0 File(s) copied
File not found - eagle.app.v6.irom0text.bin
C:\Espressif\examples\nodemcu-firmware-master\app>xcopy /y eagle.app.v6.flash.bin ..\..\..\..\..\bin\
0 File(s) copied
File not found - eagle.app.v6.flash.bin
C:\Espressif\examples\nodemcu-firmware-master\app>cd ..\..\..\..\
08:14:09 Build Finished (took 190ms)
from nodemcu-firmware.
right click the imported project.
select Properties, under C/C++ Build find Environment,
click Add..., name PATH, value: C:\Espressif\xtensa-lx106-elf\bin
press ok , ok.
Or, just add C:\Espressif\xtensa-lx106-elf\bin to the system environment PATH.
from nodemcu-firmware.
have you delete the previous nodemcu-firmware project completely.
I follow your step, download zip, extract and import. works
from nodemcu-firmware.
Oh, also add
C:\MinGW\bin;C:\MinGW\msys\1.0\bin; to system environment PATH
and ;C:\Python27;
from nodemcu-firmware.
Hi yes I did – and I’m trying this on 2 computers.. I also made sure that I added the PATH item you suggested AND checked that the path exists. I still get this.
09:52:10 **** Build of configuration Default for project nodemcu-firmware ****
make clean
Cannot run program "make": Launching failed
Error: Program "make" not found in PATH
PATH=[C:\Windows\system32;C:/Program Files (x86)/Java/jre1.8.0_25/bin/client;C:/Program Files (x86)/Java/jre1.8.0_25/bin;C:/Program Files (x86)/Java/jre1.8.0_25/lib/i386;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\adb;C:\Program Files\nodejs\;C:\Users\Peter\AppData\Roaming\npm;C:\Espressif\xtensa-lx106-elf\bin]
09:52:10 Build Finished (took 39ms)
from nodemcu-firmware.
RIGHT! NOW I can compile. TThe FLASH item at the end of not working – and in you MAKEFILE I can’t see the COM port reference? It says it can’t find SERIAL – but other projects are blowing FLASH?? Ok, installed PYSERIAL – wants to use COM1 – where do you set the COM port?
10:00:47 **** Build of configuration Default for project nodemcu-firmware ****
"C:\\Espressif\\examples\\nodemcu-firmware-master\\app\\flash.bat"
C:\Espressif\examples\nodemcu-firmware-master\app>rem gen_misc.bat
C:\Espressif\examples\nodemcu-firmware-master\app>rem eagle.app.v6.flash.bin: 0x00000
C:\Espressif\examples\nodemcu-firmware-master\app>rem eagle.app.v6.irom0text.bin: 0x10000
C:\Espressif\examples\nodemcu-firmware-master\app>rem esp_init_data_default.bin: 0x7c000
C:\Espressif\examples\nodemcu-firmware-master\app>rem blank.bin: 0x7e000
C:\Espressif\examples\nodemcu-firmware-master\app>cd ..\bin
C:\Espressif\examples\nodemcu-firmware-master\bin>esptool.py -p com1 write_flash 0x00000 eagle.app.v6.flash.bin 0x10000 eagle.app.v6.irom0text.bin 0x7c000 esp_init_data_default.bin 0x7e000 blank.bin
Traceback (most recent call last):
File "C:\Espressif\examples\nodemcu-firmware-master\tools\esptool.py", line 22, in <module>
import serial
ImportError: No module named serial
C:\Espressif\examples\nodemcu-firmware-master\bin>echo ************************* flash end *************************************
************************* flash end *************************************
C:\Espressif\examples\nodemcu-firmware-master\bin>cd ..\app
10:00:48 Build Finished (took 126ms)
from nodemcu-firmware.
in flash.bat or flash.sh file。
from nodemcu-firmware.
esptool.py have some problem when flash two piece as one firmware.
ref this #81
from nodemcu-firmware.
You might be interested in this – the MAKEFILE for the AT software – there is an EXE file for flashing the chips and hence PY stuff not used – also COM port is set in the same file..
Changelog
Changed the variables to include the header file directory
Added global var for the XTENSA tool root
This make file still needs some work.
Output directors to store intermediate compiled files
relative to the project directory
BUILD_BASE = build
FW_BASE = firmware
Base directory for the compiler
XTENSA_TOOLS_ROOT ?= c:/Espressif/xtensa-lx106-elf/bin
base directory of the ESP8266 SDK package, absolute
SDK_BASE ?= c:/Espressif/ESP8266_SDK
#Esptool.py path and port
ESPTOOL ?= c:\Espressif\utils\esptool.exe
ESPPORT ?= COM4
name for the target project
TARGET = app
which modules (subdirectories) of the project to include in compiling
MODULES = driver user
EXTRA_INCDIR = include $(SDK_BASE)/../include
libraries used in this project, mainly provided by the SDK
LIBS = c gcc hal phy pp net80211 lwip wpa upgrade main
compiler flags using during compilation of source files
CFLAGS = -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH
linker flags used to generate the main object file
LDFLAGS = -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static
linker script used for the above linkier step
LD_SCRIPT = eagle.app.v6.ld
various paths from the SDK used in this project
SDK_LIBDIR = lib
SDK_LDDIR = ld
SDK_INCDIR = include include/json
we create two different files for uploading into the flash
these are the names and options to generate them
FW_FILE_1 = 0x00000
FW_FILE_1_ARGS = -bo $@ -bs .text -bs .data -bs .rodata -bc -ec
FW_FILE_2 = 0x40000
FW_FILE_2_ARGS = -es .irom0.text $@ -ec
select which tools to use as compiler, librarian and linker
CC := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
AR := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-ar
LD := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
no user configurable options below here
FW_TOOL ?= $(XTENSA_TOOLS_ROOT)/esptool
SRC_DIR := $(MODULES)
BUILD_DIR :=
SDK_LIBDIR :=
SDK_INCDIR :=
SRC :=
OBJ :=
LIBS :=
APP_AR :=
TARGET_OUT :=
LD_SCRIPT :=
INCDIR :=
EXTRA_INCDIR :=
MODULE_INCDIR :=
FW_FILE_1 :=
FW_FILE_2 :=
V ?= $(VERBOSE)
ifeq ("$(V)","1")
Q :=
vecho := @true
else
Q := @
vecho := @echo
endif
vpath %.c $(SRC_DIR)
define compile-objects
$1/%.o: %.c
$(vecho) "CC $$<"
$(Q) $(CC) $(INCDIR) $(MODULE_INCDIR) $(EXTRA_INCDIR) $(SDK_INCDIR) $(CFLAGS) -c $$< -o $$@
endef
.PHONY: all checkdirs clean
all: checkdirs
$(vecho) "FW $@"
$(Q) $(FW_TOOL) -eo $(TARGET_OUT) $(FW_FILE_1_ARGS)
$(vecho) "FW $@"
$(Q) $(FW_TOOL) -eo $(TARGET_OUT) $(FW_FILE_2_ARGS)
$(vecho) "LD $@"
$(Q) $(LD) -L$(SDK_LIBDIR) $(LD_SCRIPT) $(LDFLAGS) -Wl,--start-group $(LIBS) $(APP_AR) -Wl,--end-group -o $@
$(vecho) "AR $@"
$(Q) $(AR) cru $@ $^
checkdirs:
$(BUILD_DIR):
$(Q) mkdir -p $@
firmware:
$(Q) mkdir -p $@
flash: firmware/0x00000.bin firmware/0x40000.bin
$(ESPTOOL) -p $(ESPPORT) write_flash 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin
test: flash
screen $(ESPPORT) 115200
rebuild: clean all
clean:
$(Q) rm -f $(APP_AR)
$(Q) rm -f $(TARGET_OUT)
$(Q) rm -rf $(BUILD_DIR)
$(Q) rm -rf $(BUILD_BASE)
$(Q) rm -f $(FW_FILE_1)
$(Q) rm -f $(FW_FILE_2)
$(Q) rm -rf $(FW_BASE)
From: zeroday [mailto:[email protected]]
Sent: 09 January 2015 10:38
To: nodemcu/nodemcu-firmware
Cc: scargill
Subject: Re: [nodemcu-firmware] Make Files (#56)
esptool.py have some problem when flash two piece as one firmware.
ref this #81 #81
—
Reply to this email directly or view it on GitHub #56 (comment) . https://github.com/notifications/beacon/ABzUg1CLWxPDiDHvf_tLkGK1Bat_JoJEks5nf6b3gaJpZM4DMkYL.gif
from nodemcu-firmware.
Everything is now working. Needed to add PYSERIAL and those two items in the path… also needed to find the COM setting – might want to make that more obvious – can it go in the MAKEFILE?
For some reason the compiled code does not start up every time – never had that before.. Will check another board…
Pete.
from nodemcu-firmware.
great.
even with esptool.exe I still have flash problem...
from nodemcu-firmware.
use esptool.py to generate firmware, and burn with esptool.py.
now the firmware runs.
from nodemcu-firmware.
Well done.
from nodemcu-firmware.
in the latest commit, eclipse project file is moved to root.
so, when import, select nodemcu-firmware instead of nodemcu-firmware/app
from nodemcu-firmware.
@scargill Hello.
I getting started on this platform and I see you got it working on Windows!! Wondering if there is a guide or notes that I can follow for easier setup.
from nodemcu-firmware.
Related Issues (20)
- ESP32S3: Firmware startup but no lua prompt HOT 1
- MacOS Build Error when LFS is activated in the configuration
- Request to add tm1637 related module HOT 1
- ESP32: Cannot send files to device HOT 1
- ESP32: Not enough memory to load library HOT 1
- ESP32: dev-branch doesn't build out of the box
- Typo in docs/modules/spi.md
- Release version issue snprintf
- Lua httpserver duplicates status line HOT 1
- enduser resets any connection to http port
- Error during build: "as: unrecognized option '--text-section-literals'" HOT 3
- Add support for BMP390 sensor
- Flashing on ESP32-C2 not working HOT 5
- Add the rotary module to the ESP32 version
- Integer overflow (leading to stack-based buffer overflow) in embedded lua_struct.c HOT 2
- Here is a negation overflow in lua HOT 2
- Support the RGB LED used on the ESP32-C3-DevKitM-1
- Add support for matrix keypads to ESP32
- Making the lua component more standalone
- MQTT connect failure callback reason constants
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodemcu-firmware.