summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules3
m---------3rd-party/pico-sdk0
-rw-r--r--CMakeLists.txt13
-rw-r--r--hello_world.c8
l---------pico_sdk_import.cmake1
6 files changed, 26 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..84c048a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/build/
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..f54eb7f
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "3rd-party/pico-sdk"]
+ path = 3rd-party/pico-sdk
+ url = https://github.com/raspberrypi/pico-sdk
diff --git a/3rd-party/pico-sdk b/3rd-party/pico-sdk
new file mode 160000
+Subproject efe2103f9b28458a1615ff096054479743ade23
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..d9c005d
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.13)
+
+set(PICO_SDK_PATH "${CMAKE_SOURCE_DIR}/3rd-party/pico-sdk")
+include(pico_sdk_import.cmake)
+
+project(sbc_harness)
+
+pico_sdk_init()
+
+add_executable(hello_world hello_world.c)
+target_link_libraries(hello_world pico_stdlib)
+# create map/bin/hex/uf2 file in addition to ELF.
+pico_add_extra_outputs(hello_world)
diff --git a/hello_world.c b/hello_world.c
new file mode 100644
index 0000000..49008a6
--- /dev/null
+++ b/hello_world.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include "pico/stdlib.h"
+
+int main() {
+ setup_default_uart();
+ printf("Hello, world!\n");
+ return 0;
+}
diff --git a/pico_sdk_import.cmake b/pico_sdk_import.cmake
new file mode 120000
index 0000000..d34d145
--- /dev/null
+++ b/pico_sdk_import.cmake
@@ -0,0 +1 @@
+3rd-party/pico-sdk/external/pico_sdk_import.cmake \ No newline at end of file