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>
This commit is contained in:
committed by
Antonio Borneo
parent
3061149545
commit
ff550ed0b0
@@ -1,21 +1,30 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
TARGET=max32xxx_write
|
||||
ENTRY=algo_write
|
||||
|
||||
BIN2C = ../../../../src/helper/bin2char.sh
|
||||
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
AS = $(CROSS_COMPILE)as
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
PREFIX=arm-none-eabi
|
||||
CFLAGS=-mthumb -mcpu=cortex-m4 -Wa,-mimplicit-it=thumb
|
||||
|
||||
all: max32xxx.inc
|
||||
all: $(TARGET).inc
|
||||
|
||||
%.elf: %.s
|
||||
$(AS) $< -o $@
|
||||
%.o: %.c
|
||||
$(PREFIX)-gcc $(CFLAGS) -Os -Wall -c ${<} -o ${@}
|
||||
|
||||
%.elf: %.o
|
||||
$(PREFIX)-ld -nostdlib --entry $(ENTRY) ${<} -o ${@}
|
||||
$(PREFIX)-size ${@}
|
||||
|
||||
%.bin: %.elf
|
||||
$(OBJCOPY) -Obinary $< $@
|
||||
$(PREFIX)-objcopy -O binary ${<} ${@}
|
||||
|
||||
%.inc: %.bin
|
||||
$(BIN2C) < $< > $@
|
||||
|
||||
%.dasm: %.o
|
||||
$(PREFIX)-objdump -S ${<} > ${TARGET}.dasm
|
||||
|
||||
clean:
|
||||
-rm -f *.elf *.bin *.inc
|
||||
rm -rf $(TARGET).bin $(TARGET).elf $(TARGET).o $(TARGET).dasm $(TARGET).inc
|
||||
|
||||
Reference in New Issue
Block a user