Add Zephyr hello world project and update .gitignore
This commit is contained in:
parent
864e20a982
commit
5579a3993a
|
|
@ -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
|
||||||
|
|
@ -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)
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue