minor cleanup (#3021)

* minor cleanup

* Update src/rp2_common/pico_double/include/pico/double.h

Co-authored-by: will-v-pi <108662275+will-v-pi@users.noreply.github.com>

* fixes from review

---------

Co-authored-by: will-v-pi <108662275+will-v-pi@users.noreply.github.com>
diff --git a/cmake/preload/toolchains/pico_arm_cortex_m0plus_clang.cmake b/cmake/preload/toolchains/pico_arm_cortex_m0plus_clang.cmake
index 681a6c7..464ce99 100644
--- a/cmake/preload/toolchains/pico_arm_cortex_m0plus_clang.cmake
+++ b/cmake/preload/toolchains/pico_arm_cortex_m0plus_clang.cmake
@@ -1,6 +1,6 @@
 set(CMAKE_SYSTEM_PROCESSOR cortex-m0plus)
 
-# these are all the directories under LLVM embedded toolchain for ARM (newlib or pibolibc) and under llvm_libc
+# these are all the directories under LLVM embedded toolchain for ARM (newlib or picolibc) and under llvm_libc
 set(PICO_CLANG_RUNTIMES armv6m_soft_nofp armv6m_soft_nofp_size armv6m-unknown-none-eabi)
 
 set(PICO_COMMON_LANG_FLAGS "--target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m")
diff --git a/cmake/preload/toolchains/pico_arm_cortex_m33_clang.cmake b/cmake/preload/toolchains/pico_arm_cortex_m33_clang.cmake
index 21d1bb5..1727c43 100644
--- a/cmake/preload/toolchains/pico_arm_cortex_m33_clang.cmake
+++ b/cmake/preload/toolchains/pico_arm_cortex_m33_clang.cmake
@@ -7,11 +7,11 @@
 if (PICO_HARD_FLOAT_ABI)
     set(PICO_COMMON_LANG_FLAGS "${PICO_COMMON_LANG_FLAGS} -mfloat-abi=hard")
     # todo - doesn't seem to be a hard_fp variant for google atm?
-    # these are all the directories under LLVM embedded toolchain for ARM (newlib or pibolibc)
+    # these are all the directories under LLVM embedded toolchain for ARM (newlib or picolibc)
     set(PICO_CLANG_RUNTIMES armv8m.main_hard_fp armv8m.main_hard_fp_unaligned armv8m.main_hard_fp_unaligned_size)
 else()
     set(PICO_COMMON_LANG_FLAGS "${PICO_COMMON_LANG_FLAGS} -mfloat-abi=softfp")
-    # these are all the directories under LLVM embedded toolchain for ARM (newlib or pibolibc) and under llvm_libc
+    # these are all the directories under LLVM embedded toolchain for ARM (newlib or picolibc) and under llvm_libc
     set(PICO_CLANG_RUNTIMES armv8m.main_soft_nofp armv8m.main_soft_nofp_unaligned armv8m.main_soft_nofp_unaligned_size armv8m.main-unknown-none-eabi)
 endif()
 
diff --git a/src/rp2350/pico_platform/include/pico/asm_helper.S b/src/rp2350/pico_platform/include/pico/asm_helper.S
index 0fe0620..c163743 100644
--- a/src/rp2350/pico_platform/include/pico/asm_helper.S
+++ b/src/rp2350/pico_platform/include/pico/asm_helper.S
@@ -76,5 +76,5 @@
 
 // backwards compatibility
 .macro __pre_init func, priority_string1
-__pre_init_with_offset func, 0, priority_string1
+__pre_init_with_offset \func, 0, \priority_string1
 .endm
diff --git a/src/rp2_common/hardware_sync_spin_lock/sync_spin_lock.c b/src/rp2_common/hardware_sync_spin_lock/sync_spin_lock.c
index 82ac8b9..1537407 100644
--- a/src/rp2_common/hardware_sync_spin_lock/sync_spin_lock.c
+++ b/src/rp2_common/hardware_sync_spin_lock/sync_spin_lock.c
@@ -23,7 +23,7 @@
 
 #if __ARM_ARCH_8M_MAIN__ && !PICO_SW_SPIN_LOCKS_NO_EXTEXCLALL
 #include "pico/runtime_init.h"
-#include "hardware/structs/m33.h"
+#include "pico/platform/cpu_regs.h"
 
 static void spinlock_set_extexclall(void) {
     // Force use of global exclusive monitor for all exclusive load/stores:
@@ -34,7 +34,7 @@
     // Shareable regions.
     //
     // Setting PICO_SW_SPIN_LOCKS_NO_EXTEXCLALL == 1 will disable this code
-    m33_hw->actlr |= M33_ACTLR_EXTEXCLALL_BITS;
+    arm_cpu_hw->actlr |= ARM_CPU_PREFIXED(ACTLR_EXTEXCLALL_BITS);
 }
 
 // PICO_RUNTIME_INIT_SPIN_LOCKS_RESET is fine as resetting them does not require EXTEXCLALL
diff --git a/src/rp2_common/pico_crt0/crt0.S b/src/rp2_common/pico_crt0/crt0.S
index ebeb742..7fda00c 100644
--- a/src/rp2_common/pico_crt0/crt0.S
+++ b/src/rp2_common/pico_crt0/crt0.S
@@ -408,7 +408,7 @@
 
 #if HAS_REDUNDANCY_COPROCESSOR
     // just enable the RCP which is fine if it already was (we assume no other co-processors are enabled at this point to save space)
-    ldr r0, = PPB_BASE + M33_CPACR_OFFSET
+    ldr r0, = PPB_BASE + ARM_CPU_PREFIXED(CPACR_OFFSET)
     movs r1, #ARM_CPU_PREFIXED(CPACR_CP7_BITS)
     str r1, [r0]
     // only initialize canary seeds if they haven't been (as to do so twice is a fault)
diff --git a/src/rp2_common/pico_double/include/pico/double.h b/src/rp2_common/pico_double/include/pico/double.h
index 3868f14..185428c 100644
--- a/src/rp2_common/pico_double/include/pico/double.h
+++ b/src/rp2_common/pico_double/include/pico/double.h
@@ -230,30 +230,30 @@
 #if PICO_DOUBLE_HAS_DOUBLE_TO_INT32_Z_CONVERSIONS
 #if !__PICO_DOUBLE_ARM_OPTIMIZED
     // for non Arm-optimized we may as well provide the function and let the compiler handle it
-    static inline int32_t double2int_z(double f) { return (int32_t)f; }
-    static inline int32_t double2uint_z(double f) { return (uint32_t)f; }
+    static inline int32_t double2int_z(double d) { return (int32_t)d; }
+    static inline int32_t double2uint_z(double d) { return (uint32_t)d; }
 #else
     //! \brief Convert a double to a signed 32-bit integer, rounding towards zero.
     //! On Arm this conversion is saturating (to INT32_MAX/INT32_MIN) for out of range input except when using `pico_double_compiler`
-    int32_t double2int_z(double f);
+    int32_t double2int_z(double d);
     //! \brief Convert a double to an unsigned 32-bit integer, rounding towards zero
     //! On Arm this conversion is saturating (to UINT32_MAX/UINT32_MIN) for out of range input except when using `pico_double_compiler`
-    int32_t double2uint_z(double f);
+    uint32_t double2uint_z(double d);
 #endif
 #endif
 
 #if PICO_DOUBLE_HAS_DOUBLE_TO_INT64_Z_CONVERSIONS
 #if !__PICO_DOUBLE_ARM_OPTIMIZED
     // for non Arm-optimized we may as well provide the function and let the compiler handle it
-    static inline int64_t double2int64_z(double f) { return (int64_t)f; }
-    static inline int64_t double2uint64_z(double f) { return (uint64_t)f; }
+    static inline int64_t double2int64_z(double d) { return (int64_t)d; }
+    static inline uint64_t double2uint64_z(double d) { return (uint64_t)d; }
 #else
     //! \brief Convert a double to a signed 64-bit integer, rounding towards zero.
     //! On Arm this conversion is saturating (to INT64_MAX/INT64_MIN) for out of range input except when using `pico_double_compiler`
-    int64_t double2int64_z(double f);
+    int64_t double2int64_z(double d);
     //! \brief Convert a double to an unsigned 64-bit integer, rounding towards zero.
     //! On Arm this conversion is saturating (to UINT64_MAX/UINT64_MIN) for out of range input except when using `pico_double_compiler`
-    int64_t double2uint64_z(double f);
+    uint64_t double2uint64_z(double d);
 #endif
 #endif
 
@@ -278,19 +278,19 @@
 #if PICO_DOUBLE_HAS_DOUBLE_TO_FIX32_Z_CONVERSIONS
 //! \brief Convert a double to a signed 32-bit fixed-point integer with the given number of fractional bits, rounding towards zero.
 //! On Arm this conversion is saturating (to INT32_MAX/INT32_MIN) for out of range input except when using `pico_double_compiler`
-int32_t double2fix_z(double f, int e);
+int32_t double2fix_z(double d, int e);
 //! \brief Convert a double to an unsigned 32-bit fixed-point integer with the given number of fractional bits, rounding towards zero.
 //! This conversion is saturating (to UINT32_MAX/UINT32_MIN) for out of range input
-uint32_t double2ufix_z(double f, int e);
+uint32_t double2ufix_z(double d, int e);
 #endif
 
 #if PICO_DOUBLE_HAS_DOUBLE_TO_FIX64_Z_CONVERSIONS
 //! \brief Convert a double to a signed 64-bit fixed-point integer with the given number of fractional bits, rounding towards zero.
 //! On Arm this conversion is saturating (to INT64_MAX/INT64_MIN) for out of range input except when using `pico_double_compiler`
-int64_t double2fix64_z(double f, int e);
+int64_t double2fix64_z(double d, int e);
 //! \brief Convert a double to an unsigned 64-bit fixed-point integer with the given number of fractional bits, rounding towards zero.
 //! This conversion is saturating (to UINT64_MAX/UINT64_MIN) for out of range input
-uint64_t double2ufix64_z(double f, int e);
+uint64_t double2ufix64_z(double d, int e);
 #endif
 
 // These methods round towards -Infinity - which IS NOT the C way for negative numbers;
@@ -298,37 +298,37 @@
 #if PICO_DOUBLE_HAS_DOUBLE_TO_INT32_M_CONVERSIONS
 //! \brief Convert a double to a signed 32-bit integer, rounding towards -Infinity.
 //! This conversion is saturating (to INT32_MAX/INT32_MIN) for out of range input
-int32_t double2int(double f);
+int32_t double2int(double d);
 //! \brief Convert a double to an unsigned 32-bit integer, rounding towards -Infinity.
 //! This conversion is saturating (to UINT32_MAX/UINT32_MIN) for out of range input
-uint32_t double2uint(double f);
+uint32_t double2uint(double d);
 #endif
 
 #if PICO_DOUBLE_HAS_DOUBLE_TO_INT64_M_CONVERSIONS
 //! \brief Convert a double to a signed 64-bit integer, rounding towards -Infinity.
 //! This conversion is saturating (to INT64_MAX/INT64_MIN) for out of range input
-int64_t double2int64(double f);
+int64_t double2int64(double d);
 //! \brief Convert a double to an usigned 64-bit integer, rounding towards -Infinity.
 //! This conversion is saturating (to UINT64_MAX/UINT64_MIN) for out of range input
-uint64_t double2uint64(double f);
+uint64_t double2uint64(double d);
 #endif
 
 #if PICO_DOUBLE_HAS_DOUBLE_TO_FIX32_M_CONVERSIONS
 //! \brief Convert a double to a signed 32-bit fixed-point integer with the given number of fractional bits, rounding towards -Infinity.
 //! This conversion is saturating (to INT32_MAX/INT32_MIN) for out of range input
-int32_t double2fix(double f, int e);
+int32_t double2fix(double d, int e);
 //! \brief Convert a double to an unsigned 32-bit fixed-point integer with the given number of fractional bits, rounding towards -Infinity.
 //! This conversion is saturating (to UINT32_MAX/UINT32_MIN) for out of range input
-uint32_t double2ufix(double f, int e);
+uint32_t double2ufix(double d, int e);
 #endif
 
 #if PICO_DOUBLE_HAS_DOUBLE_TO_FIX64_M_CONVERSIONS
 //! \brief Convert a double to a signed 64-bit fixed-point integer with the given number of fractional bits, rounding towards -Infinity.
 //! This conversion is saturating (to INT64_MAX/INT64_MIN) for out of range input
-int64_t double2fix64(double f, int e);
+int64_t double2fix64(double d, int e);
 //! \brief Convert a double to an unsigned 64-bit fixed-point integer with the given number of fractional bits, rounding towards -Infinity.
 //! This conversion is saturating (to UINT64_MAX/UINT64_MIN) for out of range input
-uint64_t double2ufix64(double f, int e);
+uint64_t double2ufix64(double d, int e);
 #endif
 
     // exp10 doesn't always appear in math.h but is present on all our platforms even for LIB_PICO_DOUBLE_COMPILER
@@ -350,8 +350,8 @@
 
 #if PICO_DOUBLE_HAS_POWINT
 #if !__PICO_DOUBLE_ARM_OPTIMIZED && __has_builtin(__builtin_powi)
-    static __force_inline double powint(double f, int32_t p) {
-        return __builtin_powi(f, p);
+    static __force_inline double powint(double d, int32_t p) {
+        return __builtin_powi(d, p);
     }
 #else
     //! Raise a floating point number to an integer power
@@ -366,7 +366,7 @@
 
 #if PICO_DOUBLE_HAS_SQRT_FAST
 //! Perform a fast floating point square-root with reduced accuracy
-double sqrt_fast(double f);
+double sqrt_fast(double d);
 #endif
 
 #if PICO_DOUBLE_HAS_FMA_FAST
diff --git a/src/rp2_common/pico_flash/CMakeLists.txt b/src/rp2_common/pico_flash/CMakeLists.txt
index d8e7db1..2dce150 100644
--- a/src/rp2_common/pico_flash/CMakeLists.txt
+++ b/src/rp2_common/pico_flash/CMakeLists.txt
@@ -6,7 +6,9 @@
 
 target_include_directories(pico_flash_headers SYSTEM INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
 
-# just include multicore headers, as we don't want to pull in the lib if it isn't pulled in already
-target_link_libraries(pico_flash INTERFACE pico_multicore_headers)
+if (TARGET pico_multicore_headers)
+    # just include multicore headers, as we don't want to pull in the lib if it isn't pulled in already
+    target_link_libraries(pico_flash INTERFACE pico_multicore_headers)
+endif()
 
 pico_mirrored_target_link_libraries(pico_flash INTERFACE pico_time hardware_sync)
diff --git a/src/rp2_common/pico_runtime_init/runtime_init.c b/src/rp2_common/pico_runtime_init/runtime_init.c
index ca55065..3526e3f 100644
--- a/src/rp2_common/pico_runtime_init/runtime_init.c
+++ b/src/rp2_common/pico_runtime_init/runtime_init.c
@@ -109,18 +109,18 @@
 
 #if !PICO_RUNTIME_NO_INIT_PER_CORE_ENABLE_COPROCESSORS
 #include "hardware/gpio.h" // PICO_USE_GPIO_COPROCESSOR is defined here
-#include "hardware/structs/m33.h"
+#include "pico/platform/cpu_regs.h"
 // ----------------------------------------------------
 // 00200 PICO_RUNTIME_INIT_PER_CORE_ENABLE_COPROCESSORS
 // ----------------------------------------------------
 void __weak runtime_init_per_core_enable_coprocessors(void) {
     // VFP copro (float)
-    uint32_t cpacr = M33_CPACR_CP10_BITS;
+    uint32_t cpacr = ARM_CPU_PREFIXED(CPACR_CP10_BITS);
 #if HAS_DOUBLE_COPROCESSOR
-    cpacr |= M33_CPACR_CP4_BITS;
+    cpacr |= ARM_CPU_PREFIXED(CPACR_CP4_BITS);
 #endif
 #if PICO_USE_GPIO_COPROCESSOR
-    cpacr |= M33_CPACR_CP0_BITS;
+    cpacr |= ARM_CPU_PREFIXED(CPACR_CP0_BITS);
 #endif
     arm_cpu_hw->cpacr |= cpacr;
 #if HAS_DOUBLE_COPROCESSOR
diff --git a/test/kitchen_sink/kitchen_sink.c b/test/kitchen_sink/kitchen_sink.c
index 398c84a..905ebc8 100644
--- a/test/kitchen_sink/kitchen_sink.c
+++ b/test/kitchen_sink/kitchen_sink.c
@@ -73,7 +73,7 @@
     #endif
     #else
     // Unknown platform, just try 0
-    uint8_t cs_gpios[] = {0}
+    uint8_t cs_gpios[] = {0};
     #endif
     psram_detect_cs_and_size(cs_gpios, count_of(cs_gpios));
 }
@@ -82,12 +82,14 @@
 #endif
 
 void __noinline spiggle(void) {
+#if NUM_DMA_CHANNELS > 1
     dma_channel_config c = dma_channel_get_default_config(1);
     channel_config_set_bswap(&c, true);
     channel_config_set_transfer_data_size(&c, DMA_SIZE_16);
     channel_config_set_ring(&c, true, 13);
     dma_channel_set_config(1, &c, false);
     dma_channel_transfer_from_buffer_now(1, foo, 23);
+#endif
 }
 
 __force_inline int something_inlined(int x) {
diff --git a/test/pico_low_power_test/CMakeLists.txt b/test/pico_low_power_test/CMakeLists.txt
index 726e206..b2f28b2 100644
--- a/test/pico_low_power_test/CMakeLists.txt
+++ b/test/pico_low_power_test/CMakeLists.txt
@@ -1,166 +1,158 @@
-add_library(low_power_test_common INTERFACE)
-target_link_libraries(low_power_test_common INTERFACE pico_stdlib pico_low_power pico_status_led)
-target_include_directories(low_power_test_common INTERFACE ${CMAKE_CURRENT_LIST_DIR})
+if (TARGET pico_low_power)
+        add_library(low_power_test_common INTERFACE)
+        target_link_libraries(low_power_test_common INTERFACE pico_stdlib pico_low_power pico_status_led)
+        target_include_directories(low_power_test_common INTERFACE ${CMAKE_CURRENT_LIST_DIR})
 
-add_executable(low_power_test_timers
-        low_power_test_timers.c
+        add_executable(low_power_test_timers
+                low_power_test_timers.c
         )
-target_link_libraries(low_power_test_timers low_power_test_common)
-set_target_properties(low_power_test_timers PROPERTIES PICO_TEST_TIMEOUT 35)
-set_target_properties(low_power_test_timers PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-set_target_properties(low_power_test_timers PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-# create map/bin/hex file etc.
-pico_add_extra_outputs(low_power_test_timers)
+        target_link_libraries(low_power_test_timers low_power_test_common)
+        set_target_properties(low_power_test_timers PROPERTIES PICO_TEST_TIMEOUT 35)
+        set_target_properties(low_power_test_timers PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+        set_target_properties(low_power_test_timers PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+        # create map/bin/hex file etc.
+        pico_add_extra_outputs(low_power_test_timers)
 
-
-add_executable(low_power_test_timers_usb
-        low_power_test_timers.c
+        add_executable(low_power_test_timers_usb
+                low_power_test_timers.c
         )
-target_link_libraries(low_power_test_timers_usb low_power_test_common)
-pico_enable_stdio_usb(low_power_test_timers_usb 1)
-set_target_properties(low_power_test_timers_usb PROPERTIES PICO_TEST_TIMEOUT 35)
-set_target_properties(low_power_test_timers_usb PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-set_target_properties(low_power_test_timers_usb PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-# create map/bin/hex file etc.
-pico_add_extra_outputs(low_power_test_timers_usb)
+        target_link_libraries(low_power_test_timers_usb low_power_test_common)
+        pico_enable_stdio_usb(low_power_test_timers_usb 1)
+        set_target_properties(low_power_test_timers_usb PROPERTIES PICO_TEST_TIMEOUT 35)
+        set_target_properties(low_power_test_timers_usb PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+        set_target_properties(low_power_test_timers_usb PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+        # create map/bin/hex file etc.
+        pico_add_extra_outputs(low_power_test_timers_usb)
 
-
-if (NOT PICO_RP2040)
-        if (NOT PICO_RISCV)
-                add_executable(low_power_test_timers_encrypted
-                        low_power_test_timers.c
+        if (NOT PICO_RP2040)
+                if (NOT PICO_RISCV)
+                        add_executable(low_power_test_timers_encrypted
+                                low_power_test_timers.c
                         )
-                target_link_libraries(low_power_test_timers_encrypted low_power_test_common)
-                pico_set_binary_type(low_power_test_timers_encrypted no_flash)
-                pico_package_uf2_output(low_power_test_timers_encrypted)
-                pico_sign_binary(low_power_test_timers_encrypted ${PICO_SDK_PATH}/tools/example_keys/private.pem)
-                pico_encrypt_binary(low_power_test_timers_encrypted ${PICO_SDK_PATH}/tools/example_keys/privateaes.bin ${PICO_SDK_PATH}/tools/example_keys/ivsalt.bin EMBED NO_CLEAR)
-                set_target_properties(low_power_test_timers_encrypted PROPERTIES PICO_TEST_TIMEOUT 35)
-                set_target_properties(low_power_test_timers_encrypted PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-                set_target_properties(low_power_test_timers_encrypted PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-                # create map/bin/hex file etc.
-                pico_add_extra_outputs(low_power_test_timers_encrypted)
+                        target_link_libraries(low_power_test_timers_encrypted low_power_test_common)
+                        pico_set_binary_type(low_power_test_timers_encrypted no_flash)
+                        pico_package_uf2_output(low_power_test_timers_encrypted)
+                        pico_sign_binary(low_power_test_timers_encrypted ${PICO_SDK_PATH}/tools/example_keys/private.pem)
+                        pico_encrypt_binary(low_power_test_timers_encrypted ${PICO_SDK_PATH}/tools/example_keys/privateaes.bin ${PICO_SDK_PATH}/tools/example_keys/ivsalt.bin EMBED NO_CLEAR)
+                        set_target_properties(low_power_test_timers_encrypted PROPERTIES PICO_TEST_TIMEOUT 35)
+                        set_target_properties(low_power_test_timers_encrypted PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+                        set_target_properties(low_power_test_timers_encrypted PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+                        # create map/bin/hex file etc.
+                        pico_add_extra_outputs(low_power_test_timers_encrypted)
 
-                add_executable(low_power_test_timers_encrypted_xip_sram
+                        add_executable(low_power_test_timers_encrypted_xip_sram
+                                low_power_test_timers.c
+                                )
+                        target_link_libraries(low_power_test_timers_encrypted_xip_sram low_power_test_common)
+                        pico_set_binary_type(low_power_test_timers_encrypted_xip_sram no_flash)
+                        pico_package_uf2_output(low_power_test_timers_encrypted_xip_sram)
+                        pico_sign_binary(low_power_test_timers_encrypted_xip_sram ${PICO_SDK_PATH}/tools/example_keys/private.pem)
+                        # Encrypted binaries don't clear xip_sram, so NO_CLEAR can be omitted when persistent data is in xip_sram
+                        pico_encrypt_binary(low_power_test_timers_encrypted_xip_sram ${PICO_SDK_PATH}/tools/example_keys/privateaes.bin ${PICO_SDK_PATH}/tools/example_keys/ivsalt.bin EMBED)
+                        pico_set_persistent_data_loc(low_power_test_timers_encrypted_xip_sram xip_ram)
+                        # Also check encrypting with code in xip_sram
+                        pico_set_time_critical_placement(low_power_test_timers_encrypted_xip_sram xip_ram)
+                        set_target_properties(low_power_test_timers_encrypted_xip_sram PROPERTIES PICO_TEST_TIMEOUT 35)
+                        set_target_properties(low_power_test_timers_encrypted_xip_sram PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+                        set_target_properties(low_power_test_timers_encrypted_xip_sram PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+                        # create map/bin/hex file etc.
+                        pico_add_extra_outputs(low_power_test_timers_encrypted_xip_sram)
+                endif()
+
+                add_executable(low_power_test_timers_sram0
                         low_power_test_timers.c
-                        )
-                target_link_libraries(low_power_test_timers_encrypted_xip_sram low_power_test_common)
-                pico_set_binary_type(low_power_test_timers_encrypted_xip_sram no_flash)
-                pico_package_uf2_output(low_power_test_timers_encrypted_xip_sram)
-                pico_sign_binary(low_power_test_timers_encrypted_xip_sram ${PICO_SDK_PATH}/tools/example_keys/private.pem)
-                # Encrypted binaries don't clear xip_sram, so NO_CLEAR can be omitted when persistent data is in xip_sram
-                pico_encrypt_binary(low_power_test_timers_encrypted_xip_sram ${PICO_SDK_PATH}/tools/example_keys/privateaes.bin ${PICO_SDK_PATH}/tools/example_keys/ivsalt.bin EMBED)
-                pico_set_persistent_data_loc(low_power_test_timers_encrypted_xip_sram xip_ram)
-                # Also check encrypting with code in xip_sram
-                pico_set_time_critical_placement(low_power_test_timers_encrypted_xip_sram xip_ram)
-                set_target_properties(low_power_test_timers_encrypted_xip_sram PROPERTIES PICO_TEST_TIMEOUT 35)
-                set_target_properties(low_power_test_timers_encrypted_xip_sram PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-                set_target_properties(low_power_test_timers_encrypted_xip_sram PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+                )
+                target_link_libraries(low_power_test_timers_sram0 low_power_test_common)
+                pico_set_persistent_data_loc(low_power_test_timers_sram0 0x20020000)
                 # create map/bin/hex file etc.
-                pico_add_extra_outputs(low_power_test_timers_encrypted_xip_sram)
+                set_target_properties(low_power_test_timers_sram0 PROPERTIES PICO_TEST_TIMEOUT 35)
+                set_target_properties(low_power_test_timers_sram0 PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+                set_target_properties(low_power_test_timers_sram0 PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+                pico_add_extra_outputs(low_power_test_timers_sram0)
+
+
+                add_executable(low_power_test_timers_sram1
+                        low_power_test_timers.c
+                )
+                target_link_libraries(low_power_test_timers_sram1 low_power_test_common)
+                pico_set_persistent_data_loc(low_power_test_timers_sram1 0x20040000)
+                # create map/bin/hex file etc.
+                set_target_properties(low_power_test_timers_sram1 PROPERTIES PICO_TEST_TIMEOUT 35)
+                set_target_properties(low_power_test_timers_sram1 PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+                set_target_properties(low_power_test_timers_sram1 PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+                pico_add_extra_outputs(low_power_test_timers_sram1)
+
+                add_executable(low_power_test_timers_xip_sram
+                        low_power_test_timers.c
+                )
+                target_link_libraries(low_power_test_timers_xip_sram low_power_test_common)
+                pico_set_persistent_data_loc(low_power_test_timers_xip_sram 0x13ffc000)
+                # create map/bin/hex file etc.
+                set_target_properties(low_power_test_timers_xip_sram PROPERTIES PICO_TEST_TIMEOUT 35)
+                set_target_properties(low_power_test_timers_xip_sram PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+                set_target_properties(low_power_test_timers_xip_sram PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+                pico_add_extra_outputs(low_power_test_timers_xip_sram)
+
+                add_executable(low_power_test_timers_xip_sram_no_flash
+                        low_power_test_timers.c
+                )
+                target_link_libraries(low_power_test_timers_xip_sram_no_flash low_power_test_common)
+                pico_set_persistent_data_loc(low_power_test_timers_xip_sram_no_flash 0x13ffc000)
+                pico_set_binary_type(low_power_test_timers_xip_sram_no_flash no_flash)
+                pico_package_uf2_output(low_power_test_timers_xip_sram_no_flash)
+                # create map/bin/hex file etc.
+                set_target_properties(low_power_test_timers_xip_sram_no_flash PROPERTIES PICO_TEST_TIMEOUT 35)
+                set_target_properties(low_power_test_timers_xip_sram_no_flash PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+                set_target_properties(low_power_test_timers_xip_sram_no_flash PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+                pico_add_extra_outputs(low_power_test_timers_xip_sram_no_flash)
         endif()
 
-
-        add_executable(low_power_test_timers_sram0
-                low_power_test_timers.c
-                )
-        target_link_libraries(low_power_test_timers_sram0 low_power_test_common)
-        pico_set_persistent_data_loc(low_power_test_timers_sram0 0x20020000)
-        # create map/bin/hex file etc.
-        set_target_properties(low_power_test_timers_sram0 PROPERTIES PICO_TEST_TIMEOUT 35)
-        set_target_properties(low_power_test_timers_sram0 PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-        set_target_properties(low_power_test_timers_sram0 PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-        pico_add_extra_outputs(low_power_test_timers_sram0)
-
-
-        add_executable(low_power_test_timers_sram1
-                low_power_test_timers.c
-                )
-        target_link_libraries(low_power_test_timers_sram1 low_power_test_common)
-        pico_set_persistent_data_loc(low_power_test_timers_sram1 0x20040000)
-        # create map/bin/hex file etc.
-        set_target_properties(low_power_test_timers_sram1 PROPERTIES PICO_TEST_TIMEOUT 35)
-        set_target_properties(low_power_test_timers_sram1 PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-        set_target_properties(low_power_test_timers_sram1 PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-        pico_add_extra_outputs(low_power_test_timers_sram1)
-
-
-        add_executable(low_power_test_timers_xip_sram
-                low_power_test_timers.c
-                )
-        target_link_libraries(low_power_test_timers_xip_sram low_power_test_common)
-        pico_set_persistent_data_loc(low_power_test_timers_xip_sram 0x13ffc000)
-        # create map/bin/hex file etc.
-        set_target_properties(low_power_test_timers_xip_sram PROPERTIES PICO_TEST_TIMEOUT 35)
-        set_target_properties(low_power_test_timers_xip_sram PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-        set_target_properties(low_power_test_timers_xip_sram PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-        pico_add_extra_outputs(low_power_test_timers_xip_sram)
-
-
-        add_executable(low_power_test_timers_xip_sram_no_flash
-                low_power_test_timers.c
-                )
-        target_link_libraries(low_power_test_timers_xip_sram_no_flash low_power_test_common)
-        pico_set_persistent_data_loc(low_power_test_timers_xip_sram_no_flash 0x13ffc000)
-        pico_set_binary_type(low_power_test_timers_xip_sram_no_flash no_flash)
-        pico_package_uf2_output(low_power_test_timers_xip_sram_no_flash)
-        # create map/bin/hex file etc.
-        set_target_properties(low_power_test_timers_xip_sram_no_flash PROPERTIES PICO_TEST_TIMEOUT 35)
-        set_target_properties(low_power_test_timers_xip_sram_no_flash PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-        set_target_properties(low_power_test_timers_xip_sram_no_flash PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-        pico_add_extra_outputs(low_power_test_timers_xip_sram_no_flash)
-endif()
-
-
-add_executable(external_sleep_timer
-        external_sleep_timer.c
+        add_executable(external_sleep_timer
+                external_sleep_timer.c
         )
-target_link_libraries(external_sleep_timer low_power_test_common)
-# This is a buddy program, not a test
-set_target_properties(external_sleep_timer PROPERTIES PICO_TEST_SKIP_IN_CI TRUE)
-# create map/bin/hex file etc.
-pico_add_extra_outputs(external_sleep_timer)
+        target_link_libraries(external_sleep_timer low_power_test_common)
+        # This is a buddy program, not a test
+        set_target_properties(external_sleep_timer PROPERTIES PICO_TEST_SKIP_IN_CI TRUE)
+        # create map/bin/hex file etc.
+        pico_add_extra_outputs(external_sleep_timer)
 
-
-add_executable(low_power_test_gpio
-        low_power_test_gpio.c
+        add_executable(low_power_test_gpio
+                low_power_test_gpio.c
         )
-target_link_libraries(low_power_test_gpio low_power_test_common)
-set_target_properties(low_power_test_gpio PROPERTIES PICO_TEST_TIMEOUT 25)
-set_target_properties(low_power_test_gpio PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-set_target_properties(low_power_test_gpio PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-# create map/bin/hex file etc.
-pico_add_extra_outputs(low_power_test_gpio)
+        target_link_libraries(low_power_test_gpio low_power_test_common)
+        set_target_properties(low_power_test_gpio PROPERTIES PICO_TEST_TIMEOUT 25)
+        set_target_properties(low_power_test_gpio PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+        set_target_properties(low_power_test_gpio PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+        # create map/bin/hex file etc.
+        pico_add_extra_outputs(low_power_test_gpio)
 
-
-add_executable(low_power_test_gpio_usb
-        low_power_test_gpio.c
+        add_executable(low_power_test_gpio_usb
+                low_power_test_gpio.c
         )
-target_link_libraries(low_power_test_gpio_usb low_power_test_common)
-pico_enable_stdio_usb(low_power_test_gpio_usb 1)
-set_target_properties(low_power_test_gpio_usb PROPERTIES PICO_TEST_TIMEOUT 25)
-set_target_properties(low_power_test_gpio_usb PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-set_target_properties(low_power_test_gpio_usb PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-# create map/bin/hex file etc.
-pico_add_extra_outputs(low_power_test_gpio_usb)
+        target_link_libraries(low_power_test_gpio_usb low_power_test_common)
+        pico_enable_stdio_usb(low_power_test_gpio_usb 1)
+        set_target_properties(low_power_test_gpio_usb PROPERTIES PICO_TEST_TIMEOUT 25)
+        set_target_properties(low_power_test_gpio_usb PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+        set_target_properties(low_power_test_gpio_usb PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+        # create map/bin/hex file etc.
+        pico_add_extra_outputs(low_power_test_gpio_usb)
 
-
-add_executable(low_power_test_simple
-        low_power_test_simple.c
+        add_executable(low_power_test_simple
+                low_power_test_simple.c
         )
-target_link_libraries(low_power_test_simple low_power_test_common)
-set_target_properties(low_power_test_simple PROPERTIES PICO_TEST_TIMEOUT 25)
-set_target_properties(low_power_test_simple PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
-set_target_properties(low_power_test_simple PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
-# create map/bin/hex file etc.
-pico_add_extra_outputs(low_power_test_simple)
+        target_link_libraries(low_power_test_simple low_power_test_common)
+        set_target_properties(low_power_test_simple PROPERTIES PICO_TEST_TIMEOUT 25)
+        set_target_properties(low_power_test_simple PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
+        set_target_properties(low_power_test_simple PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
+        # create map/bin/hex file etc.
+        pico_add_extra_outputs(low_power_test_simple)
 
-
-add_custom_target(low_power_tests)
-get_directory_property(targets BUILDSYSTEM_TARGETS DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
-foreach(target IN LISTS targets)
-        get_target_property(type ${target} TYPE)
-        if(type STREQUAL "EXECUTABLE")
-                add_dependencies(low_power_tests ${target})
-        endif()
-endforeach()
+        add_custom_target(low_power_tests)
+        get_directory_property(targets BUILDSYSTEM_TARGETS DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
+        foreach(target IN LISTS targets)
+                get_target_property(type ${target} TYPE)
+                if(type STREQUAL "EXECUTABLE")
+                        add_dependencies(low_power_tests ${target})
+                endif()
+        endforeach()
+endif()
\ No newline at end of file