Skip to content

Commit

Permalink
loaders/esp32c3: init flash before the cache initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
erhankur committed May 24, 2024
1 parent 6f4d901 commit c54b0e5
Show file tree
Hide file tree
Showing 6 changed files with 907 additions and 894 deletions.
4 changes: 2 additions & 2 deletions contrib/loaders/flash/espressif/esp32c3/stub_flasher_chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ void stub_flash_state_prepare(struct stub_flash_state *state)
if (spiconfig == 0 && (strapping & 0x1c) == 0x08)
spiconfig = 1; /* HSPI flash mode */

esp_rom_spiflash_attach(spiconfig, 0);

state->cache_enabled = stub_is_cache_enabled();
if (!state->cache_enabled) {
STUB_LOGI("Cache needs to be enabled\n");
stub_cache_init();
}

esp_rom_spiflash_attach(spiconfig, 0);
}

void stub_flash_state_restore(struct stub_flash_state *state)
Expand Down
381 changes: 190 additions & 191 deletions contrib/loaders/flash/espressif/esp32c3/stub_flasher_code.inc

Large diffs are not rendered by default.

941 changes: 474 additions & 467 deletions contrib/loaders/flash/espressif/esp32c3/stub_flasher_code_wlog.inc

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions contrib/loaders/flash/espressif/esp32c3/stub_flasher_data.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x02,0x38,0x40,
0x58,0x02,0x38,0x40,0x66,0x02,0x38,0x40,0x4a,0x02,0x38,0x40,0xd8,0x12,0x38,0x40,
0xf8,0x12,0x38,0x40,0xe2,0x12,0x38,0x40,0xec,0x12,0x38,0x40,0x30,0x1a,0x38,0x40,
0x10,0x13,0x38,0x40,0x7c,0x13,0x38,0x40,0xe8,0x13,0x38,0x40,0x30,0x1a,0x38,0x40,
0xfe,0x12,0x38,0x40,0x04,0x13,0x38,0x40,0x4a,0x14,0x38,0x40,0x00,0x00,0x04,0x00,
0x58,0x02,0x38,0x40,0x66,0x02,0x38,0x40,0x4a,0x02,0x38,0x40,0xd4,0x12,0x38,0x40,
0xf4,0x12,0x38,0x40,0xde,0x12,0x38,0x40,0xe8,0x12,0x38,0x40,0x2c,0x1a,0x38,0x40,
0x0c,0x13,0x38,0x40,0x78,0x13,0x38,0x40,0xe4,0x13,0x38,0x40,0x2c,0x1a,0x38,0x40,
0xfa,0x12,0x38,0x40,0x00,0x13,0x38,0x40,0x46,0x14,0x38,0x40,0x00,0x00,0x04,0x00,
0x00,0x00,0x08,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x40,0x00,
0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
Expand Down
Loading

0 comments on commit c54b0e5

Please sign in to comment.