Skip to content

Commit 7f1be12

Browse files
committed
Tidy up and use pico_use_partition_firmware function
1 parent ca31476 commit 7f1be12

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ function(add_subdirectory_exclude_platforms NAME)
4242
add_subdirectory(${NAME})
4343
endfunction()
4444

45+
# Set signing file for entire project
46+
set_property(GLOBAL PROPERTY PICOTOOL_SIGFILE "${CMAKE_CURRENT_LIST_DIR}/sample_keys/private.pem")
47+
4548
# Add blink example
4649
add_subdirectory_exclude_platforms(blink)
4750
add_subdirectory_exclude_platforms(blink_simple)

pico_w/wifi/ota_update/CMakeLists.txt

+6-8
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ target_link_libraries(picow_ota_update_background
1717
boot_uf2_headers
1818
)
1919

20+
pico_use_partition_firmware(picow_ota_update_background)
21+
2022
pico_hash_binary(picow_ota_update_background)
21-
get_target_property(hasSigfile picow_ota_update_background PICOTOOL_SIGFILE)
22-
if (hasSigfile)
23-
pico_sign_binary(picow_ota_update_background)
24-
endif()
23+
pico_sign_binary(picow_ota_update_background)
2524
# pico_set_binary_type(picow_ota_update_background no_flash)
2625
# pico_package_uf2_output(picow_ota_update_background 0x10000000)
2726

@@ -46,11 +45,10 @@ target_link_libraries(picow_ota_update_poll
4645
boot_uf2_headers
4746
)
4847

48+
pico_use_partition_firmware(picow_ota_update_poll)
49+
4950
pico_hash_binary(picow_ota_update_poll)
50-
get_target_property(hasSigfile picow_ota_update_poll PICOTOOL_SIGFILE)
51-
if (hasSigfile)
52-
pico_sign_binary(picow_ota_update_poll)
53-
endif()
51+
pico_sign_binary(picow_ota_update_poll)
5452
# pico_set_binary_type(picow_ota_update_background no_flash)
5553
# pico_package_uf2_output(picow_ota_update_background 0x10000000)
5654

pico_w/wifi/ota_update/main.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{
1313
"name": "Main A",
1414
"id": 0,
15-
"size": "500K",
15+
"size": "1748K",
1616
"families": ["rp2350-arm-s", "rp2350-riscv"],
1717
"permissions": {
1818
"secure": "rw",
@@ -23,7 +23,7 @@
2323
{
2424
"name": "Main B",
2525
"id": 0,
26-
"size": "500K",
26+
"size": "1748K",
2727
"families": ["rp2350-arm-s", "rp2350-riscv"],
2828
"permissions": {
2929
"secure": "rw",
File renamed without changes.

0 commit comments

Comments
 (0)