cmake: Move platform specific parts to platform dir
Rename Config*.cmake files to reflect the target they build for.
Add target specific configuration options to CMake files, and set the
proper values in the Config*.cmake files.
Eliminate direct inclusion of cmsis core_cm33.h
Update build instructions
Change-Id: I7f506b45e649ce3a0d31cc5784c6a01e1710935c
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/bl2/ext/mcuboot/scripts/assemble.py b/bl2/ext/mcuboot/scripts/assemble.py
index c2c5d18..b8b60eb 100644
--- a/bl2/ext/mcuboot/scripts/assemble.py
+++ b/bl2/ext/mcuboot/scripts/assemble.py
@@ -30,22 +30,22 @@
size_re = re.compile(r"^#define ([0-9A-Z_]+)_IMAGE_MAX_SIZE\s+((0x)?[0-9a-fA-F]+)")
class Assembly():
- def __init__(self, output):
+ def __init__(self, layout_path, output):
+ self.output = output
+ self.layout_path = layout_path
self.find_slots()
try:
os.unlink(output)
except OSError as e:
if e.errno != errno.ENOENT:
raise
- self.output = output
def find_slots(self):
offsets = {}
sizes = {}
scriptsDir = os.path.dirname(os.path.abspath(__file__))
- path = '../../../../platform/ext/target/mps2/an521/partition/flash_layout.h'
- configFile = os.path.join(scriptsDir, path)
+ configFile = os.path.join(scriptsDir, self.layout_path)
with open(configFile, 'r') as fd:
for line in fd:
@@ -81,6 +81,8 @@
def main():
parser = argparse.ArgumentParser()
+ parser.add_argument('-l', '--layout', required=True,
+ help='Location of the memory layout file')
parser.add_argument('-s', '--secure', required=True,
help='Unsigned secure image')
parser.add_argument('-n', '--non_secure',
@@ -89,7 +91,7 @@
help='Filename to write full image to')
args = parser.parse_args()
- output = Assembly(args.output)
+ output = Assembly(args.layout, args.output)
output.add_image(args.secure, "SECURE")