Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for the rev: this shouldn't crash if flash.bin doesn't exist for some reason

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
Expand Down
3 changes: 2 additions & 1 deletion prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -88,3 +88,4 @@ CONFIG_OCRE_MEMORY_CHECK_ENABLED=n
CONFIG_OCRE_GPIO=y

CONFIG_OCRE_LOG_INF=y
CONFIG_OCRE_PRINT_BANNER=y
19 changes: 19 additions & 0 deletions src/samples-mini/zephyr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down