Skip to main content
Arduino

Return to Revisions

5 of 7
removed irrelevant text
jsotola
  • 1.5k
  • 2
  • 12
  • 20

ESP32 Partition size and maximum program size #2

re. ESP32 Partition size and maximum program size

Further to the above issue:

The above is a neat little program. However, is there any way I can reference/extract the "app0" "partition->size" for use in an "#if" pre-processor expression?

Ideally I would want to use something like:

#if ((partition->size)<=1310720)
 #error "you must select a larger Partition-Scheme"
#endif

Or alternatively:

#if (PartitionScheme!=MinimalSpiffs)
 #error "you must select the Minimal SPIFFS Partition-Scheme"
#endif

// cf. esp32.menu. PartitionScheme.min_spiffs= Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)

(This is because I have a couple of projects which use 99% of the "Default 4MB with SPIFFS" program-storage-space, and will successfully compile and upload onto my ESP32 Dev Boards, but will cause the ESP32 to get stuck in a crashing boot-loop - I’m guessing the above mentioned "startup-reboot-forever loop". Thus for these projects I would like to add an above "#if" check to ensure I can force the compile to error/fail if the correct (larger) PartitionScheme is not selected.)

Rob
  • 11
  • 2

AltStyle によって変換されたページ (->オリジナル) /