Add hello_world Zephyr application for stm32g431_core

This commit is contained in:
Eduard Iten 2025-07-03 09:15:11 +02:00
parent c3df6565b7
commit 38fd3a6aac
4 changed files with 20 additions and 0 deletions

View File

@ -5,3 +5,4 @@ project(software)
add_subdirectory(modules/modbus_server)
add_subdirectory(modules/valve)
add_subdirectory(modules/fwu)
add_subdirectory(apps/hello_world)

View File

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

View File

@ -0,0 +1,4 @@
CONFIG_BOARD="stm32g431_core"
CONFIG_CONSOLE=y
CONFIG_LOG=y
CONFIG_UART_CONSOLE=y

View File

@ -0,0 +1,9 @@
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
int main(void)
{
printk("Hello World! %s\n", CONFIG_BOARD);
return 0;
}