Fix for ESP32 wolfcrypt_test entry point.

This commit is contained in:
David Garske
2022-09-23 13:55:52 -07:00
parent 792eac9484
commit b42631c721
3 changed files with 12 additions and 9 deletions

View File

@@ -33,6 +33,7 @@
/* proto-type */
extern void wolf_benchmark_task();
extern void wolf_crypt_task();
static const char* const TAG = "wolfbenchmark";
char* __argv[22];
@@ -152,7 +153,6 @@ int construct_argv()
void app_main(void)
{
(void) TAG;
#ifndef NO_CRYPT_BENCHMARK
/* when using atecc608a on esp32-wroom-32se */
#if defined(WOLFSSL_ESPWROOM32SE) && defined(HAVE_PK_CALLBACKS) \
@@ -167,7 +167,11 @@ void app_main(void)
atmel_set_slot_allocator(my_atmel_alloc, my_atmel_free);
#endif
#endif
#ifndef NO_CRYPT_TEST
wolf_crypt_task();
#endif
#ifndef NO_CRYPT_BENCHMARK
wolf_benchmark_task();
#else
#endif /* NO_CRYPT_BENCHMARK */
#endif
}

View File

@@ -8374,7 +8374,7 @@ static int string_matches(const char* arg, const char* str)
#endif /* MAIN_NO_ARGS */
#if defined(WOLFSSL_ESPIDF) || defined(_WIN32_WCE)
int wolf_benchmark_task( )
int wolf_benchmark_task(void)
#elif defined(MAIN_NO_ARGS)
int main()
#else

View File

@@ -1526,16 +1526,15 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
#ifndef NO_MAIN_DRIVER
/* so overall tests can pull in test function */
#ifdef WOLFSSL_ESPIDF
void app_main( )
#else
#ifdef HAVE_WOLFCRYPT_TEST_OPTIONS
int myoptind = 0;
char* myoptarg = NULL;
#endif
/* so overall tests can pull in test function */
#if defined(WOLFSSL_ESPIDF) || defined(_WIN32_WCE)
int wolf_test_task(void)
#else
int main(int argc, char** argv)
#endif
{