feat(bootloader): Add startup function

This commit is contained in:
Dong Heng
2018-06-19 17:02:34 +08:00
parent c7c96e0066
commit 1cde2f5f81
9 changed files with 129 additions and 65 deletions

View File

@ -807,15 +807,20 @@ void bootloader_utility_load_image(const esp_image_metadata_t* image_data)
}
#endif
// ESP_LOGI(TAG, "Disabling RNG early entropy source...");
// bootloader_random_disable();
// copy loaded segments to RAM, set up caches for mapped segments, and start application
// unpack_load_app(image_data);
#ifdef BOOTLOADER_UNPACK_APP
ESP_LOGI(TAG, "Disabling RNG early entropy source...");
bootloader_random_disable();
copy loaded segments to RAM, set up caches for mapped segments, and start application
unpack_load_app(image_data);
#else
Cache_Read_Enable(0, 0, 0);
// ToDo: jump to application code.
void (*user_start)(void);
user_start = (void *)image_data->image.entry_addr;
user_start();
#endif /* BOOTLOADER_UNPACK_APP */
}
#endif