ESP-IDF platform supports to load AOT to PSRAM and run it (#2385)

This commit is contained in:
dongheng
2023-07-27 10:17:21 +08:00
committed by GitHub
parent 1cafa37568
commit ada7e3fe88
4 changed files with 84 additions and 7 deletions

View File

@ -5,14 +5,16 @@
ESP32_TARGET="esp32"
ESP32C3_TARGET="esp32c3"
ESP32S3_TARGET="esp32s3"
usage ()
{
echo "USAGE:"
echo "$0 $ESP32_TARGET|$ESP32C3_TARGET"
echo "$0 $ESP32_TARGET|$ESP32C3_TARGET|$ESP32S3_TARGET"
echo "Example:"
echo " $0 $ESP32_TARGET"
echo " $0 $ESP32C3_TARGET"
echo " $0 $ESP32S3_TARGET"
exit 1
}

View File

@ -12,6 +12,12 @@
#include "esp_log.h"
#ifdef CONFIG_IDF_TARGET_ESP32S3
#define IWASM_MAIN_STACK_SIZE 5120
#else
#define IWASM_MAIN_STACK_SIZE 4096
#endif
#define LOG_TAG "wamr"
static void *
@ -146,7 +152,7 @@ app_main(void)
pthread_attr_t tattr;
pthread_attr_init(&tattr);
pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_JOINABLE);
pthread_attr_setstacksize(&tattr, 4096);
pthread_attr_setstacksize(&tattr, IWASM_MAIN_STACK_SIZE);
res = pthread_create(&t, &tattr, iwasm_main, (void *)NULL);
assert(res == 0);