From f6ab217892f5a3ab0ee9e730763030f8d67f62a9 Mon Sep 17 00:00:00 2001 From: Michael Schwarcz Date: Mon, 11 Mar 2019 18:39:25 +0200 Subject: [PATCH] Reduce 32KB from LPC55S69_S binary size --- .../kvstore/conf/tdb_internal/mbed_lib.json | 2 +- .../TARGET_LPC55S69/partition/flash_layout.h | 14 +++++++------- targets/targets.json | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/features/storage/kvstore/conf/tdb_internal/mbed_lib.json b/features/storage/kvstore/conf/tdb_internal/mbed_lib.json index 8064bc0ba0..caa61b9967 100644 --- a/features/storage/kvstore/conf/tdb_internal/mbed_lib.json +++ b/features/storage/kvstore/conf/tdb_internal/mbed_lib.json @@ -21,7 +21,7 @@ }, "LPC55S69_S": { "internal_size": "0x10000", - "internal_base_address": "0x00030000" + "internal_base_address": "0x00028000" } } } diff --git a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/partition/flash_layout.h b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/partition/flash_layout.h index 8eeec80a4e..d6f6f7b230 100644 --- a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/partition/flash_layout.h +++ b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/partition/flash_layout.h @@ -59,16 +59,16 @@ /* Secure image */ #define FLASH_AREA_IMAGE_0_OFFSET (FLASH_AREA_BL2_OFFSET + \ FLASH_AREA_BL2_SIZE) // 0 -#define FLASH_AREA_IMAGE_0_SIZE (0x00030000 - FLASH_AREA_BL2_SIZE) // 0x00030000 +#define FLASH_AREA_IMAGE_0_SIZE (0x00028000 - FLASH_AREA_BL2_SIZE) // 0x00028000 #define FLASH_SST_AREA_OFFSET (FLASH_AREA_IMAGE_0_OFFSET + \ - FLASH_AREA_IMAGE_0_SIZE) // 0x00030000 + FLASH_AREA_IMAGE_0_SIZE) // 0x00028000 #define FLASH_SST_AREA_SIZE (0x00010000) /* 64 KB */ /* Non-secure image */ #define FLASH_AREA_IMAGE_1_OFFSET (FLASH_SST_AREA_OFFSET +\ - FLASH_SST_AREA_SIZE) // 0x00040000 -#define FLASH_AREA_IMAGE_1_SIZE (0x00058000) + FLASH_SST_AREA_SIZE) // 0x00038000 +#define FLASH_AREA_IMAGE_1_SIZE (0x00060000) #define FLASH_AREA_IMAGE_SCRATCH_OFFSET (FLASH_AREA_IMAGE_1_OFFSET +\ FLASH_AREA_IMAGE_1_SIZE) @@ -76,10 +76,10 @@ /* Offset and size definition in flash area, used by assemble.py */ #define SECURE_IMAGE_OFFSET 0x0 -#define SECURE_IMAGE_MAX_SIZE 0x00030000 +#define SECURE_IMAGE_MAX_SIZE 0x00028000 -#define NON_SECURE_IMAGE_OFFSET 0x00040000 -#define NON_SECURE_IMAGE_MAX_SIZE 0x00058000 +#define NON_SECURE_IMAGE_OFFSET 0x00038000 +#define NON_SECURE_IMAGE_MAX_SIZE 0x00060000 /* Flash device name used by BL2 and SST * Name is defined in flash driver file: Driver_Flash.c diff --git a/targets/targets.json b/targets/targets.json index 9d3d39efe7..b4ba988c16 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -2092,12 +2092,12 @@ "post_binary_hook": {"function": "LPC55S69Code.binary_hook"}, "secure_image_filename": "tfm.bin", "overrides": { - "non-secure-rom-start": "0x00040000", - "non-secure-rom-size": "0x58000", + "non-secure-rom-start": "0x00038000", + "non-secure-rom-size": "0x60000", "non-secure-ram-start": "0x20022000", "non-secure-ram-size": "0x22000", "secure-rom-start": "0x10000000", - "secure-rom-size": "0x30000", + "secure-rom-size": "0x28000", "secure-ram-start": "0x30000000", "secure-ram-size": "0x22000" }, @@ -2128,12 +2128,12 @@ "deliver_to_target": "LPC55S69_NS", "delivery_dir": "TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/prebuilt", "overrides": { - "non-secure-rom-start": "0x00040000", - "non-secure-rom-size": "0x58000", + "non-secure-rom-start": "0x00038000", + "non-secure-rom-size": "0x60000", "non-secure-ram-start": "0x20022000", "non-secure-ram-size": "0x22000", "secure-rom-start": "0x10000000", - "secure-rom-size": "0x30000", + "secure-rom-size": "0x28000", "secure-ram-start": "0x30000000", "secure-ram-size": "0x22000" }