STM32WRAPPER4DBG : Add initial recipe
The tool is added is both native and nativesdk Can be compiled for the target Change-Id: Ibf34e7bb02e1f7ff0900c5a2a81417959fb11fe7
This commit is contained in:
parent
8391f7b748
commit
a16cd6da88
|
|
@ -100,6 +100,8 @@ FLASHLAYOUT_DESTDIR = "${IMGDEPLOYDIR}/${FLASHLAYOUT_SUBDIR}"
|
||||||
|
|
||||||
FLASHLAYOUT_BASENAME ??= "FlashLayout"
|
FLASHLAYOUT_BASENAME ??= "FlashLayout"
|
||||||
FLASHLAYOUT_SUFFIX ??= "tsv"
|
FLASHLAYOUT_SUFFIX ??= "tsv"
|
||||||
|
# Configure flashlayout file generation for stm32wrapper4dbg
|
||||||
|
ENABLE_FLASHLAYOUT_CONFIG_WRAPPER4DBG ??= "0"
|
||||||
|
|
||||||
FLASHLAYOUT_BOOTSCHEME_LABELS ??= ""
|
FLASHLAYOUT_BOOTSCHEME_LABELS ??= ""
|
||||||
FLASHLAYOUT_CONFIG_LABELS ??= ""
|
FLASHLAYOUT_CONFIG_LABELS ??= ""
|
||||||
|
|
@ -408,4 +410,37 @@ python do_create_flashlayout_config() {
|
||||||
(partition_enable, partition_id, partition_name, partition_type, partition_device, partition_offset, partition_bin2load))
|
(partition_enable, partition_id, partition_name, partition_type, partition_device, partition_offset, partition_bin2load))
|
||||||
except OSError:
|
except OSError:
|
||||||
bb.fatal('Unable to open %s' % (fl_file))
|
bb.fatal('Unable to open %s' % (fl_file))
|
||||||
|
|
||||||
|
if d.getVar("ENABLE_FLASHLAYOUT_CONFIG_WRAPPER4DBG") == "1":
|
||||||
|
bb.note('*** Loop for flashlayout for the wrapper for debug %s' % labeltype)
|
||||||
|
|
||||||
|
tmp_flashlayout_file = os.path.join(flashlayout_subfolder_path, "flashlayout.tmp")
|
||||||
|
debug_flashlayout = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
with open(flashlayout_file, 'r') as fl_file:
|
||||||
|
try:
|
||||||
|
with open(tmp_flashlayout_file, 'w') as debug_fl_file:
|
||||||
|
for line in fl_file:
|
||||||
|
if re.match('^.*/tf-a.*$', line) :
|
||||||
|
line_tmp = re.sub(r'(.*)/',r'\1/debug/debug-', line)
|
||||||
|
filename = re.sub(r'.*[\t ](.*)$',r'\1', line_tmp).strip()
|
||||||
|
if os.path.isfile(os.path.join(d.getVar('DEPLOY_DIR_IMAGE'), filename)):
|
||||||
|
line = line_tmp
|
||||||
|
debug_flashlayout = True
|
||||||
|
|
||||||
|
debug_fl_file.write('%s' % (line))
|
||||||
|
except OSError:
|
||||||
|
bb.fatal('Unable to open %s' % (debug_fl_file))
|
||||||
|
except OSError:
|
||||||
|
bb.fatal('Unable to open %s' % (fl_file))
|
||||||
|
if debug_flashlayout:
|
||||||
|
flashlayout_wrapper4dbg_subfolder_path = os.path.join(d.getVar('FLASHLAYOUT_DESTDIR'), bootscheme, "debug")
|
||||||
|
bb.utils.mkdirhier(flashlayout_wrapper4dbg_subfolder_path)
|
||||||
|
# Wrapper4dbg output filename
|
||||||
|
debug_flashlayout_file = os.path.join(flashlayout_wrapper4dbg_subfolder_path,d.expand("debug-${FLASHLAYOUT_BASENAME}%s%s.${FLASHLAYOUT_SUFFIX}" % (config_append, labeltype_append)))
|
||||||
|
bb.note(">>> Update tf-a in %s" % (debug_flashlayout_file))
|
||||||
|
os.rename(tmp_flashlayout_file, debug_flashlayout_file)
|
||||||
|
else:
|
||||||
|
os.remove(tmp_flashlayout_file)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,7 @@ IMAGE_SUMMARY_LIST_append = ":${STM32MP_USERFS_IMAGE}"
|
||||||
EXTRA_IMAGEDEPENDS_append = " \
|
EXTRA_IMAGEDEPENDS_append = " \
|
||||||
gdb-cross-arm \
|
gdb-cross-arm \
|
||||||
openocd-stm32mp-native \
|
openocd-stm32mp-native \
|
||||||
|
stm32wrapper4dbg-native \
|
||||||
sdcard-raw-tools-native \
|
sdcard-raw-tools-native \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
@ -192,6 +193,7 @@ ST_TOOLS_FOR_SDK = " \
|
||||||
nativesdk-gcc-arm-none-eabi \
|
nativesdk-gcc-arm-none-eabi \
|
||||||
nativesdk-binutils \
|
nativesdk-binutils \
|
||||||
nativesdk-openocd-stm32mp \
|
nativesdk-openocd-stm32mp \
|
||||||
|
nativesdk-stm32wrapper4dbg \
|
||||||
nativesdk-sdcard-raw-tools \
|
nativesdk-sdcard-raw-tools \
|
||||||
nativesdk-ncurses-libncursesw \
|
nativesdk-ncurses-libncursesw \
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
SUMMARY = "Wrapper for FSBL to debug TF-A U-Boot and bare metal on MP1"
|
||||||
|
LICENSE = "GPLv2+ | BSD-3-Clause"
|
||||||
|
|
||||||
|
require stm32wrapper4dbg_${PV}.inc
|
||||||
|
|
||||||
|
inherit nativesdk
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
SUMMARY = "Wrapper for FSBL to debug TF-A U-Boot and bare metal on MP1"
|
||||||
|
LICENSE = "GPLv2+ | BSD-3-Clause"
|
||||||
|
|
||||||
|
require stm32wrapper4dbg_${PV}.inc
|
||||||
|
|
||||||
|
inherit native
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
SUMMARY = "Wrapper for FSBL to debug TF-A U-Boot and bare metal on MP1"
|
||||||
|
LICENSE = "GPLv2+ | BSD-3-Clause"
|
||||||
|
|
||||||
|
require stm32wrapper4dbg_${PV}.inc
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
SUMMARY = "Wrapper for FSBL to debug TF-A U-Boot and bare metal on STM32MP1"
|
||||||
|
LICENSE = "GPLv2+ | BSD-3-Clause"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=7c996e24cb10a869efb08b521b20242f"
|
||||||
|
|
||||||
|
SRC_URI = "git://github.com/STMicroelectronics/stm32wrapper4dbg;protocol=https;branch=master"
|
||||||
|
SRCREV = "4b3887fa31754825b63608b7c88ce4cab472f6fd"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
SECTION = "devel"
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -D -m 0755 stm32wrapper4dbg -t ${D}${bindir}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue