Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 78a5f3f

Browse files
committed
mspm0: make flashing stub 'return' codes consistent with bool values that are returned from other branches of cortexm_run_stub
1 parent 63f0061 commit 78a5f3f

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/target/flashstub/mspm0.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ void mspm0_flash_write_stub(const uint32_t *const dest, const uint32_t *const sr
6565
while (!(MSPM0_FLASHCTL_STATCMD & MSPM0_FLASHCTL_STATCMD_DONE))
6666
continue;
6767
if (!(MSPM0_FLASHCTL_STATCMD & MSPM0_FLASHCTL_STATCMD_CMDPASS))
68-
stub_exit(1);
68+
stub_exit(0);
6969
}
7070

71-
stub_exit(0);
71+
stub_exit(1);
7272
}

‎src/target/flashstub/mspm0.stub‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0xB5F7, 0x0893, 0x2680, 0x2701, 0x9301, 0x2200, 0x2301, 0x02F6, 0x427F, 0x9C01, 0x4294, 0xD801, 0xBE00, 0xBDF7, 0x2480, 0x0224, 0x42A0, 0xD226, 0x001D, 0x0A84, 0x40A5, 0x43EC, 0x4D14, 0x602C, 0x2500, 0x4C14, 0x6025, 0x4C14, 0x6027, 0x4C14, 0x6023, 0x4C14, 0x6020, 0x680C, 0x46A4, 0x4665, 0x4C12, 0x6025, 0x684C, 0x46A4, 0x4665, 0x4C11, 0x6025, 0x4C11, 0x6023, 0x4C11, 0x6825, 0x421D, 0xD0FC, 0x6824, 0x07A4, 0xD400, 0xBE01, 0x3202, 0x3008, 0x3108, 0xE7CF, 0x2400, 0x42B0, 0xD201, 0x4D0A, 0xE7D8, 0x4D0A, 0xE7D6, 0xE1D0, 0x400C, 0xE108, 0x400C, 0xE124, 0x400C, 0xE104, 0x400C, 0xE120, 0x400C, 0xE130, 0x400C, 0xE134, 0x400C, 0xE100, 0x400C, 0xE3D0, 0x400C, 0xE1D4, 0x400C, 0xE1D8, 0x400C,
1+
0xB5F7, 0x0893, 0x9301, 0x2380, 0x2580, 0x021B, 0x2601, 0x469C, 0x2200, 0x2301, 0x02ED, 0x4276, 0x9C01, 0x4294, 0xD801, 0xBE01, 0xBDF7, 0x4560, 0xD222, 0x001F, 0x0A84, 0x40A7, 0x43FC, 0x4F13, 0x603C, 0x2700, 0x4C12, 0x6027, 0x4C12, 0x6026, 0x4C12, 0x6023, 0x4C12, 0x6020, 0x680F, 0x4C12, 0x6027, 0x684F, 0x4C11, 0x6027, 0x4C11, 0x6023, 0x4C11, 0x6827, 0x421F, 0xD0FC, 0x6824, 0x07A4, 0xD400, 0xBE00, 0x3202, 0x3008, 0x3108, 0xE7D5, 0x2400, 0x42A8, 0xD201, 0x4F0B, 0xE7DC, 0x4F0B, 0xE7DA, 0x46C0, 0xE1D0, 0x400C, 0xE108, 0x400C, 0xE124, 0x400C, 0xE104, 0x400C, 0xE120, 0x400C, 0xE130, 0x400C, 0xE134, 0x400C, 0xE100, 0x400C, 0xE3D0, 0x400C, 0xE1D4, 0x400C, 0xE1D8, 0x400C,

‎src/target/rp2040.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static bool rp_flash_write(
354354
if (target_mem32_write(target, RP_STUB_BUFFER_BASE, src, length))
355355
return false;
356356
return cortexm_run_stub(
357-
target, RP_SRAM_BASE, dest - flash->start, RP_STUB_BUFFER_BASE, length, spi_flash->page_size, 0U);
357+
target, RP_SRAM_BASE, dest - flash->start, RP_STUB_BUFFER_BASE, length, spi_flash->page_size, 0);
358358
}
359359

360360
static void rp_spi_chip_select(target_s *const target, const uint32_t state)

0 commit comments

Comments
 (0)