diff --git a/Kconfig b/Kconfig index b6c78320..458e7e72 100644 --- a/Kconfig +++ b/Kconfig @@ -82,6 +82,13 @@ config OCRE_LOG_INF help Enable Ocre debug logging +config OCRE_PRINT_BANNER + bool "Print Ocre runtime banner at startup" + default y + help + Enable printing of the Ocre runtime banner with version and system information + at application startup. + if OCRE module = OCRE @@ -93,7 +100,7 @@ endif config OCRE_SENSORS bool "Enable OCRE Sensors support" default n - depends on SENSOR + depends on SENSOR help Enable support for OCRE sensors @@ -121,13 +128,13 @@ config OCRE_CONTAINER_DEFAULT_STACK_SIZE default 2048 help The default value used for a container's stack size. - + config MAX_CONTAINERS int "Maximum concurrent containers" default 10 help The default value for maximum number of container's. - + config MAX_TIMERS int "Maximum number of timers" default 5 @@ -159,8 +166,8 @@ config OCRE_GPIO help Enable the OCRE GPIO driver that provides a portable API layer for GPIO operations across different hardware platforms. - - + + config OCRE_TIMER bool "OCRE Timer Driver" default y @@ -192,7 +199,7 @@ config OCRE_CONTAINER_MESSAGING default n help Enable support for OCRE Container Messaging - + config MESSAGING_MAX_SUBSCRIPTIONS int "Number of maximum subscriptions for Container Messaging" default 10 diff --git a/build.sh b/build.sh index 8432e0c4..0d8ce028 100755 --- a/build.sh +++ b/build.sh @@ -105,11 +105,11 @@ if [[ "$TARGET" == "z" ]]; then if [[ ${#INPUT_FILES[@]} -gt 0 ]]; then echo "Input files provided: ${INPUT_FILES[*]}" - rm flash.bin + rm -f flash.bin west build -p -b $ZEPHYR_BOARD ./application -d build -- \ -DMODULE_EXT_ROOT=`pwd`/application -DOCRE_INPUT_FILE="${INPUT_FILES[0]}" -DTARGET_PLATFORM_NAME=Zephyr $CONF_EXTRA || exit 1 else - rm flash.bin + rm -f flash.bin west build -p -b $ZEPHYR_BOARD ./application -d build -- \ -DMODULE_EXT_ROOT=`pwd`/application -DTARGET_PLATFORM_NAME=Zephyr $CONF_EXTRA || exit 1 fi diff --git a/prj.conf b/prj.conf index 519f3f84..8279c980 100644 --- a/prj.conf +++ b/prj.conf @@ -22,7 +22,7 @@ CONFIG_DYNAMIC_THREAD_ALLOC=y # File system CONFIG_FILE_SYSTEM=y -#CONFIG_DISK_ACCESS=y +#CONFIG_DISK_ACCESS=y CONFIG_FILE_SYSTEM_LITTLEFS=y # Settings support @@ -88,3 +88,4 @@ CONFIG_OCRE_MEMORY_CHECK_ENABLED=n CONFIG_OCRE_GPIO=y CONFIG_OCRE_LOG_INF=y +CONFIG_OCRE_PRINT_BANNER=y diff --git a/src/samples-mini/zephyr/main.c b/src/samples-mini/zephyr/main.c index 0927ae7a..4457601e 100644 --- a/src/samples-mini/zephyr/main.c +++ b/src/samples-mini/zephyr/main.c @@ -48,7 +48,26 @@ int main(int argc, char *argv[]) ocre_container_runtime_status_t ret = ocre_container_runtime_init(&ctx, &args); if (ret == RUNTIME_STATUS_INITIALIZED) { + +#ifndef CONFIG_SOC_SERIES +#define CONFIG_SOC_SERIES "undefined" +#endif + +#ifdef CONFIG_OCRE_PRINT_BANNER + printf("\n\n"); + printf("═══════════════════════════════════════════════════════\n"); + printf(" Ocre Runtime v%s\n", APP_VERSION_STRING); + printf("═══════════════════════════════════════════════════════\n"); + printf(" Zephyr: %s\n", KERNEL_VERSION_STRING); + printf(" Board: %s\n", CONFIG_BOARD_TARGET); + printf(" SoC: %s (%s)\n", CONFIG_SOC, CONFIG_SOC_SERIES); + printf(" Arch: %s\n", CONFIG_ARCH); + printf(" RAM: %d KB heap\n", CONFIG_HEAP_MEM_POOL_SIZE / 1024); + printf(" WAMR: %d KB\n", CONFIG_OCRE_WAMR_HEAP_BUFFER_SIZE / 1024); + printf("═══════════════════════════════════════════════════════\n\n"); +#else printf("\n\nOcre runtime started\n"); +#endif create_sample_container(container_filename);