Add abort() implementation
Also reduces the IRAM footprint of the fatal exception handler, as only the prelude (which disables interrupts & enables the flash mapping) is in IRAM now. Closes #54, relevant to #133.
This commit is contained in:
parent
cf350efd8a
commit
36886412e6
9 changed files with 106 additions and 33 deletions
|
@ -305,7 +305,7 @@ static void test_system_interaction()
|
|||
}
|
||||
uint32_t ticks = xTaskGetTickCount() - start;
|
||||
printf("Timer interaction test PASSED after %dms.\n", ticks*portTICK_RATE_MS);
|
||||
while(1) {}
|
||||
abort();
|
||||
}
|
||||
|
||||
/* The following "sanity tests" are designed to try to execute every code path
|
||||
|
|
|
@ -115,7 +115,7 @@ void http_get_task(void *pvParameters)
|
|||
strlen(pers))) != 0)
|
||||
{
|
||||
printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret);
|
||||
while(1) {} /* todo: replace with abort() */
|
||||
abort();
|
||||
}
|
||||
|
||||
printf(" ok\n");
|
||||
|
@ -129,7 +129,7 @@ void http_get_task(void *pvParameters)
|
|||
if(ret < 0)
|
||||
{
|
||||
printf(" failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret);
|
||||
while(1) {} /* todo: replace with abort() */
|
||||
abort();
|
||||
}
|
||||
|
||||
printf(" ok (%d skipped)\n", ret);
|
||||
|
@ -138,7 +138,7 @@ void http_get_task(void *pvParameters)
|
|||
if((ret = mbedtls_ssl_set_hostname(&ssl, WEB_SERVER)) != 0)
|
||||
{
|
||||
printf(" failed\n ! mbedtls_ssl_set_hostname returned %d\n\n", ret);
|
||||
while(1) {} /* todo: replace with abort() */
|
||||
abort();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -85,7 +85,7 @@ void tls_server_task(void *pvParameters)
|
|||
strlen(pers))) != 0)
|
||||
{
|
||||
printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret);
|
||||
while(1) {} /* todo: replace with abort() */
|
||||
abort();
|
||||
}
|
||||
|
||||
printf(" ok\n");
|
||||
|
@ -99,7 +99,7 @@ void tls_server_task(void *pvParameters)
|
|||
if(ret < 0)
|
||||
{
|
||||
printf(" failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret);
|
||||
while(1) {} /* todo: replace with abort() */
|
||||
abort();
|
||||
}
|
||||
|
||||
printf(" ok (%d skipped)\n", ret);
|
||||
|
@ -109,7 +109,7 @@ void tls_server_task(void *pvParameters)
|
|||
if(ret != 0)
|
||||
{
|
||||
printf(" failed\n ! mbedtls_pk_parse_key returned - 0x%x\n\n", -ret);
|
||||
while(1) { } /*todo: replace with abort() */
|
||||
abort();
|
||||
}
|
||||
|
||||
printf(" ok\n");
|
||||
|
@ -134,7 +134,7 @@ void tls_server_task(void *pvParameters)
|
|||
if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 )
|
||||
{
|
||||
printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret );
|
||||
while(1) { }
|
||||
abort();
|
||||
}
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue