Skip to content
Snippets Groups Projects
Commit c1e94b77 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

esp8266/modesp: flash_user_start(): Support configuration with yaota8266.

It's pretty rough way to detect yaota8266 being used, but otherwise allows
to have a filesystem in such config.
parent 5d06a743
Branches
No related tags found
No related merge requests found
...@@ -629,8 +629,14 @@ STATIC mp_obj_t esp_flash_size(void) { ...@@ -629,8 +629,14 @@ STATIC mp_obj_t esp_flash_size(void) {
STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_size_obj, esp_flash_size); STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_size_obj, esp_flash_size);
STATIC mp_obj_t esp_flash_user_start(void) { STATIC mp_obj_t esp_flash_user_start(void) {
if ((*(uint32_t*)0x40200000 & 0xff00) == 0x100) {
// If there's just 1 loadable segment at the start of flash,
// we assume there's a yaota8266 bootloader.
return MP_OBJ_NEW_SMALL_INT(0x3c000 + 0x90000);
} else {
return MP_OBJ_NEW_SMALL_INT(0x90000); return MP_OBJ_NEW_SMALL_INT(0x90000);
} }
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_user_start_obj, esp_flash_user_start); STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_user_start_obj, esp_flash_user_start);
STATIC mp_obj_t esp_check_fw(void) { STATIC mp_obj_t esp_check_fw(void) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment