We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e35068 commit 27144b5Copy full SHA for 27144b5
src/target/msp432p4.c
@@ -268,7 +268,7 @@ static bool msp432_flash_write(
268
DEBUG_WARN("Flash protect: 0x%08" PRIX32 "\n", target_mem32_read32(target, mf->flash_protect_register));
269
270
/* Prepare input data */
271
- uint32_t *regs = alloca(target->regs_size / sizeof(uint32_t)); // Use of VLA
+ uint32_t regs[CORTEXM_GENERAL_REG_COUNT + CORTEX_FLOAT_REG_COUNT];
272
target_regs_read(target, regs);
273
regs[0] = SRAM_WRITE_BUFFER; // Address of buffer to be flashed in R0
274
regs[1] = dest; // Flash address to be write to in R1
0 commit comments