1+ add_library (low_power_test_common INTERFACE )
2+ target_link_libraries (low_power_test_common INTERFACE pico_stdlib pico_low_power pico_status_led )
3+ target_include_directories (low_power_test_common INTERFACE ${CMAKE_CURRENT_LIST_DIR } )
4+
15add_executable (low_power_test_timers
26 low_power_test_timers.c
37 )
4- target_link_libraries (low_power_test_timers pico_stdlib pico_low_power pico_status_led )
8+ target_link_libraries (low_power_test_timers low_power_test_common )
9+ set_target_properties (low_power_test_timers PROPERTIES PICO_TEST_TIMEOUT 35)
10+ set_target_properties (low_power_test_timers PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
11+ set_target_properties (low_power_test_timers PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
512# create map/bin/hex file etc.
613pico_add_extra_outputs (low_power_test_timers )
714
815
916add_executable (low_power_test_timers_usb
1017 low_power_test_timers.c
1118 )
12- target_link_libraries (low_power_test_timers_usb pico_stdlib pico_low_power pico_status_led )
19+ target_link_libraries (low_power_test_timers_usb low_power_test_common )
1320pico_enable_stdio_usb (low_power_test_timers_usb 1 )
21+ set_target_properties (low_power_test_timers_usb PROPERTIES PICO_TEST_TIMEOUT 35)
22+ set_target_properties (low_power_test_timers_usb PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
23+ set_target_properties (low_power_test_timers_usb PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
1424# create map/bin/hex file etc.
1525pico_add_extra_outputs (low_power_test_timers_usb )
1626
@@ -20,11 +30,14 @@ if (NOT PICO_RP2040)
2030 add_executable (low_power_test_timers_encrypted
2131 low_power_test_timers.c
2232 )
23- target_link_libraries (low_power_test_timers_encrypted pico_stdlib pico_low_power pico_status_led )
33+ target_link_libraries (low_power_test_timers_encrypted low_power_test_common )
2434 pico_set_binary_type (low_power_test_timers_encrypted no_flash )
2535 pico_package_uf2_output (low_power_test_timers_encrypted )
2636 pico_sign_binary (low_power_test_timers_encrypted ${PICO_SDK_PATH} /tools/example_keys/private.pem )
2737 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 )
38+ set_target_properties (low_power_test_timers_encrypted PROPERTIES PICO_TEST_TIMEOUT 35)
39+ set_target_properties (low_power_test_timers_encrypted PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
40+ set_target_properties (low_power_test_timers_encrypted PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
2841 # create map/bin/hex file etc.
2942 pico_add_extra_outputs (low_power_test_timers_encrypted )
3043 endif ()
@@ -33,71 +46,94 @@ if (NOT PICO_RP2040)
3346 add_executable (low_power_test_timers_sram0
3447 low_power_test_timers.c
3548 )
36- target_link_libraries (low_power_test_timers_sram0 pico_stdlib pico_low_power pico_status_led )
49+ target_link_libraries (low_power_test_timers_sram0 low_power_test_common )
3750 pico_set_persistent_data_loc (low_power_test_timers_sram0 0x20020000 )
3851 # create map/bin/hex file etc.
52+ set_target_properties (low_power_test_timers_sram0 PROPERTIES PICO_TEST_TIMEOUT 35)
53+ set_target_properties (low_power_test_timers_sram0 PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
54+ set_target_properties (low_power_test_timers_sram0 PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
3955 pico_add_extra_outputs (low_power_test_timers_sram0 )
4056
4157
4258 add_executable (low_power_test_timers_sram1
4359 low_power_test_timers.c
4460 )
45- target_link_libraries (low_power_test_timers_sram1 pico_stdlib pico_low_power pico_status_led )
61+ target_link_libraries (low_power_test_timers_sram1 low_power_test_common )
4662 pico_set_persistent_data_loc (low_power_test_timers_sram1 0x20040000 )
4763 # create map/bin/hex file etc.
64+ set_target_properties (low_power_test_timers_sram1 PROPERTIES PICO_TEST_TIMEOUT 35)
65+ set_target_properties (low_power_test_timers_sram1 PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
66+ set_target_properties (low_power_test_timers_sram1 PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
4867 pico_add_extra_outputs (low_power_test_timers_sram1 )
4968
5069
5170 add_executable (low_power_test_timers_xip_sram
5271 low_power_test_timers.c
5372 )
54- target_link_libraries (low_power_test_timers_xip_sram pico_stdlib pico_low_power pico_status_led )
73+ target_link_libraries (low_power_test_timers_xip_sram low_power_test_common )
5574 pico_set_persistent_data_loc (low_power_test_timers_xip_sram 0x13ffc000 )
5675 # create map/bin/hex file etc.
76+ set_target_properties (low_power_test_timers_xip_sram PROPERTIES PICO_TEST_TIMEOUT 35)
77+ set_target_properties (low_power_test_timers_xip_sram PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
78+ set_target_properties (low_power_test_timers_xip_sram PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
5779 pico_add_extra_outputs (low_power_test_timers_xip_sram )
5880
5981
6082 add_executable (low_power_test_timers_xip_sram_no_flash
6183 low_power_test_timers.c
6284 )
63- target_link_libraries (low_power_test_timers_xip_sram_no_flash pico_stdlib pico_low_power pico_status_led )
85+ target_link_libraries (low_power_test_timers_xip_sram_no_flash low_power_test_common )
6486 pico_set_persistent_data_loc (low_power_test_timers_xip_sram_no_flash 0x13ffc000 )
6587 pico_set_binary_type (low_power_test_timers_xip_sram_no_flash no_flash )
6688 pico_package_uf2_output (low_power_test_timers_xip_sram_no_flash )
6789 # create map/bin/hex file etc.
90+ set_target_properties (low_power_test_timers_xip_sram_no_flash PROPERTIES PICO_TEST_TIMEOUT 35)
91+ set_target_properties (low_power_test_timers_xip_sram_no_flash PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
92+ set_target_properties (low_power_test_timers_xip_sram_no_flash PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
6893 pico_add_extra_outputs (low_power_test_timers_xip_sram_no_flash )
6994endif ()
7095
71- if (PICO_RP2040)
72- add_executable (rtc_clksrc
73- rtc_clksrc.c
74- )
75- target_link_libraries (rtc_clksrc pico_stdlib pico_status_led )
76- # create map/bin/hex file etc.
77- pico_add_extra_outputs (rtc_clksrc )
78- endif ()
96+
97+ add_executable (external_sleep_timer
98+ external_sleep_timer.c
99+ )
100+ target_link_libraries (external_sleep_timer low_power_test_common )
101+ # This is a buddy program, not a test
102+ set_target_properties (external_sleep_timer PROPERTIES PICO_TEST_SKIP_IN_CI TRUE )
103+ # create map/bin/hex file etc.
104+ pico_add_extra_outputs (external_sleep_timer )
105+
79106
80107add_executable (low_power_test_gpio
81108 low_power_test_gpio.c
82109 )
83- target_link_libraries (low_power_test_gpio pico_stdlib pico_low_power pico_status_led )
110+ target_link_libraries (low_power_test_gpio low_power_test_common )
111+ set_target_properties (low_power_test_gpio PROPERTIES PICO_TEST_TIMEOUT 25)
112+ set_target_properties (low_power_test_gpio PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
113+ set_target_properties (low_power_test_gpio PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
84114# create map/bin/hex file etc.
85115pico_add_extra_outputs (low_power_test_gpio )
86116
87117
88118add_executable (low_power_test_gpio_usb
89119 low_power_test_gpio.c
90120 )
91- target_link_libraries (low_power_test_gpio_usb pico_stdlib pico_low_power pico_status_led )
121+ target_link_libraries (low_power_test_gpio_usb low_power_test_common )
92122pico_enable_stdio_usb (low_power_test_gpio_usb 1 )
123+ set_target_properties (low_power_test_gpio_usb PROPERTIES PICO_TEST_TIMEOUT 25)
124+ set_target_properties (low_power_test_gpio_usb PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
125+ set_target_properties (low_power_test_gpio_usb PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
93126# create map/bin/hex file etc.
94127pico_add_extra_outputs (low_power_test_gpio_usb )
95128
96129
97130add_executable (low_power_test_simple
98131 low_power_test_simple.c
99132 )
100- target_link_libraries (low_power_test_simple pico_stdlib pico_low_power pico_status_led )
133+ target_link_libraries (low_power_test_simple low_power_test_common )
134+ set_target_properties (low_power_test_simple PROPERTIES PICO_TEST_TIMEOUT 25)
135+ set_target_properties (low_power_test_simple PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:" )
136+ set_target_properties (low_power_test_simple PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)
101137# create map/bin/hex file etc.
102138pico_add_extra_outputs (low_power_test_simple )
103139
0 commit comments