1 /* 2 * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /* 8 * All functions presented here are stubs for the POSIX/Linux implementation of FReeRTOS. 9 * They are meant to allow to compile, but they DO NOT return any meaningful value. 10 */ 11 12 #include <stdlib.h> 13 #include <stdint.h> 14 #include "esp_private/system_internal.h" 15 #include "esp_heap_caps.h" 16 17 // dummy, we should never get here on Linux esp_restart_noos_dig(void)18void esp_restart_noos_dig(void) 19 { 20 abort(); 21 } 22 esp_get_free_heap_size(void)23uint32_t esp_get_free_heap_size( void ) 24 { 25 return heap_caps_get_free_size( MALLOC_CAP_DEFAULT ); 26 } 27 esp_get_free_internal_heap_size(void)28uint32_t esp_get_free_internal_heap_size( void ) 29 { 30 return heap_caps_get_free_size( MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL ); 31 } 32 esp_get_minimum_free_heap_size(void)33uint32_t esp_get_minimum_free_heap_size( void ) 34 { 35 return heap_caps_get_minimum_free_size( MALLOC_CAP_DEFAULT ); 36 } 37 esp_get_idf_version(void)38const char *esp_get_idf_version(void) 39 { 40 return IDF_VER; 41 } 42 esp_system_abort(const char * details)43void __attribute__((noreturn)) esp_system_abort(const char *details) 44 { 45 exit(1); 46 } 47