mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
boards.txt generator (#3722)
+ generates boards.rst + generate and replace boards section in package.json + generate ldscripts + new debug option: OOM + new led menu for generic board
This commit is contained in:
@ -39,52 +39,20 @@ bool ICACHE_FLASH_ATTR check_memleak_debug_enable(void)
|
||||
}
|
||||
*/
|
||||
|
||||
#define os_free free
|
||||
#define os_malloc malloc
|
||||
#define os_calloc calloc
|
||||
#define os_realloc realloc
|
||||
#define os_zalloc zalloc
|
||||
|
||||
#ifndef MEMLEAK_DEBUG
|
||||
#define MEMLEAK_DEBUG_ENABLE 0
|
||||
#define os_free(s) vPortFree(s, "", 0)
|
||||
#define os_malloc(s) pvPortMalloc(s, "", 0)
|
||||
#define os_calloc(s) pvPortCalloc(s, "", 0);
|
||||
#define os_realloc(p, s) pvPortRealloc(p, s, "", 0)
|
||||
#define os_zalloc(s) pvPortZalloc(s, "", 0)
|
||||
#else
|
||||
#define MEMLEAK_DEBUG_ENABLE 1
|
||||
|
||||
#define os_free(s) \
|
||||
do{\
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
vPortFree(s, mem_debug_file, __LINE__);\
|
||||
}while(0)
|
||||
|
||||
#define os_malloc(s) \
|
||||
({ \
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
pvPortMalloc(s, mem_debug_file, __LINE__); \
|
||||
})
|
||||
|
||||
#define os_calloc(s) \
|
||||
({ \
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
pvPortCalloc(s, mem_debug_file, __LINE__); \
|
||||
})
|
||||
|
||||
#define os_realloc(p, s) \
|
||||
({ \
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
pvPortRealloc(p, s, mem_debug_file, __LINE__); \
|
||||
})
|
||||
|
||||
#define os_zalloc(s) \
|
||||
({ \
|
||||
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
|
||||
pvPortZalloc(s, mem_debug_file, __LINE__); \
|
||||
})
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // __MEM_H__
|
||||
|
Reference in New Issue
Block a user