0
0
mirror of https://git.code.sf.net/p/openocd/code synced 2025-10-06 14:29:48 +00:00
Files
Henrik Mau ff550ed0b0 flash/nor/max32xxx: Fix failing flash step for internal flash
When attempting to write to internal flash the flashing step fails with
'Error: timeout waiting for algorithm, a target reset is recommended'.
Updated flashing algorithm for MAX32xxx to fix this.

Change-Id: I51350c1320c9699ddcf6cb28d9299538bece4c4f
Signed-off-by: Henrik Mau <henrik.mau@analog.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8794
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: zapb <dev@zapb.de>
2025-08-17 13:29:12 +00:00

31 lines
602 B
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
TARGET=max32xxx_write
ENTRY=algo_write
BIN2C = ../../../../src/helper/bin2char.sh
PREFIX=arm-none-eabi
CFLAGS=-mthumb -mcpu=cortex-m4 -Wa,-mimplicit-it=thumb
all: $(TARGET).inc
%.o: %.c
$(PREFIX)-gcc $(CFLAGS) -Os -Wall -c ${<} -o ${@}
%.elf: %.o
$(PREFIX)-ld -nostdlib --entry $(ENTRY) ${<} -o ${@}
$(PREFIX)-size ${@}
%.bin: %.elf
$(PREFIX)-objcopy -O binary ${<} ${@}
%.inc: %.bin
$(BIN2C) < $< > $@
%.dasm: %.o
$(PREFIX)-objdump -S ${<} > ${TARGET}.dasm
clean:
rm -rf $(TARGET).bin $(TARGET).elf $(TARGET).o $(TARGET).dasm $(TARGET).inc