Merge pull request #519 from ourairquality/heap-end-use-startup-stack

Reuse the startup stack for the dynamic heap.
This commit is contained in:
Ruslan V. Uss 2017-12-25 22:00:35 +05:00 committed by GitHub
commit a922ea0383
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -342,10 +342,16 @@ void sdk_wdt_init(void) {
sdk_pp_soft_wdt_init(); sdk_pp_soft_wdt_init();
} }
extern void *xPortSupervisorStackPointer;
// .irom0.text+0x474 // .irom0.text+0x474
void sdk_user_init_task(void *params) { void sdk_user_init_task(void *params) {
int phy_ver, pp_ver; int phy_ver, pp_ver;
/* The start up stack is not used after scheduling has started, so all of
* the top area of RAM which was stack can be used for the dynamic heap. */
xPortSupervisorStackPointer = (void *)0x40000000;
sdk_ets_timer_init(); sdk_ets_timer_init();
printf("\nESP-Open-SDK ver: %s compiled @ %s %s\n", OS_VERSION_STR, __DATE__, __TIME__); printf("\nESP-Open-SDK ver: %s compiled @ %s %s\n", OS_VERSION_STR, __DATE__, __TIME__);
phy_ver = RTCMEM_BACKUP[RTCMEM_BACKUP_PHY_VER] >> 16; phy_ver = RTCMEM_BACKUP[RTCMEM_BACKUP_PHY_VER] >> 16;