From e1701f74e4e6c6d434a300fb28c60756848819e2 Mon Sep 17 00:00:00 2001 From: jcarranz97 Date: Sun, 3 Dec 2023 19:19:30 -0600 Subject: [PATCH 1/5] Include build folder as part of `.gitignore` (#1) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 85697e8..87df178 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea .vscode cmake-* +build From a43829c87d53cf80024dfa6ef345443254ad0d20 Mon Sep 17 00:00:00 2001 From: Juan Jose Carranza Garcia Date: Sun, 3 Dec 2023 19:35:04 -0600 Subject: [PATCH 2/5] Include example_aute_set_url.cmake --- CMakeLists.txt | 3 +++ example_auto_set_url.cmake | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 example_auto_set_url.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 194de51..bbf0d12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,9 @@ include(pico_sdk_import.cmake) # We also need PICO EXTRAS include(pico_extras_import.cmake) +# Include example_auto_set_url +include(example_auto_set_url.cmake) + project(pico_playground C CXX) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) diff --git a/example_auto_set_url.cmake b/example_auto_set_url.cmake new file mode 100644 index 0000000..71e8d24 --- /dev/null +++ b/example_auto_set_url.cmake @@ -0,0 +1,5 @@ +set(PICO_EXTRAS_URL_BASE "https://github.com/raspberrypi/pico-extras/tree/HEAD") +macro(example_auto_set_url TARGET) + file(RELATIVE_PATH URL_REL_PATH "${PICO_EXTRAS_PATH}" "${CMAKE_CURRENT_LIST_DIR}") + pico_set_program_url(${TARGET} "${PICO_EXTRAS_URL_BASE}/${URL_REL_PATH}") +endmacro() From a23a2bae6d6973638e2e904ab44a253b1c1d0628 Mon Sep 17 00:00:00 2001 From: Juan Jose Carranza Garcia Date: Mon, 4 Dec 2023 19:52:06 -0600 Subject: [PATCH 3/5] Rename macro from example_auto_set_url to playground_auto_set_url --- CMakeLists.txt | 4 ++-- example_auto_set_url.cmake => playground_auto_set_url.cmake | 2 +- reset/hello_reset/CMakeLists.txt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename example_auto_set_url.cmake => playground_auto_set_url.cmake (87%) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbf0d12..98b130d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,8 @@ include(pico_sdk_import.cmake) # We also need PICO EXTRAS include(pico_extras_import.cmake) -# Include example_auto_set_url -include(example_auto_set_url.cmake) +# Include playground_auto_set_url +include(playground_auto_set_url.cmake) project(pico_playground C CXX) set(CMAKE_C_STANDARD 11) diff --git a/example_auto_set_url.cmake b/playground_auto_set_url.cmake similarity index 87% rename from example_auto_set_url.cmake rename to playground_auto_set_url.cmake index 71e8d24..bcfba19 100644 --- a/example_auto_set_url.cmake +++ b/playground_auto_set_url.cmake @@ -1,5 +1,5 @@ set(PICO_EXTRAS_URL_BASE "https://github.com/raspberrypi/pico-extras/tree/HEAD") -macro(example_auto_set_url TARGET) +macro(playground_auto_set_url TARGET) file(RELATIVE_PATH URL_REL_PATH "${PICO_EXTRAS_PATH}" "${CMAKE_CURRENT_LIST_DIR}") pico_set_program_url(${TARGET} "${PICO_EXTRAS_URL_BASE}/${URL_REL_PATH}") endmacro() diff --git a/reset/hello_reset/CMakeLists.txt b/reset/hello_reset/CMakeLists.txt index 29519cd..14a9df4 100644 --- a/reset/hello_reset/CMakeLists.txt +++ b/reset/hello_reset/CMakeLists.txt @@ -10,5 +10,5 @@ if (TARGET hardware_reset) pico_add_extra_outputs(hello_reset) # add url via pico_set_program_url - example_auto_set_url(hello_reset) -endif () \ No newline at end of file + playground_auto_set_url(hello_reset) +endif () From d492e22859f8447a01c9099ebac9195bc6b926b1 Mon Sep 17 00:00:00 2001 From: Juan Jose Carranza Garcia Date: Mon, 4 Dec 2023 19:53:46 -0600 Subject: [PATCH 4/5] Target pico-playground repo rather than pico-extras --- playground_auto_set_url.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground_auto_set_url.cmake b/playground_auto_set_url.cmake index bcfba19..7bf4e83 100644 --- a/playground_auto_set_url.cmake +++ b/playground_auto_set_url.cmake @@ -1,4 +1,4 @@ -set(PICO_EXTRAS_URL_BASE "https://github.com/raspberrypi/pico-extras/tree/HEAD") +set(PICO_EXTRAS_URL_BASE "https://github.com/raspberrypi/pico-playground/tree/HEAD") macro(playground_auto_set_url TARGET) file(RELATIVE_PATH URL_REL_PATH "${PICO_EXTRAS_PATH}" "${CMAKE_CURRENT_LIST_DIR}") pico_set_program_url(${TARGET} "${PICO_EXTRAS_URL_BASE}/${URL_REL_PATH}") From 5ea49957d4105417c323556e09c30e2e3c0987e9 Mon Sep 17 00:00:00 2001 From: Juan Jose Carranza Garcia Date: Wed, 6 Dec 2023 21:52:13 -0600 Subject: [PATCH 5/5] Change PICO_EXTRAS to PICO_PLAYGROUND --- CMakeLists.txt | 1 + playground_auto_set_url.cmake | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 98b130d..98e3724 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ include(pico_sdk_import.cmake) # We also need PICO EXTRAS include(pico_extras_import.cmake) +set(PICO_PLAYGROUND_PATH ${PROJECT_SOURCE_DIR}) # Include playground_auto_set_url include(playground_auto_set_url.cmake) diff --git a/playground_auto_set_url.cmake b/playground_auto_set_url.cmake index 7bf4e83..b2d0595 100644 --- a/playground_auto_set_url.cmake +++ b/playground_auto_set_url.cmake @@ -1,5 +1,5 @@ -set(PICO_EXTRAS_URL_BASE "https://github.com/raspberrypi/pico-playground/tree/HEAD") +set(PICO_PLAYGROUND_URL_BASE "https://github.com/raspberrypi/pico-playground/tree/HEAD") macro(playground_auto_set_url TARGET) - file(RELATIVE_PATH URL_REL_PATH "${PICO_EXTRAS_PATH}" "${CMAKE_CURRENT_LIST_DIR}") - pico_set_program_url(${TARGET} "${PICO_EXTRAS_URL_BASE}/${URL_REL_PATH}") + file(RELATIVE_PATH URL_REL_PATH "${PICO_PLAYGROUND_PATH}" "${CMAKE_CURRENT_LIST_DIR}") + pico_set_program_url(${TARGET} "${PICO_PLAYGROUND_URL_BASE}/${URL_REL_PATH}") endmacro()