add WAMR to build
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
#include "nova64_core.h"
|
||||
#include "nova64_internal.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
#include "task.h"
|
||||
#include "wasm_runner.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#if defined(ESP_PLATFORM)
|
||||
/* ESP32-spezifische Header für Low-Power & Watchdog */
|
||||
#include "esp_pm.h"
|
||||
#include "esp_rom_sys.h"
|
||||
#include "esp_task_wdt.h"
|
||||
#elif defined(_WIN32)
|
||||
/* Windows API für Schlafen im Desktop-Thread */
|
||||
#include <windows.h>
|
||||
#else
|
||||
/* POSIX / Linux / macOS Sleep */
|
||||
@@ -30,7 +31,7 @@ static volatile bool shutdown_requested = false;
|
||||
|
||||
static const char *const kInternalLauncherPath = "SYS:/launcher.wasm";
|
||||
|
||||
static void nova64_log(const char *format, ...) {
|
||||
void nova64_log(const char *format, ...) {
|
||||
char buffer[512];
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
@@ -46,6 +47,7 @@ static void nova64_log(const char *format, ...) {
|
||||
|
||||
static bool initialize_wasm_runtime(void) {
|
||||
nova64_log("Initializing WASM runtime...\n");
|
||||
wasm_runner_initialize();
|
||||
// TODO: Replace this stub with real WAMR initialization.
|
||||
return true;
|
||||
}
|
||||
@@ -174,8 +176,7 @@ NOVA64_API int32_t nova64_main() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
nova64_log(
|
||||
"Entering main runtime and starting FreeRTOS scheduler...\n");
|
||||
nova64_log("Entering main runtime and starting FreeRTOS scheduler...\n");
|
||||
vTaskStartScheduler();
|
||||
|
||||
// vTaskStartScheduler only returns if the scheduler fails to start or if
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "wasm_runner.h"
|
||||
#include "nova64_internal.h"
|
||||
#include "wasm_export.h"
|
||||
|
||||
struct wasm_runner_instance {
|
||||
void *native_instance;
|
||||
char *module_path;
|
||||
wasm_runner_framebuffer_config_t framebuffer_config;
|
||||
wasm_runner_instance_t *next;
|
||||
};
|
||||
|
||||
bool wasm_runner_initialize(void) {
|
||||
wasm_runtime_init();
|
||||
nova64_log("WASM runtime initialized successfully.\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user