Merge pull request #109 from jepler/uf2-self-install-when-blank
mimxrt10xx: Also self-install when FCFB not valid
This commit is contained in:
commit
7cd271ec08
2 changed files with 3 additions and 3 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -97,7 +97,7 @@ jobs:
|
|||
id: idf-cache
|
||||
with:
|
||||
path: ${{ github.workspace }}/.idf_tools
|
||||
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/lib/esp-idf/HEAD') }}-20201222
|
||||
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/lib/esp-idf/HEAD') }}-20210412
|
||||
|
||||
- name: Install IDF tools
|
||||
if: steps.idf-cache.outputs.cache-hit != 'true'
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ void board_flash_init(void)
|
|||
// TinyUF2 will copy its image to flash if Boot Mode is '01' i.e Serial Download Mode (BootRom)
|
||||
// Normally it is done once by SDPHost or used to recover an corrupted boards
|
||||
uint32_t const boot_mode = (SRC->SBMR2 & SRC_SBMR2_BMOD_MASK) >> SRC_SBMR2_BMOD_SHIFT;
|
||||
if (boot_mode == 1)
|
||||
bool fcfb_valid = (*(uint32_t*) FCFB_START_ADDRESS == FLEXSPI_CFG_BLK_TAG);
|
||||
if (boot_mode == 1 || !fcfb_valid)
|
||||
{
|
||||
TUF2_LOG1("BootMode = 01: ");
|
||||
write_tinyuf2_to_flash();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue