Skip to content

Commit 0054866

Browse files
committed
fixing esp32 build
1 parent d71e67f commit 0054866

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

builder/esp32.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def parse_args(extra_args, lv_cflags, brd):
190190
esp_args, extra_args = esp_argParser.parse_known_args(extra_args)
191191
flash_size = esp_args.flash_size
192192

193-
if board == 'ESP32_GENERIC':
193+
elif board == 'ESP32_GENERIC':
194194
esp_argParser = ArgumentParser(prefix_chars='-')
195195

196196
esp_argParser.add_argument(
@@ -404,6 +404,7 @@ def setup_idf_environ():
404404
result, output = spawn(cmds, env=env, out_to_screen=False)
405405

406406
if result != 0:
407+
print('********* ERROR **********')
407408
print(output)
408409
sys.exit(result)
409410

@@ -509,39 +510,34 @@ def compile(): # NOQA
509510
'CONFIG_PARTITION_TABLE_CUSTOM=y',
510511
]
511512

513+
if flash_size == 2:
514+
base_config.extend([
515+
'CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y',
516+
'CONFIG_PARTITION_TABLE_CUSTOM_FILENAME='
517+
'"partitions-2MiB.csv"'
518+
])
519+
512520
if flash_size == 4:
513521
base_config.extend([
514522
'CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y',
515-
'CONFIG_ESPTOOLPY_FLASHSIZE_8MB=n',
516-
'CONFIG_ESPTOOLPY_FLASHSIZE_16MB=n',
517-
'CONFIG_ESPTOOLPY_FLASHSIZE_32MB=n',
518523
'CONFIG_PARTITION_TABLE_CUSTOM_FILENAME='
519524
'"partitions-4MiB.csv"'
520525
])
521526
elif flash_size == 8:
522527
base_config.extend([
523-
'CONFIG_ESPTOOLPY_FLASHSIZE_4MB=n',
524528
'CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y',
525-
'CONFIG_ESPTOOLPY_FLASHSIZE_16MB=n',
526-
'CONFIG_ESPTOOLPY_FLASHSIZE_32MB=n',
527529
'CONFIG_PARTITION_TABLE_CUSTOM_FILENAME='
528530
'"partitions-8MiB.csv"'
529531
])
530532

531533
elif flash_size == 16:
532534
base_config.extend([
533-
'CONFIG_ESPTOOLPY_FLASHSIZE_4MB=n',
534-
'CONFIG_ESPTOOLPY_FLASHSIZE_8MB=n',
535535
'CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y',
536-
'CONFIG_ESPTOOLPY_FLASHSIZE_32MB=n',
537536
'CONFIG_PARTITION_TABLE_CUSTOM_FILENAME='
538537
'"partitions-16MiB.csv"'
539538
])
540539
if flash_size == 32:
541540
base_config.extend([
542-
'CONFIG_ESPTOOLPY_FLASHSIZE_4MB=n',
543-
'CONFIG_ESPTOOLPY_FLASHSIZE_8MB=n',
544-
'CONFIG_ESPTOOLPY_FLASHSIZE_16MB=n',
545541
'CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y',
546542
'CONFIG_PARTITION_TABLE_CUSTOM_FILENAME='
547543
'"partitions-32MiB.csv"'

0 commit comments

Comments
 (0)