diff --git a/software/CMakeLists.txt b/software/CMakeLists.txt index 04f0e5d..ccd0e02 100644 --- a/software/CMakeLists.txt +++ b/software/CMakeLists.txt @@ -5,3 +5,4 @@ project(software) add_subdirectory(modules/modbus_server) add_subdirectory(modules/valve) add_subdirectory(modules/fwu) +add_subdirectory(apps/hello_world) diff --git a/software/apps/hello_world/CMakeLists.txt b/software/apps/hello_world/CMakeLists.txt new file mode 100644 index 0000000..8728b9c --- /dev/null +++ b/software/apps/hello_world/CMakeLists.txt @@ -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) diff --git a/software/apps/hello_world/prj.conf b/software/apps/hello_world/prj.conf new file mode 100644 index 0000000..ef1ed77 --- /dev/null +++ b/software/apps/hello_world/prj.conf @@ -0,0 +1,4 @@ +CONFIG_BOARD="stm32g431_core" +CONFIG_CONSOLE=y +CONFIG_LOG=y +CONFIG_UART_CONSOLE=y diff --git a/software/apps/hello_world/src/main.c b/software/apps/hello_world/src/main.c new file mode 100644 index 0000000..dbec9a8 --- /dev/null +++ b/software/apps/hello_world/src/main.c @@ -0,0 +1,9 @@ +#include +#include + +int main(void) +{ + printk("Hello World! %s\n", CONFIG_BOARD); + return 0; +} +