@@ -51,19 +51,19 @@ def get_partition_table_csv(variants_dir):
51
51
52
52
if partitions_name :
53
53
# A custom partitions file is selected
54
- if isfile (join (variant_partitions_dir , partitions_name )):
54
+ if isfile (env . subst ( join (variant_partitions_dir , partitions_name ) )):
55
55
return join (variant_partitions_dir , partitions_name )
56
56
57
57
return abspath (
58
58
join (fwpartitions_dir , partitions_name )
59
- if isfile (join (fwpartitions_dir , partitions_name ))
59
+ if isfile (env . subst ( join (fwpartitions_dir , partitions_name ) ))
60
60
else partitions_name
61
61
)
62
62
63
63
variant_partitions = join (variant_partitions_dir , "partitions.csv" )
64
64
return (
65
65
variant_partitions
66
- if isfile (variant_partitions )
66
+ if isfile (env . subst ( variant_partitions ) )
67
67
else join (fwpartitions_dir , "default.csv" )
68
68
)
69
69
@@ -81,7 +81,7 @@ def get_bootloader_image(variants_dir):
81
81
82
82
return (
83
83
variant_bootloader
84
- if isfile (variant_bootloader )
84
+ if isfile (env . subst ( variant_bootloader ) )
85
85
else generate_bootloader_image (
86
86
join (
87
87
FRAMEWORK_DIR ,
@@ -126,8 +126,8 @@ def add_tinyuf2_extra_image():
126
126
)
127
127
128
128
# Add the UF2 image only if it exists and it's not already added
129
- if not isfile (tinuf2_image ):
130
- print ("Warning! The `%s` UF2 bootloader image doesn't exist" % tinuf2_image )
129
+ if not isfile (env . subst ( tinuf2_image ) ):
130
+ print ("Warning! The `%s` UF2 bootloader image doesn't exist" % env . subst ( tinuf2_image ) )
131
131
return
132
132
133
133
if any (
0 commit comments