feat(esp8266): supports "make size" and its family function

1. support "make size", "make size-files", "make size-components" and "make size-symbols"
2. add esp-idf style link file including "esp8266.ld" and "esp8266.project.ld.in"
3. add link advaced generation file to components of esp8266 and spi_flash
This commit is contained in:
dongheng
2019-07-26 19:12:25 +08:00
parent 896c93c48b
commit 301d857988
36 changed files with 8565 additions and 323 deletions

View File

@ -21,18 +21,18 @@ heap_region_t g_heap_region[HEAP_REGIONS_MAX];
*/
void heap_caps_init(void)
{
extern char _heap_start;
extern char _bss_end;
#ifndef CONFIG_SOC_FULL_ICACHE
extern char _lit4_end;
extern char _iram_end;
g_heap_region[0].start_addr = (uint8_t *)&_lit4_end;
g_heap_region[0].total_size = ((size_t)(0x4010C000 - (uint32_t)&_lit4_end));
g_heap_region[0].start_addr = (uint8_t *)&_iram_end;
g_heap_region[0].total_size = ((size_t)(0x4010C000 - (uint32_t)&_iram_end));
g_heap_region[0].caps = MALLOC_CAP_32BIT;
#endif
g_heap_region[HEAP_REGIONS_MAX - 1].start_addr = (uint8_t *)&_heap_start;
g_heap_region[HEAP_REGIONS_MAX - 1].total_size = ((size_t)(0x40000000 - (uint32_t)&_heap_start));
g_heap_region[HEAP_REGIONS_MAX - 1].start_addr = (uint8_t *)&_bss_end;
g_heap_region[HEAP_REGIONS_MAX - 1].total_size = ((size_t)(0x40000000 - (uint32_t)&_bss_end));
g_heap_region[HEAP_REGIONS_MAX - 1].caps = MALLOC_CAP_8BIT | MALLOC_CAP_32BIT | MALLOC_CAP_DMA;
esp_heap_caps_init_region(g_heap_region, HEAP_REGIONS_MAX);