Fixes for stdlib.h inclusion
Refs: http://esp32.com/viewtopic.php?f=13&t=550 http://esp32.com/viewtopic.php?f=13&t=551 rmt.c should include stdlib.h for malloc, esp_bignum,c & https_request_main.c for abort(). FreeRTOSConfig.h is only including stdlib if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is set. However, it is included for abort() so needs to be included whenever CONFIG_FREERTOS_ASSERT_FAIL_ABORT is set. This change includes unconditionally in FreeRTOSConfig.h. This is to avoid this kind of bug where compiler errors are dependent on config. I suggest we don't change this to be more selective until we have 'make randomconfig' style tests in CI.
This commit is contained in:
parent
137c027274
commit
79646f41b5
4 changed files with 4 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#include <esp_types.h>
|
#include <esp_types.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
#include "freertos/xtensa_api.h"
|
#include "freertos/xtensa_api.h"
|
||||||
|
|
|
@ -108,6 +108,7 @@
|
||||||
|
|
||||||
/* configASSERT behaviour */
|
/* configASSERT behaviour */
|
||||||
#ifndef __ASSEMBLER__
|
#ifndef __ASSEMBLER__
|
||||||
|
#include <stdlib.h> /* for abort() */
|
||||||
#include "rom/ets_sys.h"
|
#include "rom/ets_sys.h"
|
||||||
|
|
||||||
#if defined(CONFIG_FREERTOS_ASSERT_DISABLE)
|
#if defined(CONFIG_FREERTOS_ASSERT_DISABLE)
|
||||||
|
@ -126,8 +127,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION
|
#if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION
|
||||||
#include <stdlib.h>
|
|
||||||
#include "rom/ets_sys.h"
|
|
||||||
#define UNTESTED_FUNCTION() { ets_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0)
|
#define UNTESTED_FUNCTION() { ets_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0)
|
||||||
#else
|
#else
|
||||||
#define UNTESTED_FUNCTION()
|
#define UNTESTED_FUNCTION()
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "mbedtls/bignum.h"
|
#include "mbedtls/bignum.h"
|
||||||
#include "rom/bigint.h"
|
#include "rom/bigint.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "freertos/event_groups.h"
|
#include "freertos/event_groups.h"
|
||||||
|
|
Loading…
Reference in a new issue