Support ELF files loadable with gdb

This commit is contained in:
Roland Dobai
2019-07-22 16:04:03 +02:00
committed by bot
parent 6a9288bc73
commit 5a916ce126
24 changed files with 387 additions and 55 deletions

View File

@@ -29,7 +29,7 @@ extern soc_reserved_region_t soc_reserved_memory_region_end;
These variables have the start and end of the data and static IRAM
area used by the program. Defined in the linker script.
*/
extern int _data_start, _static_data_end, _iram_start, _iram_end;
extern int _data_start, _heap_start, _iram_start, _iram_end;
/* static DRAM & IRAM chunks */
static const size_t EXTRA_RESERVED_REGIONS = 2;
@@ -67,8 +67,8 @@ static void s_prepare_reserved_regions(soc_reserved_region_t *reserved, size_t c
(count - EXTRA_RESERVED_REGIONS) * sizeof(soc_reserved_region_t));
/* Add the EXTRA_RESERVED_REGIONS at the beginning */
reserved[0].start = (intptr_t)&_data_start; /* DRAM used by data+bss */
reserved[0].end = (intptr_t)&_static_data_end;
reserved[0].start = (intptr_t)&_data_start; /* DRAM used by data+bss and possibly rodata */
reserved[0].end = (intptr_t)&_heap_start;
reserved[1].start = (intptr_t)&_iram_start; /* IRAM used by code */
reserved[1].end = (intptr_t)&_iram_end;