Partitioning

After my disastrous experience with SPIFFS I am now looking into alternatives. With much trouble I finally succeeded in running with FFat on the Arduino IDE. For the sketch to work I had to set the partitioning to 'Default with ffat'. Then I tried to do the same on my favorite ;-) IDE, but found no place to change the partitioning.

I am sure it can de done, but where and how?

Comments

I need to (manually) add the

I need to (manually) add the extra partition options to the menu. I'll do it when I upgrade to the newer ESP32 core. However, you can manually specify your partitions by creating a file "partitions.csv" in your sketch folder with your partitioning scheme in it. The content of "default_ffat" is:

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x140000,
app1,     app,  ota_1,   0x150000,0x140000,
eeprom,   data, 0x99,    0x290000,0x1000,
ffat,     data, fat,     0x291000,0x16F000,

However this feature is experimental and may not work... ;)

Didn't work at first, but

Didn't work at first, but then on a hunch I decided to format the flash again, and now it runs along smoothly!

I guess I know what happened: I had started FFat first on Arduino IDE, using their partition setting for FFat. Remember that my attempt on uploading a html file with Arduino tools resulted in an overwritten EEProm + ruined SPIFFS?

The reason probably is that Arduino is using a wrong partitioning scheme. My partition is up to date.

uecide is clearly ahead here ;-)

I actually find it quite convenient to stuff a partition.CSV file in the folder and all is done. It is easy and simple; no need for some menu driven complication.

I created that actually

I created that actually because I had need of a custom partition scheme (lots of program space and OTA available, but no need for SPIFFS). Made more sense than modifying the core to add my own scheme...

Partitioning is highly

Partitioning is highly confusing: I used this code https://github.com/marcmerlin/esp32_fatfsimage/blob/master/arduino/ffat/ffat.inowith line 64 modified to "if(!FFat.begin( 1, "", 1 )){" and ran it first on the Arduino IDE and then on Uecide (and repeated; gave same outcome).

On the A-IDE I got:

Partition list:
partition addr: 0x010000; size: 0x140000; label: app0
partition addr: 0x150000; size: 0x140000; label: app1
partition addr: 0x009000; size: 0x005000; label: nvs
partition addr: 0x00e000; size: 0x002000; label: otadata
partition addr: 0x290000; size: 0x170000; label: ffat

Trying to mount ffat partition if present
File system mounted
Total space: 1458176
Free space: 1458176

But on UECIDE I got:

Partition list:
partition addr: 0x010000; size: 0x140000; label: app0
partition addr: 0x150000; size: 0x140000; label: app1
partition addr: 0x009000; size: 0x005000; label: nvs
partition addr: 0x00e000; size: 0x002000; label: otadata
partition addr: 0x290000; size: 0x001000; label: eeprom
partition addr: 0x291000; size: 0x16f000; label: spiffs

Trying to mount ffat partition if present
FFat Mount Failed

There was no partition.csv file in the folder, but I thought the code is looking into the ESP32 ? Why then do I get a different outcome?

Which of the two gives the real situation on the chip?

They are both correct. When

They are both correct. When you upload to the ESP32 you upload the entire thing, including the partition map. By compiling in UECIDE and uploading with a SPIFFS partition map you replace the existing one with the one you just compiled.

Normally, yes. The "normal"

Normally, yes. The "normal" way of updating just the code is to use OTA updates which will load the code into the currently unused app* partition, verify it, and if it's all correct then switch the boot flag to boot from that partition. I am not aware of any way, currently, to probe the current partition table, compile for that table, then just upload to either the current or alternate app partitions. That's a somewhat tricky operation to arrange...

I have just created a new

I have just created a new programmer to test with - ESPTool for ESP32 (App0 Only). You'll find it in the plugin manager... It's intended to just upload the two partitions "otadata" and "app0" and not touch anything else. Be careful to keep your partitioning schema at least similar. Those two partitions never move, but the app0 one does change in size depending on what profile you have selected.

I also have ESP 1.0.4 in

I also have ESP 1.0.4 in testing at the moment. It's in the "testing" repository if you want to enable that and have a play with it. It has all the partition schemes available in the menu.

The whole thing of ESP and

The whole thing of ESP and Arduino & Co seems still quite immature and many times deeply confusing to newcomers like me. I am so far happy managing it with uecide, and reluctant for too many experiments with the tools.

I attempted once to install - again - a beta from the zip file, expecting it would play like in a sandbox. But it knew right away where my files were and loaded them. Not good for experiments!

If there is something completely sandboxed, I'd be curious enough to try?

You can run as many different

You can run as many different versions of UECIDE with different, separate, installations as you like. Just add the --datadir=/path/to/some/other/folder to the command line and it'll give you a completely fresh installation that's 100% isolated from any other.

I have just been working on a

I have just been working on a little program to extract the partition table from an ESP32 and convert it back into a CSV file.

It's a 2 step operation at the moment - first extract the partition table binary using esptool.py:

python esptool.py --port /dev/ttyUSB0 read_flash 0x8000 0xc00 partitions.bin

Then run my program on that bin file:

esp32part partitions.bin

And it should spit out the CSV file equivalent.

The tool is on github (https://github.com/majenkotech/esp32part) and I will be looking at ways of integrating it within UECIDE so that you can use it to grab a partition table from a live system to make updating of things easier (you won't need to remember what partition table you had on that system you wrote last year...)

I guess I am achieving the

I guess I am achieving the same results with this:

esptool.py --port /dev/ttyUSB1 read_flash 0x8000 0xc00 ptable.img
./gen_esp32part.py ptable.img

1st is identical to your proposal, 2nd is from:
https://github.com/espressif/esp-idf/blob/master/components/partition_table/gen_esp32part.py

in my ESP32 code I now include this to show my partitions:

https://github.com/marcmerlin/esp32_fatfsimage/blob/master/arduino/ffat/ffat.ino

Ooh, I didn't know that went

Ooh, I didn't know that went both ways - I only thought it went from CSV to Binary. That python program is included with the ESP32 core. But I'm not a fan of Espressif's over-use of python scripts...

I think the above shows that

I think the above shows that I could get the partitioning done with the partitions.csv file in the sketch folder, however, it no longer works.

This is the file:

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x140000,
app1,     app,  ota_1,   0x150000,0x140000,
eeprom,   data, 0x99,    0x290000,0x1000,
ffat,     data, fat,     0x291000,0x16F000,

but after uploading the sketch, the partitions are this:

Partition list: App:
partition addr: 0x010000; size: 0x140000; label: app0
partition addr: 0x150000; size: 0x140000; label: app1
Partition list: DATA:
partition addr: 0x009000; size: 0x005000; label: nvs
partition addr: 0x00e000; size: 0x002000; label: otadata
partition addr: 0x290000; size: 0x170000; label: spiffs

Where is the meat? Uhh, the FFat? And no EEProm.

Also, after compiling I get this printout:

esptool.py v2.3.1
‣ Generating parts file...
Compiling finished.
Memory usage
• Program size: 0 bytes
• Memory size: 0 bytes
• Compilation took 5,752 seconds.
Uploading firmware...
esptool.py v2.3.1
Connecting......
Chip is ESP32D0WDQ6 (revision (unknown 0xa))

Note that it says: Program size and memory size=0. I believe I had seen real numbers only a short while ago??? Can I have meddled with any settings?

There shouldn't be any

There shouldn't be any settings you can meddle with. You could make sure that verbose command execution is turned on in preferences, then see what the command is that's being run for gen_esp32part.

The Verbose command execution

The Verbose command execution was unchecked; after checking it the numbers for program and memory size were back.

What is the point of this option which leaves all other output anyway, and just replaces the numbers with zero?

Where do I see the command for gen_sp32part? This is all output:

• Linking sketch...
‣ Generating bin file...
esptool.py v2.3.1
‣ Generating parts file...
Compiling finished.
Memory usage
• Program size: 987.118 bytes
• Memory size: 293.700 bytes
• Compilation took 5,478 seconds.
Uploading firmware...
esptool.py v2.3.1
Connecting........__
Chip is ESP32D0WDQ6 (revision (unknown 0xa))
Features: WiFi, BT, Dual Core, VRef calibration in efuse
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 32750.9 kbit/s)...
Hash of data verified.
Compressed 15856 bytes to 10276...
Wrote 15856 bytes (10276 compressed) at 0x00001000 in 0.1 seconds (effective 1084.1 kbit/s)...
Hash of data verified.
Compressed 987280 bytes to 568404...
Wrote 987280 bytes (568404 compressed) at 0x00010000 in 9.6 seconds (effective 821.6 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 8164.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

The partitions remain incorrect.

Well, that was too soon. Now

Well, that was too soon. Now with the Verbose command execution checked, I do sometimes get the numbers, and sometimes not, irrespective of whether I choose compiling only, or compiling&upload. ???

The command output is in the

The command output is in the Output tab at the bottom. You can see each and every command that UECIDE executes while compiling your code.

Oh, that one. It comes out in

Oh, that one. It comes out in such tiny font that I cannot read it; so I ignore it. It is a lot of stuff. Just figured out how to copy it:

/home/ullix/.uecide/compilers/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -Os -std=gnu++11 -fno-exceptions -fexceptions -fno-rtti -DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H -g3 -Wpointer-arith -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -ml
ongcalls -nostdlib -w -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -MMD -DF_CPU=240000001L -DARDUINO=10805 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARI
ANT="esp32" -DESP32 -DCORE_DEBUG_LEVEL=0 -I/home/ullix/.uecide/cores/esp32/sdk/include/config -I/home/ullix/.uecide/cores/esp32/sdk/include/bluedroid -I/home/ullix/.uecide/cores/esp32/sdk/include/bluedroid/api -I/home/ullix/.uecide/cores/esp32/sdk/include/app_trace -I/home/ullix/.uecide/cores/esp32/sdk/inclu
de/app_update -I/home/ullix/.uecide/cores/esp32/sdk/include/bootloader_support -I/home/ullix/.uecide/cores/esp32/sdk/include/bt -I/home/ullix/.uecide/cores/esp32/sdk/include/driver -I/home/ullix/.uecide/cores/esp32/sdk/include/esp32 -I/home/ullix/.uecide/cores/esp32/sdk/include/esp_adc_cal -I/home/ullix/.uec
ide/cores/esp32/sdk/include/esp_http_client -I/home/ullix/.uecide/cores/esp32/sdk/include/esp-tls -I/home/ullix/.uecide/cores/esp32/sdk/include/ethernet -I/home/ullix/.uecide/cores/esp32/sdk/include/fatfs -I/home/ullix/.uecide/cores/esp32/sdk/include/freertos -I/home/ullix/.uecide/cores/esp32/sdk/include/hea
p -I/home/ullix/.uecide/cores/esp32/sdk/include/jsmn -I/home/ullix/.uecide/cores/esp32/sdk/include/log -I/home/ullix/.uecide/cores/esp32/sdk/include/mdns -I/home/ullix/.uecide/cores/esp32/sdk/include/mbedtls -I/home/ullix/.uecide/cores/esp32/sdk/include/mbedtls_port -I/home/ullix/.uecide/cores/esp32/sdk/incl
ude/newlib -I/home/ullix/.uecide/cores/esp32/sdk/include/nvs_flash -I/home/ullix/.uecide/cores/esp32/sdk/include/openssl -I/home/ullix/.uecide/cores/esp32/sdk/include/spi_flash -I/home/ullix/.uecide/cores/esp32/sdk/include/sdmmc -I/home/ullix/.uecide/cores/esp32/sdk/include/smartconfig_ack -I/home/ullix/.uec
ide/cores/esp32/sdk/include/spiffs -I/home/ullix/.uecide/cores/esp32/sdk/include/tcpip_adapter -I/home/ullix/.uecide/cores/esp32/sdk/include/ulp -I/home/ullix/.uecide/cores/esp32/sdk/include/vfs -I/home/ullix/.uecide/cores/esp32/sdk/include/wear_levelling -I/home/ullix/.uecide/cores/esp32/sdk/include/xtensa-
debug-module -I/home/ullix/.uecide/cores/esp32/sdk/include/coap -I/home/ullix/.uecide/cores/esp32/sdk/include/console -I/home/ullix/.uecide/cores/esp32/sdk/include/expat -I/home/ullix/.uecide/cores/esp32/sdk/include/json -I/home/ullix/.uecide/cores/esp32/sdk/include/lwip -I/home/ullix/.uecide/cores/esp32/sdk
/include/newlib -I/home/ullix/.uecide/cores/esp32/sdk/include/nghttp -I/home/ullix/.uecide/cores/esp32/sdk/include/soc -I/home/ullix/.uecide/cores/esp32/sdk/include/wpa_supplicant -I/home/ullix/.uecide/cores/esp32/sdk/include/esp_event -I/home/ullix/.uecide/cores/esp32/sdk/include/esp_ringbuf -w -I/home/ulli
x/.uecide/cores/esp32/esp32 -I/home/ullix/.uecide/libraries/Storage/esp32/FS/src -I/home/ullix/.uecide/libraries/Storage/esp32/SD/src -I/home/ullix/.uecide/libraries/Storage/esp32/FFat/src -I/home/ullix/.uecide/libraries/Storage/esp32/SPIFFS/src -I/home/ullix/.uecide/libraries/Communications/esp32/Wire/src -
I/home/ullix/Code/Arduino/libraries/Adafruit_BME280 -I/home/ullix/.uecide/libraries/Communications/esp32/SPI/src -I/home/ullix/Code/Arduino/libraries/Adafruit_GFX -I/home/ullix/.uecide/libraries/DisplayCore/SSD1306 -I/home/ullix/.uecide/libraries/DisplayCore/SSD1306_WIRE -I/home/ullix/Code/Arduino/libraries/
Adafruit_SSD1306 -I/home/ullix/Code/Arduino/libraries/EasyButton/src -I/home/ullix/.uecide/libraries/Storage/esp32/EEPROM/src -I/home/ullix/.uecide/libraries/Time/TimeLib -I/home/ullix/.uecide/libraries/Timing/NTPClient -I/home/ullix/.uecide/libraries/Communications/esp32/ESPmDNS/src -I/home/ullix/.uecide/li
braries/Communications/PubSubClient/src -I/home/ullix/Code/Arduino/libraries/ESPAsyncWebServer-master/src -I/home/ullix/Code/Arduino/libraries/WROVER_KIT_LCD-master/src -I/home/ullix/Code/Arduino/libraries/ESP8266_and_ESP32_Oled_Driver_for_SSD1306_display/src -I/home/ullix/.uecide/libraries/Communications/es
p32/WiFi/src -I/home/ullix/Code/Arduino/libraries/AsyncTCP-master/src -I/home/ullix/Code/Arduino/libraries/Adafruit_Sensor -I/home/ullix/.uecide/libraries/DisplayCore/DisplayCore -I/home/ullix/Code/Arduino/libraries/BME280/src -I/home/ullix/.uecide/boards/Boards/esp32-generic -I/home/ullix/Code/uecide/am_ffa
t0.3g-OLED_A,B,C-BME_A,B/build -I/home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B -c /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C-BME_A,B_combined.cpp -o /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C-BME_A,B_combined.cpp.o    

/home/ullix/.uecide/compilers/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -Os -nostdlib -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopU
sedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception -L/home/ullix/.uecide/cores/esp32/sdk/lib -L/home/ullix/.uecide/cores/esp32/sdk/ld -w -o /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C-BME_A,B.elf /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ff
at0.3g-OLED_A,B,C-BME_A,B_combined.cpp.o -L /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build -L/home/ullix/.uecide/cache/esp32/esp32-generic -Wl,--start-group -lrepo_SPIFFS -lcat_EasyButton -lcat_ESPAsyncWebServer-master -lrepo_TimeLib -lcat_WROVER_KIT_LCD-master -lcat_ESP8266_and_ESP32_Oled_Driv
er_for_SSD1306_display -lrepo_NTPClient -lcat_Adafruit_SSD1306 -lrepo_WiFi -lrepo_EEPROM -lrepo_ESPmDNS -lrepo_PubSubClient -lcat_Adafruit_BME280 -lrepo_FFat -lcat_Adafruit_GFX -lrepo_SSD1306 -lcat_AsyncTCP-master -lrepo_FS -lrepo_DisplayCore -lcat_BME280 -lrepo_SD -lrepo_Wire -lrepo_SPI -lrepo_SSD1306_WIRE 
-lCore_esp32 -lm -lgcc -lc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lhal -lnewlib -ldriver -lbootloader_support -lpp -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lcxx -lxtensa-debug-module 
-lmdns -lvfs -lsoc -lcore -lsdmmc -lcoap -ltcpip_adapter -lc_nano -lesp-tls -lrtc -lspi_flash -lwpa2 -lesp32 -lapp_update -lnghttp -lspiffs -lespnow -lnvs_flash -lesp_adc_cal -llog -lsmartconfig_ack -lexpat -lm -lc -lheap -lmbedtls -llwip -lnet80211 -lpthread -ljson -lesp_ringbuf -lstdc++ -Wl,--end-group    

python /home/ullix/.uecide/programmers/esptool-esp32/linux/esptool.py --chip esp32 elf2image --flash_mode dio --flash_freq 80m -o /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C-BME_A,B.bin /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C
-BME_A,B.elf                                                                                                                                                                                                                                                                                                         
esptool.py v2.3.1                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                     python /home/ullix/.uecide/cores/esp32/gen_esp32part.py -q /home/ullix/.uecide/cores/esp32/partitions/default.csv /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C-BME_A,B.partitions.bin                                                                                         

/home/ullix/.uecide/compilers/xtensa-esp32-elf/bin/xtensa-esp32-elf-size /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C-BME_A,B.elf                                                                                                                                             

python /home/ullix/.uecide/programmers/esptool-esp32/linux/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /home/ullix/.uecide/cores/esp32/partitions/boot_app0.bin 0x1000 /home/ulli
x/.uecide/cores/esp32/sdk/bin/bootloader_dio_80m.bin 0x10000 /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C-BME_A,B.bin 0x8000 /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C-BME_A,B.partitions.bin                                       
esptool.py v2.3.1                                                                                                                                                                                                                                                                                                    
Connecting....                                                                                                                                                                                                                                                                                                       
Chip is ESP32D0WDQ6 (revision (unknown 0xa))                                                                                                                                                                                                                                                                         
Features: WiFi, BT, Dual Core, VRef calibration in efuse                                                                                                                                                                                                                                                             
Uploading stub...                                                                                                                                                                                                                                                                                                    
Running stub...                                                                                                                                                                                                                                                                                                      
Stub running...                                                                                                                                                                                                                                                                                                      
Changing baud rate to 921600                                                                                                                                                                                                                                                                                         
Changed.                                                                                                                                                                                                                                                                                                             
Configuring flash size...                                                                                                                                                                                                                                                                                            
Auto-detected Flash size: 4MB                                                                                                                                                                                                                                                                                        
Compressed 8192 bytes to 47...                                                                                                                                                                                                                                                                                       
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 32093.2 kbit/s)...                                                                                                                                                                                                                          
Hash of data verified.                                                                                                                                                                                                                                                                                               
Compressed 15856 bytes to 10276...                                                                                                                                                                                                                                                                                   
Wrote 15856 bytes (10276 compressed) at 0x00001000 in 0.1 seconds (effective 1076.8 kbit/s)...                                                                                                                                                                                                                       
Hash of data verified.                                                                                                                                                                                                                                                                                               
Compressed 987280 bytes to 568404...                                                                                                                                                                                                                                                                                 
Wrote 987280 bytes (568404 compressed) at 0x00010000 in 9.6 seconds (effective 820.8 kbit/s)...                                                                                                                                                                                                                      
Hash of data verified.                                                                                                                                                                                                                                                                                               
Compressed 3072 bytes to 128...                                                                                                                                                                                                                                                                                      
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 8433.9 kbit/s)...                                                                                                                                                                                                                          
Hash of data verified.                                                                                                                                                                                                                                                                                               

Leaving...                                                                                                                                                                                                                                                                                                           
Hard resetting via RTS pin...                                                                                                                                                                                                                                                                                        

Ok, the command of interest

Ok, the command of interest is:

python /home/ullix/.uecide/cores/esp32/gen_esp32part.py -q /home/ullix/.uecide/cores/esp32/partitions/default.csv /home/ullix/Code/uecide/am_ffat0.3g-OLED_A,B,C-BME_A,B/build/am_ffat0.3g-OLED_A,B,C-BME_A,B.partitions.bin                                                                                         

That's not picking up the partitions.csv file in the sketch.

Can you find the file /home/ullix/.uecide/cores/esp32/core.txt and find the line that starts core.partition=. It should read:

core.partition=${onefile:${sketch:root}/partitions.csv,${find:${board:root}::${core:root}/partitions,${build.partitions}.csv}}

That is the line; I believe

That is the line; I believe exactly as it should read:

programmer.chip=esp32

core.partition=${onefile:${sketch:root}/partitions.csv,${find:${board:root}::${core:root}/partitions,${build.partitions}.csv}}

compile.autogen.parts=python::${core.root}/gen_esp32part.py::-q::${core.partition}::${build.path}/${filename}.partitions.bin

The whole core.txt in case it

The whole core.txt in case it matters:

name=esp32
description=ESP32 Arduino compatibility layer
core.library.esp32=esp32

upload.resetmethod=ck

sketch.upload=esptool
compiler=xtensa-esp32-elf
family=esp32
programmer=esptool

#core.flags=-DESP_PLATFORM::-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"::-DHAVE_CONFIG_H::-g3::-Wpointer-arith::-fstack-protector::-ffunction-sections::-fdata-sections::-fstrict-volatile-bitfields::-mlongcalls::-nostdlib::-w::-Wno-error=unused-function::-Wno-error=unused-but-set-variable::-Wno-error=unused-variable::-Wno-error=deprecated-declarations::-Wno-unused-parameter::-Wno-sign-compare::-MMD::-DF_CPU=240000000L::-DARDUINO=10805::-DARDUINO_ESP32_DEV::-DARDUINO_ARCH_ESP32::-DARDUINO_BOARD="ESP32_DEV"::-DARDUINO_VARIANT="esp32"::-DESP32::-DCORE_DEBUG_LEVEL=0::${core.includes}
core.flags=-DESP_PLATFORM::-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"::-DHAVE_CONFIG_H::-g3::-Wpointer-arith::-fstack-protector::-ffunction-sections::-fdata-sections::-fstrict-volatile-bitfields::-mlongcalls::-nostdlib::-w::-Wno-error=unused-function::-Wno-error=unused-but-set-variable::-Wno-error=unused-variable::-Wno-error=deprecated-declarations::-Wno-unused-parameter::-Wno-sign-compare::-MMD::-DF_CPU=240000001L::-DARDUINO=10805::-DARDUINO_${build.board}::-DARDUINO_ARCH_ESP32::-DARDUINO_BOARD="${build.board}"::-DARDUINO_VARIANT="esp32"::-DESP32::-DCORE_DEBUG_LEVEL=0::${core.includes}

core.cppflags=-std=gnu++11::-fno-exceptions::-fexceptions::-fno-rtti


includes.sdk=-I${core.root}/sdk/include/config::-I${core.root}/sdk/include/bluedroid::-I${core.root}/sdk/include/bluedroid/api::-I${core.root}/sdk/include/app_trace::-I${core.root}/sdk/include/app_update::-I${core.root}/sdk/include/bootloader_support::-I${core.root}/sdk/include/bt::-I${core.root}/sdk/include/driver::-I${core.root}/sdk/include/esp32::-I${core.root}/sdk/include/esp_adc_cal::-I${core.root}/sdk/include/esp_http_client::-I${core.root}/sdk/include/esp-tls::-I${core.root}/sdk/include/ethernet::-I${core.root}/sdk/include/fatfs::-I${core.root}/sdk/include/freertos::-I${core.root}/sdk/include/heap::-I${core.root}/sdk/include/jsmn::-I${core.root}/sdk/include/log::-I${core.root}/sdk/include/mdns::-I${core.root}/sdk/include/mbedtls::-I${core.root}/sdk/include/mbedtls_port::-I${core.root}/sdk/include/newlib::-I${core.root}/sdk/include/nvs_flash::-I${core.root}/sdk/include/openssl::-I${core.root}/sdk/include/spi_flash::-I${core.root}/sdk/include/sdmmc::-I${core.root}/sdk/include/smartconfig_ack::-I${core.root}/sdk/include/spiffs::-I${core.root}/sdk/include/tcpip_adapter::-I${core.root}/sdk/include/ulp::-I${core.root}/sdk/include/vfs::-I${core.root}/sdk/include/wear_levelling::-I${core.root}/sdk/include/xtensa-debug-module::-I${core.root}/sdk/include/coap::-I${core.root}/sdk/include/console::-I${core.root}/sdk/include/expat::-I${core.root}/sdk/include/json::-I${core.root}/sdk/include/lwip::-I${core.root}/sdk/include/newlib::-I${core.root}/sdk/include/nghttp::-I${core.root}/sdk/include/soc::-I${core.root}/sdk/include/wpa_supplicant::-I${core.root}/sdk/include/esp_event::-I${core.root}/sdk/include/esp_ringbuf


core.includes=${includes.sdk}

core.ldflags=-nostdlib::-T::esp32_out.ld::-T::esp32.common.ld::-T::esp32.rom.ld::-T::esp32.peripherals.ld::-T::esp32.rom.spiram_incompatible_fns.ld::-u::ld_include_panic_highint_hdl::-u::call_user_start_cpu0::-Wl,--gc-sections::-Wl,-static::-Wl,--undefined=uxTopUsedPriority::-u::__cxa_guard_dummy::-u::__cxx_fatal_exception::-L${core.root}/sdk/lib::-L${core.root}/sdk/ld

core.libs=-lopenssl::-lbtdm_app::-lfatfs::-lwps::-lcoexist::-lwear_levelling::-lesp_http_client::-lhal::-lnewlib::-ldriver::-lbootloader_support::-lpp::-lmesh::-lsmartconfig::-ljsmn::-lwpa::-lethernet::-lphy::-lapp_trace::-lconsole::-lulp::-lwpa_supplicant::-lfreertos::-lbt::-lmicro-ecc::-lcxx::-lxtensa-debug-module::-lmdns::-lvfs::-lsoc::-lcore::-lsdmmc::-lcoap::-ltcpip_adapter::-lc_nano::-lesp-tls::-lrtc::-lspi_flash::-lwpa2::-lesp32::-lapp_update::-lnghttp::-lspiffs::-lespnow::-lnvs_flash::-lesp_adc_cal::-llog::-lsmartconfig_ack::-lexpat::-lm::-lc::-lheap::-lmbedtls::-llwip::-lnet80211::-lpthread::-ljson::-lesp_ringbuf

core.header=Arduino.h

#compile.autogen.bin.linux_i386=${programmer:esptool,root}/tools/linux32/esptool::-bo::${build.path}/${filename}.bin::-bm::${if:${option:FlashMode.build.flash_mode}=ERR,${build.flash_mode},${option:FlashMode.build.flash_mode}}::-bf::${if:${option:FlashFreq.build.flash_freq}=ERR,${build.flash_freq},${option:FlashFreq.build.flash_freq}}::-bz::${option:FlashSize.build.flash_size}::-bs::.text::-bp::4096::-ec::-eo::${build.path}/${filename}.elf::-bs::.irom0.text::-bs::.text::-bs::.data::-bs::.rodata::-bc::-ec::-cc::esp32

#compile.autogen.bin.linux_amd64=${programmer:esptool,root}/tools/linux64/esptool::-bo::${build.path}/${filename}.bin::-bm::${if:${option:FlashMode.build.flash_mode}=ERR,${build.flash_mode},${option:FlashMode.build.flash_mode}}::-bf::${if:${option:FlashFreq.build.flash_freq}=ERR,${build.flash_freq},${option:FlashFreq.build.flash_freq}}::-bz::${option:FlashSize.build.flash_size}::-bs::.text::-bp::4096::-ec::-eo::${build.path}/${filename}.elf::-bs::.irom0.text::-bs::.text::-bs::.data::-bs::.rodata::-bc::-ec::-cc::esp32

#compile.autogen.bin.windows=${programmer:esptool,root}/tools/windows/esptool::-bo::${build.path}/${filename}.bin::-bm::${if:${option:FlashMode.build.flash_mode}=ERR,${build.flash_mode},${option:FlashMode.build.flash_mode}}::-bf::${if:${option:FlashFreq.build.flash_freq}=ERR,${build.flash_freq},${option:FlashFreq.build.flash_freq}}::-bz::${option:FlashSize.build.flash_size}::-bs::.text::-bp::4096::-ec::-eo::${build.path}/${filename}.elf::-bs::.irom0.text::-bs::.text::-bs::.data::-bs::.rodata::-bc::-ec::-cc::esp32

#compile.autogen.bin.macosx=${programmer:esptool,root}/tools/macosx/esptool::-bo::${build.path}/${filename}.bin::-bm::${if:${option:FlashMode.build.flash_mode}=ERR,${build.flash_mode},${option:FlashMode.build.flash_mode}}::-bf::${if:${option:FlashFreq.build.flash_freq}=ERR,${build.flash_freq},${option:FlashFreq.build.flash_freq}}::-bz::${option:FlashSize.build.flash_size}::-bs::.text::-bp::4096::-ec::-eo::${build.path}/${filename}.elf::-bs::.irom0.text::-bs::.text::-bs::.data::-bs::.rodata::-bc::-ec::-cc::esp32

icon.48=icons/expressif_48.png
icon.128=icons/expressif_128.png
icon.256=icons/expressif_256.png
icon.32=icons/expressif_32.png
icon.16=icons/expressif_16.png
icon.64=icons/expressif_64.png
icon.22=icons/expressif_22.png

programmer.chip=esp32

core.partition=${onefile:${sketch:root}/partitions.csv,${find:${board:root}::${core:root}/partitions,${build.partitions}.csv}}

compile.autogen.parts=python::${core.root}/gen_esp32part.py::-q::${core.partition}::${build.path}/${filename}.partitions.bin
compile.autogen.parts.windows=${core.root}/gen_esp32part.exe::-q::${core.partition}::${build.path}/${filename}.partitions.bin

compile.autogen.bin.linux=${programmer:esptool-esp32,programmer.interpreter}::${programmer:esptool-esp32,root}/linux/esptool.py::--chip::esp32::elf2image::--flash_mode::${build.flash_mode}::--flash_freq::${build.flash_freq}::-o::${build.path}/${filename}.bin::${build.path}/${filename}.elf
compile.autogen.bin.macos=${programmer:esptool-esp32,root}/macos/esptool::--chip::esp32::elf2image::--flash_mode::${build.flash_mode}::--flash_freq::${build.flash_freq}::-o::${build.path}/${filename}.bin::${build.path}/${filename}.elf
compile.autogen.bin.windows=${programmer:esptool-esp32,root}/windows/esptool.exe::--chip::esp32::elf2image::--flash_mode::${build.flash_mode}::--flash_freq::${build.flash_freq}::-o::${build.path}/${filename}.bin::${build.path}/${filename}.elf


options.UploadSpeed.name=Upload Speed
options.UploadSpeed.default=921600
options.UploadSpeed.4000000.name=4M
options.UploadSpeed.4000000.upload.speed=4000000
options.UploadSpeed.3500000.name=3.5M
options.UploadSpeed.3500000.upload.speed=3500000
options.UploadSpeed.3000000.name=3M
options.UploadSpeed.3000000.upload.speed=3000000
options.UploadSpeed.2500000.name=2.5M
options.UploadSpeed.2500000.upload.speed=2500000
options.UploadSpeed.2000000.name=2M
options.UploadSpeed.2000000.upload.speed=2000000
options.UploadSpeed.1500000.name=1.5M
options.UploadSpeed.1500000.upload.speed=1500000
options.UploadSpeed.1000000.name=1M
options.UploadSpeed.1000000.upload.speed=1000000
options.UploadSpeed.921600.name=921600
options.UploadSpeed.921600.upload.speed=921600
options.UploadSpeed.115200.name=115200
options.UploadSpeed.115200.upload.speed=115200
options.UploadSpeed.256000.name=256000
options.UploadSpeed.256000.upload.speed=256000
options.UploadSpeed.230400.upload.speed=230400
options.UploadSpeed.230400.name=230400
options.UploadSpeed.460800.name=460800
options.UploadSpeed.460800.upload.speed=460800
options.UploadSpeed.512000.name=512000
options.UploadSpeed.512000.upload.speed=512000
upload.speed=${option:UploadSpeed.upload.speed}

options.DebugLevel.name=Debug Level
options.DebugLevel.default=none
options.DebugLevel.none.name=None
options.DebugLevel.none.build.code_debug=0
options.DebugLevel.error.name=Error
options.DebugLevel.error.build.code_debug=1
options.DebugLevel.warn.name=Warn
options.DebugLevel.warn.build.code_debug=2
options.DebugLevel.info.name=Info
options.DebugLevel.info.build.code_debug=3
options.DebugLevel.debug.name=Debug
options.DebugLevel.debug.build.code_debug=4
options.DebugLevel.verbose.name=Verbose
options.DebugLevel.verbose.build.code_debug=5
build.code_debug=${option:DebugLevel.build.code_debug}

build.partitions=${option:PartitionScheme.build.partitions}

options.PartitionScheme.name=Partition Scheme
options.PartitionScheme.default=defaultspiffs
options.PartitionScheme.defaultspiffs.name=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
options.PartitionScheme.defaultspiffs.build.partitions=default
options.PartitionScheme.defaultffat.name=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
options.PartitionScheme.defaultffat.build.partitions=default_ffat
options.PartitionScheme.default_8MB.name=8M Flash (3MB APP/1.5MB FAT)
options.PartitionScheme.default_8MB.build.partitions=default_8MB
options.PartitionScheme.default_8MB.upload.maximum_size=3342336
options.PartitionScheme.minimal.name=Minimal (1.3MB APP/700KB SPIFFS)
options.PartitionScheme.minimal.build.partitions=minimal
options.PartitionScheme.no_ota.name=No OTA (2MB APP/2MB SPIFFS)
options.PartitionScheme.no_ota.build.partitions=no_ota
options.PartitionScheme.no_ota.upload.maximum_size=2097152
options.PartitionScheme.noota_3g.name=No OTA (1MB APP/3MB SPIFFS)
options.PartitionScheme.noota_3g.build.partitions=noota_3g
options.PartitionScheme.noota_3g.upload.maximum_size=1048576
options.PartitionScheme.noota_ffat.name=No OTA (2MB APP/2MB FATFS)
options.PartitionScheme.noota_ffat.build.partitions=noota_ffat
options.PartitionScheme.noota_ffat.upload.maximum_size=2097152
options.PartitionScheme.noota_3gffat.name=No OTA (1MB APP/3MB FATFS)
options.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
options.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
options.PartitionScheme.huge_app.name=Huge APP (3MB No OTA/1MB SPIFFS)
options.PartitionScheme.huge_app.build.partitions=huge_app
options.PartitionScheme.huge_app.upload.maximum_size=3145728
options.PartitionScheme.min_spiffs.name=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
options.PartitionScheme.min_spiffs.build.partitions=min_spiffs
options.PartitionScheme.min_spiffs.upload.maximum_size=1966080
options.PartitionScheme.fatflash.name=16M Flash (2MB APP/12.5MB FAT)
options.PartitionScheme.fatflash.build.partitions=ffat
options.PartitionScheme.fatflash.upload.maximum_size=2097152
options.PartitionScheme.app3M_fat9M_16MB.name=16M Flash (3MB APP/9MB FATFS)
options.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
options.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728



Something very odd:

Something very odd: For some streamlining I had reduced the size of my program by removing some sketches, and suddenly the partitions were back to what I had specified in the partitions.csv file in my sketch folder.

It seemed that this occurred when the size after compilation dropped just below the 1048576 Byte (1MB) mark. Can the sketch size have anything to do with uecide's workings?

Whether Program and Memory sizes are shown or not is still on and off. For a while exactly every 2nd compile gave real numbers, the others zero; after about a dozen such repeats it was back to showing zero only. (The verbose command execution still has the checkmark).

Compiling finished.
Memory usage
• Program size: 990.346 bytes
• Memory size: 290.956 bytes
• Compilation took 5,408 seconds.
Uploading firmware...

Come on! It would be truly

Come on! It would be truly weird if whatever change I make to the program, it compiles and is running, while at the same time uecide is doing strange things, like ignoring its commands (for partitions) and sometimes providing size numbers and sometimes not.

Does uecide have any built in size limits?

No, UECIDE has no built in

No, UECIDE has no built in size limits. It just executes the compiler. The partition thing just looks to see if the file partitions.csv exists in the sketch and uses that in preference to the one selected in the menu.

As for the sizes thing, that just runs the size command in the compiler and parses the output. Maybe that is sometimes giving one format and sometimes another format (maybe something slightly differs that it doesn't like) and it can't parse it with the existing regex.

The partition thing just

The partition thing just looks to see if the file partitions.csv exists in the sketch and uses that in preference to the one selected in the menu.

But that is precisely NOT what it is doing! How can I convince it to follow its orders?

Pages