xtensa-build-zephyr.py: add -d option for debug build

Add a new -d option to support SOF debug build. This
option will add CONFIG_DEBUG=y to SOF configuration,
which is aligned with xtensa-build-all.sh script.

The -d option is a shortcut for '-o debug_overlay_path'.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
This commit is contained in:
Chao Song 2022-05-10 12:49:43 +08:00 committed by Liam Girdwood
parent 30431a19a9
commit de352e0beb
1 changed files with 7 additions and 0 deletions

View File

@ -128,6 +128,8 @@ def parse_args():
help="Build all currently supported platforms")
parser.add_argument("platforms", nargs="*", action=validate_platforms_arguments,
help="List of platforms to build")
parser.add_argument("-d", "--debug", required=False, action="store_true",
help="Enable debug build")
parser.add_argument("-i", "--ipc", required=False, choices=["IPC3", "IPC4"],
default="IPC3", help="IPC major version")
parser.add_argument("-j", "--jobs", required=False, type=int,
@ -399,6 +401,11 @@ def build_platforms():
overlay_filename = platform_dict.get("CONFIG_OVERLAY", "overlay.conf")
overlays.append(str(pathlib.Path(SOF_TOP, "overlays", platform, overlay_filename)))
# The '-d' option is a shortcut for '-o path_to_debug_overlay', we are good
# if both are provided, because it's no harm to merge the same overlay twice.
if args.debug:
overlays.append(str(pathlib.Path(SOF_TOP, "overlays", "common", "debug_overlay.conf")))
# The '-i IPC4' is a shortcut for '-o path_to_ipc4_overlay', we are good if both
# are provided, because it's no harm to merge the same overlay twice.
if args.ipc == "IPC4":