File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1582,6 +1582,22 @@ def _skip_prj_source_files(node):
1582
1582
if sdk_config .get ("MBEDTLS_CERTIFICATE_BUNDLE" , False ):
1583
1583
generate_mbedtls_bundle (sdk_config )
1584
1584
1585
+ #
1586
+ # Check if flash size is set correctly in the IDF configuration file
1587
+ #
1588
+
1589
+ board_flash_size = board .get ("upload.flash_size" , "4MB" )
1590
+ idf_flash_size = sdk_config .get ("ESPTOOLPY_FLASHSIZE" , "4MB" )
1591
+ if board_flash_size != idf_flash_size :
1592
+ print (
1593
+ "Warning! Flash memory size mismatch detected. Expected %s, found %s!"
1594
+ % (board_flash_size , idf_flash_size )
1595
+ )
1596
+ print (
1597
+ "Please select a proper value in your `sdkconfig.defaults` "
1598
+ "or via the `menuconfig` target!"
1599
+ )
1600
+
1585
1601
#
1586
1602
# To embed firmware checksum a special argument for esptool.py is required
1587
1603
#
You can’t perform that action at this time.
0 commit comments