init repository

This commit is contained in:
rmanach
2025-02-19 11:22:12 +01:00
commit a159937fa9
10 changed files with 516 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# Generated Cmake Pico project file
cmake_minimum_required(VERSION 3.13)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Pull in Raspberry Pi Pico SDK (must be before project)
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
project(<project_name> C CXX ASM)
# Initialise the Raspberry Pi Pico SDK
pico_sdk_init()
# Add executable. Default name is the project name, version 0.1
add_executable(<project_name> main.c )
pico_set_program_name(<project_name> "<project_name>")
pico_set_program_version(<project_name> "0.1")
# Modify the below lines to enable/disable output over UART/USB
pico_enable_stdio_uart(<project_name> 0)
pico_enable_stdio_usb(<project_name> 1)
# Add the standard library to the build
target_link_libraries(<project_name>
pico_stdlib)
# Add the standard include files to the build
target_include_directories(<project_name> PRIVATE
${CMAKE_CURRENT_LIST_DIR}
)
pico_add_extra_outputs(<project_name>)
+12
View File
@@ -0,0 +1,12 @@
#include <stdio.h>
#include <pico/stdlib.h>
int main()
{
stdio_init_all();
while (true) {
printf("<prog_name> is running...\n");
sleep_ms(1000);
}
}