@@ -0,0 +1,2323 @@
+#!/usr/bin/env python3%0A#%0A# Copyright (c) 2019, Arm Limited. All rights reserved.%0A#%0A# SPDX-License-Identifier: BSD-3-Clause%0A#%0A%0Aimport re%0Aimport os%0Aimport sys%0Aimport operator%0A%0A# List of folder/map to parse%0Abl_images = %5B'bl1', 'bl2', 'bl31'%5D%0A%0A# List of symbols to search for%0Ablx_symbols = %5B'__BL1_RAM_START__', '__BL1_RAM_END__',%0A                '__BL2_END__',%0A                '__BL31_END__',%0A                '__TEXT_START__', '__TEXT_END__',%0A                '__RODATA_START__', '__RODATA_END__',%0A                '__DATA_START__', '__DATA_END__',%0A                '__STACKS_START__', '__STACKS_END__',%0A                '__BSS_END',%0A               %5D%0A%0A# Regex to extract address from map file%0Aaddress_pattern = re.compile(r%22%5Cb0x%5Cw*%22)%0A%0A# List of found element: %5Baddress, symbol, file%5D%0Aaddress_list = %5B%5D%0A%0A# Get the directory from command line or use a default one%0Aif len(sys.argv) %3E= 2:%0A    build_dir = sys.argv%5B1%5D%0Aelse:%0A    build_dir = 'build/fvp/debug'%0A%0A# Extract all the required symbols from the map files%0Afor image in bl_images:%0A    file_path = os.path.join(build_dir, image, '%7B%7D.map'.format(image))%0A    if os.path.isfile(file_path):%0A        with open (file_path, 'rt') as mapfile:%0A            for line in mapfile:%0A                for symbol in blx_symbols:%0A                    if line.find(symbol) %3E 0 and line.find(%22ASSERT%22) %3C 0:%0A                        # Extract address from line%0A                        match = address_pattern.search(line)%0A                        if match:%0A                            address_list.append(%5Bmatch.group(0), symbol, image%5D)%0A%0A# Sort by address%0Aaddress_list.sort(key=operator.itemgetter(0))%0A%0A# Generate memory view%0Aprint('%7B:-%5E87%7D'.format('Memory Map from: ' + build_dir))%0Afor address in reversed(address_list):%0A    if %22bl1%22 in address%5B2%5D:%0A        print(address%5B0%5D, '+%7B:-%5E20%7D+ %7C%7B:%5E20%7D%7C %7C%7B:%5E20%7D%7C'.format(address%5B1%5D, '', ''))%0A    elif %22bl2%22 in address%5B2%5D:%0A        print(address%5B0%5D, '%7C%7B:%5E20%7D%7C +%7B:-%5E20%7D+ %7C%7B:%5E20%7D%7C'.format('', address%5B1%5D, ''))%0A    elif %22bl31%22 in address%5B2%5D:%0A        print(address%5B0%5D, '%7C%7B:%5E20%7D%7C %7C%7B:%5E20%7D%7C +%7B:-%5E20%7D+'.format('', '', address%5B1%5D))%0A    else:%0A        print(address%5B0%5D, '%7C%7B:%5E20%7D%7C %7C%7B:%5E20%7D%7C +%7B:-%5E20%7D+'.format('', '', address%5B1%5D))%0A%0Aprint('%7B:%5E20%7D%7B:_%5E20%7D   %7B:_%5E20%7D   %7B:_%5E20%7D'.format('', '', '', ''))%0Aprint('%7B:%5E20%7D%7B:%5E20%7D   %7B:%5E20%7D   %7B:%5E20%7D'.format('address', 'bl1', 'bl2', 'bl31'))%0A

Add show_memory script