Commit a033ba65 authored by Maciej Perkowski's avatar Maciej Perkowski Committed by Anas Nashif
Browse files

twister: Add warning to the "-footprint-from-buildlog" flag

The flag won't work with sysbuild since there is no way to
reliably tell to a parser which data came from which image.

fixes: #74092

Signed-off-by: default avatarMaciej Perkowski <Maciej.Perkowski@nordicsemi.no>
parent d83a649a
Loading
Loading
Loading
Loading
+7 −2
Changes for scripts/pylib/twister/twisterlib/environment.py: 7 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -413,7 +413,8 @@ structure in the main Zephyr tree: boards/<vendor>/<board_name>/""")
        action = "store_true",
        help="Take ROM/RAM sections footprint summary values from the 'build.log' "
             "instead of 'objdump' results used otherwise."
             "Requires --enable-size-report or one of the baseline comparison modes.")
             "Requires --enable-size-report or one of the baseline comparison modes."
             "Warning: the feature will not work correctly with sysbuild.")

    compare_group_option = footprint_group.add_mutually_exclusive_group()

@@ -862,7 +863,11 @@ def parse_arguments(parser, args, options = None, on_init=True):
            sc.size_report()
        sys.exit(0)

    if options.footprint_from_buildlog and not options.enable_size_report:
    if options.footprint_from_buildlog:
        logger.warning("WARNING: Using --footprint-from-buildlog will give inconsistent results "
                       "for configurations using sysbuild. It is recommended to not use this flag "
                       "when building configurations using sysbuild.")
        if not options.enable_size_report:
            logger.error("--footprint-from-buildlog requires --enable-size-report")
            sys.exit(1)