Add Zephyr hello world project and update .gitignore

This commit is contained in:
Eduard Iten 2025-07-09 08:34:18 +02:00
parent 864e20a982
commit 5579a3993a
4 changed files with 50 additions and 25 deletions

58
.gitignore vendored
View File

@ -1,28 +1,36 @@
# ---> Zephir # Generic Zephyr build output
# Cache files, generates by Zephir build/
.temp/
.libs/
# Object files, generates by linker # West generated files
*.lo .west/
*.la
*.o
*.loT
# Files generated by configure and Zephir, # CMake generated files
# not required for extension compilation. CMakeCache.txt
ext/build/ CMakeFiles/
ext/modules/ Makefile
ext/Makefile* cmake_install.cmake
ext/config*
ext/acinclude.m4
ext/aclocal.m4
ext/autom4te*
ext/install-sh
ext/ltmain.sh
ext/missing
ext/mkinstalldirs
ext/run-tests.php
ext/.deps
ext/libtool
# Editor and OS generated files
*~
*.swp
*.swo
*.bak
*.orig
.DS_Store
.vscode/
.idea/
# Doxygen output
html/
latex/
# Python virtual environment
virtualenv/
.venv/
# Miscellaneous
*.log
*.bin
*.hex
*.elf
*.map

6
CMakeLists.txt Normal file
View File

@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hello_world)
target_sources(app PRIVATE src/main.c)

1
prj.conf Normal file
View File

@ -0,0 +1 @@
CONFIG_LOG=y

10
src/main.c Normal file
View File

@ -0,0 +1,10 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(hello_world, LOG_LEVEL_INF);
int main(void)
{
LOG_INF("Hello World from Zephyr!");
return 0;
}