commit 6d19e1dc97bea19274fb2d1ccd407392b4ac8f87 Author: MReenen Date: Sat Feb 24 20:08:44 2024 +0100 inital commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a8d6a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ + +/build + diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1891415 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "libs/pico-sdk"] + path = libs/pico-sdk + url = https://github.com/raspberrypi/pico-sdk.git diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..24f2736 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.13) + +# initialize the SDK based on PICO_SDK_PATH +# note: this must happen before project() +include(libs/pico-sdk/pico_sdk_init.cmake) + +project(my_project) + +# initialize the Raspberry Pi Pico SDK +pico_sdk_init() + +add_executable(hello_world + src/main.c +) + +# Add pico_stdlib library which aggregates commonly used features +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/libs/pico-sdk b/libs/pico-sdk new file mode 160000 index 0000000..6a7db34 --- /dev/null +++ b/libs/pico-sdk @@ -0,0 +1 @@ +Subproject commit 6a7db34ff63345a7badec79ebea3aaef1712f374 diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..d2848ca --- /dev/null +++ b/src/main.c @@ -0,0 +1,9 @@ +#include +#include "pico/stdlib.h" + +int main() { + setup_default_uart(); + printf("Hello, world!\n"); + return 0; +} +