Flashing custom partitions from Eclipse

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

Flashing custom partitions from Eclipse

Postby gunar.kroeger » Thu Jan 03, 2019 7:41 pm

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
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

User avatar
rudi ;-)
Posts: 1728
Joined: Fri Nov 13, 2015 3:25 pm

Re: Flashing custom partitions from Eclipse

Postby rudi ;-) » Fri Jan 04, 2019 9:18 pm

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 4508 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 4508 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 4508 times

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

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

Re: Flashing custom partitions from Eclipse

Postby gunar.kroeger » Wed Jan 09, 2019 2:41 pm

Wow thanks! that was exactly what I was looking for!
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

Who is online

Users browsing this forum: mike_dawes and 96 guests