src/flash/nor: flash driver for RSL10

Add new flash driver for internal flash of onsemi RSL10 device.

Valgrind-clean. Clang AddressSanitizer shows no errors.

Signed-off-by: Toms Stūrmanis <toms.sturmanis@gmail.com>
Change-Id: I8030542cb9805e94f56d7a69404cef5d88d6dd5a
Reviewed-on: https://review.openocd.org/c/openocd/+/7115
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
Toms Stūrmanis
2022-08-11 20:22:09 +03:00
committed by Antonio Borneo
parent 7dff68f65d
commit ca52cfb2b3
8 changed files with 999 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
# SPDX-License-Identifier: GPL-2.0-or-later
BIN2C = ../../../../src/helper/bin2char.sh
CROSS_COMPILE ?= arm-none-eabi-
CC=$(CROSS_COMPILE)gcc
OBJCOPY=$(CROSS_COMPILE)objcopy
OBJDUMP=$(CROSS_COMPILE)objdump
CFLAGS = -static -nostartfiles -mlittle-endian -Wa,-EL
all: rom_launcher.inc
.PHONY: clean
%.elf: %.S
$(CC) $(CFLAGS) $< -o $@
%.lst: %.elf
$(OBJDUMP) -S $< > $@
%.bin: %.elf
$(OBJCOPY) -Obinary $< $@
%.inc: %.bin
$(BIN2C) < $< > $@
clean:
-rm -f *.elf *.lst *.bin *.inc

View File

@@ -0,0 +1,28 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/***************************************************************************
* Copyright (C) 2022 by Toms Stūrmanis *
* toms.sturmanis@gmail.com *
***************************************************************************/
.text
.syntax unified
.cpu cortex-m4
.thumb
.align 8
/*
* Params :
* r0-r2 = arguments
* r3 = target address in rom
*/
.thumb_func
.global _start
_start:
launch_program_in_rom:
// variables are already set, addres to jump is in r3
blx r3
exit:
// Wait for OpenOCD
bkpt #0x00

View File

@@ -0,0 +1,2 @@
/* Autogenerated with ../../../../src/helper/bin2char.sh */
0x98,0x47,0x00,0xbe,