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
# Cache files, generates by Zephir
.temp/
.libs/
# Generic Zephyr build output
build/
# Object files, generates by linker
*.lo
*.la
*.o
*.loT
# West generated files
.west/
# Files generated by configure and Zephir,
# not required for extension compilation.
ext/build/
ext/modules/
ext/Makefile*
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
# CMake generated files
CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
# 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;
}