ESP32 Flashing app alone

jaybnair
Posts: 6
Joined: Fri Jun 23, 2017 8:20 am

ESP32 Flashing app alone

Postby jaybnair » Fri Jun 23, 2017 8:27 am

Hi,

The ESP32 web page (https://esp-idf.readthedocs.io/en/v2.0/ ... oject.html) says that we can flash app alone using make app-flash. But but when I do that it flashes the entire image every time.
May I know if there is any other mechanism to flash the app alone?

Thanks
jay

ESP_Sprite
Posts: 9759
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 Flashing app alone

Postby ESP_Sprite » Fri Jun 23, 2017 3:04 pm

Erm... can't say more than that it works for me. How do you conclude it flashes everything?

jaybnair
Posts: 6
Joined: Fri Jun 23, 2017 8:20 am

Re: ESP32 Flashing app alone

Postby jaybnair » Sat Jun 24, 2017 7:53 am

It takes the same time in both cases( make flash and make app-flash)

1.: make app-flash

Flashing app to serial port /dev/ttyUSB0, offset 0x10000...
esptool.py v2.0-beta1
.........................
Auto-detected Flash size: 4MB
Compressed 1139632 bytes to 578369...
Wrote 1139632 bytes (578369 compressed) at 0x00010000 in 50.9 seconds (effective 179.1 kbit/s)...


=================================================================

2. make flash
Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.0-beta1
Connecting....

Auto-detected Flash size: 4MB
Flash params set to 0x0220
Compressed 11584 bytes to 6692...
Wrote 11584 bytes (6692 compressed) at 0x00001000 in 0.6 seconds (effective 156.3 kbit/s)...
Hash of data verified.
Compressed 1139632 bytes to 578369...
Wrote 1139632 bytes (578369 compressed) at 0x00010000 in 50.9 seconds (effective 179.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 82...
Wrote 3072 bytes (82 compressed) at 0x00008000 in 0.0 seconds (effective 2191.5 kbit/s)

ESP_Sprite
Posts: 9759
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 Flashing app alone

Postby ESP_Sprite » Sun Jun 25, 2017 3:54 am

Yes, well, the time taken is not a very good measurement of what is flashed, given that major part of what you flash consists of the app (500K'ish) which will take so long that flashing the bootloader and partition table as well (which are 11K'ish combined and well-compressable) doesn't really increase the flashing time.

If what you're after is a quicker flashing time, you're probably better off trying to increase the baud rate (make menuconfig -> serial flasher config -> default baud rate); depending on your hardware you can set that to up to 2MBaud, which should be way faster than the 115200 baud you're using now.

markwj
Posts: 90
Joined: Tue Mar 08, 2016 5:03 am

Re: ESP32 Flashing app alone

Postby markwj » Sun Jun 25, 2017 2:14 pm

jaybnair wrote:2. make flash
Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.0-beta1
Connecting....

Auto-detected Flash size: 4MB
Flash params set to 0x0220
Compressed 11584 bytes to 6692...
Wrote 11584 bytes (6692 compressed) at 0x00001000 in 0.6 seconds (effective 156.3 kbit/s)...
Hash of data verified.
Compressed 1139632 bytes to 578369...
Wrote 1139632 bytes (578369 compressed) at 0x00010000 in 50.9 seconds (effective 179.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 82...
Wrote 3072 bytes (82 compressed) at 0x00008000 in 0.0 seconds (effective 2191.5 kbit/s)
The 11,584 bytes flashed is the boot loader.
The 3,072 bytes flashed is the partition table.
The 1,139,632 bytes flashed is the app.

So, 'make flash' will flash all three, but 'make app-flash' will flash just the app. As ESP_Sprite says, you can make it flash faster by increasing the baud rate (in 'make menuconfig').

jaybnair
Posts: 6
Joined: Fri Jun 23, 2017 8:20 am

Re: ESP32 Flashing app alone

Postby jaybnair » Tue Jun 27, 2017 4:17 am

Thank you very much..
Increasing the baud rate helped ..

Who is online

Users browsing this forum: No registered users and 130 guests