hello world
This commit is contained in:
parent
5c5448ba3f
commit
acabcd1569
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal 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
18
CMakeLists.txt
Normal 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
1
lib/pico-sdk
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit f396d05f8252d4670d4ea05c8b7ac938ef0cd381
|
6
shell.nix
Normal file
6
shell.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
cmake python3 gcc-arm-embedded
|
||||||
|
];
|
||||||
|
}
|
8
src/main.c
Normal file
8
src/main.c
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "pico/stdlib.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
setup_default_uart();
|
||||||
|
printf("Hello, world!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in a new issue