thunderace / Esp8266-Arduino-Makefile

Makefile to build arduino code for ESP8266/ESP32x under linux (tested on debian X64)
34 stars 20 forks source link

make upload with esp32 doesn't work with last version #32

Closed PhilippeSimier closed 2 years ago

PhilippeSimier commented 2 years ago

I have installed your repository

sudo apt-get install python-is-python3 git clone https://github.com/thunderace/Esp8266-Arduino-Makefile.git

~/Esp8266-Arduino-Makefile$ ./esp32-install.sh ~/Esp8266-Arduino-Makefile$ cd example/esp32/SimpleWiFiServer/ ~/Esp8266-Arduino-Makefile/example/esp32/SimpleWiFiServer$ ls libraries Makefile Makefile.atmegazero_esp32s2 Makefile.git SimpleWiFiServer.ino

philippe@philippe:~/Esp8266-Arduino-Makefile/example/esp32/SimpleWiFiServer$ make the compilation is good

philippe@philippe:~/Esp8266-Arduino-Makefile/example/esp32/SimpleWiFiServer$ make upload ...... esptool.py v3.2-dev Merged 25 ELF sections

Memory usage Ram: 32560 bytes Flash: 744446 bytes

chip esp8266 --port /dev/ttyUSB0 --baud 115200 write_flash 0x0 ./build.lolin32-2.0.0/SimpleWiFiServer.bin /bin/bash: chip : commande introuvable make: [../../../espXArduino.mk:633 : upload] Erreur 127 (ignorée)

for upload the right command is :

philippe@philippe:~/Esp8266-Arduino-Makefile/example/esp32/SimpleWiFiServer$ ../../../esp32-2.0.0/tools/esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x10000 ./build.lolin32-2.0.0/SimpleWiFiServer.bin

write_flash 0x10000 ./build.lolin32-2.0.0/SimpleWiFiServer.bin
esptool.py v3.2-dev
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: ac:67:b2:37:2f:44
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00010000 to 0x000c7fff...
Compressed 751248 bytes to 490334...
Wrote 751248 bytes (490334 compressed) at 0x00010000 in 43.6 seconds (effective 137.9 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
PhilippeSimier commented 2 years ago

I propose a solution in file espXArduino.mk ligne 632

upload: $(BUILD_OUT)/$(TARGET).bin size
    $(PYTHON) $(ARDUINO_HOME)/tools/esptool.py --port $(SERIAL_PORT) --baud $(UPLOAD_SPEED) write_flash 0x10000 $(BUILD_OUT)/$(TARGET).bin