@@ -411,13 +411,16 @@ def find_framework_service_files(search_path, sdk_config):
411411 result ["kconfig_files" ] = list ()
412412 result ["kconfig_build_files" ] = list ()
413413 for d in listdir (search_path ):
414- for f in listdir (join (search_path , d )):
414+ path = join (search_path , d )
415+ if not isdir (path ):
416+ continue
417+ for f in listdir (path ):
415418 if f == "linker.lf" :
416- result ["lf_files" ].append (join (search_path , d , f ))
419+ result ["lf_files" ].append (join (path , f ))
417420 elif f == "Kconfig.projbuild" :
418- result ["kconfig_build_files" ].append (join (search_path , d , f ))
421+ result ["kconfig_build_files" ].append (join (path , f ))
419422 elif f == "Kconfig" :
420- result ["kconfig_files" ].append (join (search_path , d , f ))
423+ result ["kconfig_files" ].append (join (path , f ))
421424
422425 result ["lf_files" ].extend ([
423426 join (FRAMEWORK_DIR , "components" , "esp32" , "ld" , "esp32_fragments.lf" ),
@@ -768,10 +771,10 @@ def find_default_component(target_configs):
768771# Generate final linker script
769772#
770773
771- if not env . BoardConfig () .get ("build.ldscript" , "" ):
774+ if not board .get ("build.ldscript" , "" ):
772775 linker_script = env .Command (
773776 join ("$BUILD_DIR" , "esp32_out.ld" ),
774- env . BoardConfig () .get (
777+ board .get (
775778 "build.esp-idf.ldscript" ,
776779 join (FRAMEWORK_DIR , "components" , "esp32" , "ld" , "esp32.ld" ),
777780 ),
@@ -789,7 +792,7 @@ def find_default_component(target_configs):
789792#
790793
791794fwpartitions_dir = join (FRAMEWORK_DIR , "components" , "partition_table" )
792- partitions_csv = env . BoardConfig () .get ("build.partitions" , "partitions_singleapp.csv" )
795+ partitions_csv = board .get ("build.partitions" , "partitions_singleapp.csv" )
793796env .Replace (
794797 PARTITIONS_TABLE_CSV = abspath (
795798 join (fwpartitions_dir , partitions_csv )
@@ -805,7 +808,7 @@ def find_default_component(target_configs):
805808 '"$PYTHONEXE" "%s" -q --flash-size "%s" $SOURCE $TARGET'
806809 % (
807810 join (FRAMEWORK_DIR , "components" , "partition_table" , "gen_esp32part.py" ),
808- env . BoardConfig () .get ("upload.flash_size" , "detect" ),
811+ board .get ("upload.flash_size" , "detect" ),
809812 ),
810813 "Generating partitions $TARGET" ,
811814 ),
@@ -853,9 +856,8 @@ def find_default_component(target_configs):
853856project_codemodel = get_cmake_code_model (
854857 env .subst ("$PROJECT_DIR" ),
855858 BUILD_DIR ,
856- ["-DEXTRA_COMPONENT_DIRS:PATH=" + ";" .join (extra_components )]
857- if extra_components
858- else [],
859+ ["-DEXTRA_COMPONENT_DIRS:PATH=" + ";" .join (extra_components )] +
860+ click .parser .split_arg_string (board .get ("build.cmake_extra_args" , "" ))
859861)
860862
861863if not project_codemodel :
0 commit comments