1
0
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:
david gauchard
2018-01-08 15:06:01 +01:00
committed by Develo
parent 4b319d9b0c
commit 28253c5bd3
8 changed files with 1772 additions and 155 deletions

View File

@ -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__