File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -417,7 +417,12 @@ endif
417
417
do-sdkconfig : $(BUILD ) /esp-idf/config/sdkconfig.h
418
418
QSTR_GLOBAL_REQUIREMENTS += $(BUILD ) /esp-idf/config/sdkconfig.h
419
419
$(BUILD ) /esp-idf/config/sdkconfig.h : boards/$(BOARD ) /sdkconfig boards/$(BOARD ) /mpconfigboard.mk CMakeLists.txt | $(BUILD ) /esp-idf
420
- IDF_PATH=$(IDF_PATH ) cmake -S . -B $(BUILD ) /esp-idf -DSDKCONFIG=$(BUILD ) /esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS=" $( SDKCONFIGS) " -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH ) /tools/cmake/toolchain-$(IDF_TARGET ) .cmake -DIDF_TARGET=$(IDF_TARGET ) -GNinja
420
+ $(STEPECHO ) " LINK $@ "
421
+ $(Q ) env IDF_PATH=$(IDF_PATH ) cmake -S . -B $(BUILD ) /esp-idf -DSDKCONFIG=$(BUILD ) /esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS=" $( SDKCONFIGS) " -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH ) /tools/cmake/toolchain-$(IDF_TARGET ) .cmake -DIDF_TARGET=$(IDF_TARGET ) -GNinja
422
+ $(Q )$(PYTHON ) tools/check-sdkconfig.py \
423
+ CIRCUITPY_DUALBANK=$(CIRCUITPY_DUALBANK ) \
424
+ CIRCUITPY_STORAGE_EXTEND=$(CIRCUITPY_STORAGE_EXTEND ) \
425
+ $@
421
426
422
427
# build a lib
423
428
# Adding -d explain -j 1 -v to the ninja line will output debug info
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+ import sys
3
+
4
+ sdk_config = {}
5
+
6
+ config_h = sys .argv [- 1 ]
7
+ with open (config_h ) as f :
8
+ for row in f :
9
+ if row .startswith ("#define " ):
10
+ _ , k , v = row .strip ().split (None , 2 )
11
+ # ad-hoc handle lines like '#define CONFIG_TCP_MSL CONFIG_LWIP_TCP_MSL'
12
+ v = sdk_config .get (k , v )
13
+ if v [0 ] == '"' :
14
+ v = eval (v ) # Assume it is a simple C string
15
+
16
+ # ad-hoc convert to integer
17
+ try :
18
+ v = int (v )
19
+ except ValueError :
20
+ pass
21
+ sdk_config [k ] = v
22
+
23
+ del sys .argv [- 1 ]
24
+
25
+ circuitpy_config = {}
26
+ for arg in sys .argv [1 :]:
27
+ k , v = arg .split ("=" , 1 )
28
+ circuitpy_config [k ] = int (v )
29
+
30
+ partition_table = sdk_config .get ("CONFIG_PARTITION_TABLE_FILENAME" )
31
+ for var in ("CIRCUITPY_STORAGE_EXTEND" , "CIRCUITPY_DUALBANK" ):
32
+ if circuitpy_config .get (var ):
33
+ with open (partition_table ) as f :
34
+ content = f .read ()
35
+ if not "ota_1" in content :
36
+ raise SystemExit (f"{ var } is incompatible with { partition_table = } (no ota_1 partition)" )
37
+
38
+ # Add more checks here
You can’t perform that action at this time.
0 commit comments