hello world

This commit is contained in:
embr 2023-04-21 18:11:54 +02:00
parent 5c5448ba3f
commit acabcd1569
6 changed files with 37 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
has nix && use nix

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "lib/pico-sdk"]
path = lib/pico-sdk
url = https://github.com/raspberrypi/pico-sdk

18
CMakeLists.txt Normal file
View file

@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.13)
set(PICO_SDK_PATH lib/pico-sdk)
include(lib/pico-sdk/external/pico_sdk_import.cmake)
project(vibe-check)
pico_sdk_init()
add_executable(vibe-check
src/main.c
)
# Add pico_stdlib library which aggregates commonly used features
target_link_libraries(vibe-check pico_stdlib)
# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(vibe-check)

1
lib/pico-sdk Submodule

@ -0,0 +1 @@
Subproject commit f396d05f8252d4670d4ea05c8b7ac938ef0cd381

6
shell.nix Normal file
View file

@ -0,0 +1,6 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
cmake python3 gcc-arm-embedded
];
}

8
src/main.c Normal file
View file

@ -0,0 +1,8 @@
#include <stdio.h>
#include "pico/stdlib.h"
int main() {
setup_default_uart();
printf("Hello, world!\n");
return 0;
}