@@ -71,12 +71,6 @@ define_property(TARGET
71
71
BRIEF_DOCS "Extra arguments to pass to uf2 conversion"
72
72
FULL_DOCS "Extra arguments to pass to uf2 conversion"
73
73
)
74
- define_property (TARGET
75
- PROPERTY PICOTOOL_PROCESSING_DONE
76
- INHERITED
77
- BRIEF_DOCS "Set once post-processing has been completed in CMake"
78
- FULL_DOCS "Set once post-processing has been completed in CMake"
79
- )
80
74
81
75
# Check pioasm is installed, or build it if not installed
82
76
function (pico_init_pioasm)
@@ -152,8 +146,8 @@ function(pico_init_picotool)
152
146
endif ()
153
147
endfunction ()
154
148
155
- function (picotool_check_not_done TARGET )
156
- get_target_property (done ${TARGET} PICOTOOL_PROCESSING_DONE )
149
+ function (picotool_check_configurable TARGET )
150
+ get_target_property (done ${TARGET} PICOTOOL_PROCESSING_CONFIGURED )
157
151
if (done)
158
152
message (FATAL_ERROR "All picotool post-processing functions for \" ${TARGET} \" must come before pico_add_extra_outputs(${TARGET} )" )
159
153
endif ()
@@ -211,7 +205,7 @@ endfunction()
211
205
# dropping, and it will be copied to SRAM by the bootrom before execution.
212
206
# This sets PICOTOOL_UF2_PACKAGE_ADDR to PACKADDR.
213
207
function (pico_package_uf2_output TARGET PACKADDR)
214
- picotool_check_not_done (${TARGET} )
208
+ picotool_check_configurable (${TARGET} )
215
209
set_target_properties (${TARGET} PROPERTIES
216
210
PICOTOOL_UF2_PACKAGE_ADDR ${PACKADDR}
217
211
)
@@ -221,7 +215,7 @@ endfunction()
221
215
# Output the public key hash and other necessary rows to an otp JSON file.
222
216
# This sets PICOTOOL_OTP_FILE to OTPFILE.
223
217
function (pico_set_otp_key_output_file TARGET OTPFILE)
224
- picotool_check_not_done (${TARGET} )
218
+ picotool_check_configurable (${TARGET} )
225
219
set_target_properties (${TARGET} PROPERTIES
226
220
PICOTOOL_OTP_FILE ${OTPFILE}
227
221
)
@@ -232,7 +226,7 @@ endfunction()
232
226
# before loading the binary. This appends the `--clear` argument
233
227
# to PICOTOOL_EXTRA_PROCESS_ARGS.
234
228
function (pico_load_map_clear_sram TARGET )
235
- picotool_check_not_done (${TARGET} )
229
+ picotool_check_configurable (${TARGET} )
236
230
# get and set, to inherit list
237
231
get_target_property (extra_args ${TARGET} PICOTOOL_EXTRA_PROCESS_ARGS)
238
232
if (extra_args)
@@ -250,7 +244,7 @@ endfunction()
250
244
# to PICOTOOL_EXTRA_PROCESS_ARGS if setting the rollback version, or set as compile
251
245
# definitions if only setting the major/minor versions.
252
246
function (pico_set_binary_version TARGET )
253
- picotool_check_not_done (${TARGET} )
247
+ picotool_check_configurable (${TARGET} )
254
248
set (oneValueArgs MAJOR MINOR ROLLBACK)
255
249
set (multiValueArgs ROWS)
256
250
cmake_parse_arguments (PARSE_ARGV 1 SV "" "${oneValueArgs} " "${multiValueArgs} " )
@@ -300,7 +294,7 @@ endfunction()
300
294
# Set the UF2 family to use when creating the UF2.
301
295
# This sets PICOTOOL_UF2_FAMILY to FAMILY.
302
296
function (pico_set_uf2_family TARGET FAMILY)
303
- picotool_check_not_done (${TARGET} )
297
+ picotool_check_configurable (${TARGET} )
304
298
set_target_properties (${TARGET} PROPERTIES
305
299
PICOTOOL_UF2_FAMILY ${FAMILY}
306
300
)
@@ -313,7 +307,7 @@ endfunction()
313
307
# specify a common SIGFILE for multiple targets, the SIGFILE property can be
314
308
# set for a given scope, and then the SIGFILE argument is optional.
315
309
function (pico_sign_binary TARGET )
316
- picotool_check_not_done (${TARGET} )
310
+ picotool_check_configurable (${TARGET} )
317
311
# Enforce signing through target properties
318
312
set_target_properties (${TARGET} PROPERTIES
319
313
PICOTOOL_SIGN_OUTPUT true
@@ -339,7 +333,7 @@ endfunction()
339
333
# pico_hash_binary(TARGET)
340
334
# Hash the target binary. This sets PICOTOOL_HASH_OUTPUT to true.
341
335
function (pico_hash_binary TARGET )
342
- picotool_check_not_done (${TARGET} )
336
+ picotool_check_configurable (${TARGET} )
343
337
# Enforce hashing through target properties
344
338
set_target_properties (${TARGET} PROPERTIES
345
339
PICOTOOL_HASH_OUTPUT true
@@ -350,7 +344,7 @@ endfunction()
350
344
# Create the specified partition table from JSON, and embed it in the
351
345
# block loop. This sets PICOTOOL_EMBED_PT to PTFILE.
352
346
function (pico_embed_pt_in_binary TARGET PTFILE)
353
- picotool_check_not_done (${TARGET} )
347
+ picotool_check_configurable (${TARGET} )
354
348
set_target_properties (${TARGET} PROPERTIES
355
349
PICOTOOL_EMBED_PT ${PTFILE}
356
350
)
@@ -362,7 +356,7 @@ endfunction()
362
356
# This sets PICOTOOL_AESFILE to AESFILE, and PICOTOOL_ENC_SIGFILE to SIGFILE
363
357
# if present, else PICOTOOL_SIGFILE.
364
358
function (pico_encrypt_binary TARGET AESFILE)
365
- picotool_check_not_done (${TARGET} )
359
+ picotool_check_configurable (${TARGET} )
366
360
set_target_properties (${TARGET} PROPERTIES
367
361
PICOTOOL_AESFILE ${AESFILE}
368
362
)
@@ -445,7 +439,7 @@ endfunction()
445
439
# all required properties have been set
446
440
function (picotool_postprocess_binary TARGET )
447
441
set_target_properties (${TARGET} PROPERTIES
448
- PICOTOOL_PROCESSING_DONE true
442
+ PICOTOOL_PROCESSING_CONFIGURED true
449
443
)
450
444
# Read target properties
451
445
get_target_property (picotool_sign_output ${TARGET} PICOTOOL_SIGN_OUTPUT)
0 commit comments