Page 1 of 1

Flashing custom partitions from Eclipse

Posted: Thu Jan 03, 2019 7:41 pm
by gunar.kroeger
Hi,
I use a custom partition to allow for spiffs and OTA updates.
This means I can not use the "Build Targets - > flash" like the docs recommend.

So far I have been flashing each partitions bin file to the correct address using mingw32 command:

Code: Select all

python C:/msys32/home/gunar.kroeger/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port COM4 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xd000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_Updater/build/ota_data_initial.bin 0x1000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_Updater/build/bootloader/bootloader.bin 0x10000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_Updater/build/ESP32_Updater.bin 0x90000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_AOLT/build/ESP32_AOLT.bin 0x8000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_Updater/build/partitions.bin
Is it possible to call this function from inside eclipse Build Targets or something similar?

Thanks

Re: Flashing custom partitions from Eclipse

Posted: Fri Jan 04, 2019 9:18 pm
by rudi ;-)
gunar.kroeger wrote:
Thu Jan 03, 2019 7:41 pm
..

Code: Select all

python C:/msys32/home/gunar.kroeger/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port COM4 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xd000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_Updater/build/ota_data_initial.bin 0x1000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_Updater/build/bootloader/bootloader.bin 0x10000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_Updater/build/ESP32_Updater.bin 0x90000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_AOLT/build/ESP32_AOLT.bin 0x8000 C:/Users/gunar.kroeger/Desktop/eclipse/ESP32_Updater/build/partitions.bin
Is it possible to call this function from inside eclipse Build Targets or something similar?
happy new year gunar,

you can try to add an entry in your project Makefile,
for testings like this
suggestion1.jpg
suggestion1.jpg (186.18 KiB) Viewed 4060 times
and create the target like you do it usually and call it.

if this work's for you, then try next step and create a simple python script, example in the c:/sc folder and name it example test.py
same doing then, append an entry in your Project Make File and create the target for it and test it by call it ( double click on the target ) like this


suggestion2.jpg
suggestion2.jpg (239.57 KiB) Viewed 4060 times

if this works again for you , final add your python call in the Projekt Make file and make an entry in the target for it and run it
like this
suggestion3.jpg
suggestion3.jpg (181.53 KiB) Viewed 4060 times

not sure, this is the simplest way - but it can work for you.
hope this helps

best wishes
rudi ;-)

Re: Flashing custom partitions from Eclipse

Posted: Wed Jan 09, 2019 2:41 pm
by gunar.kroeger
Wow thanks! that was exactly what I was looking for!