From 5311b90cf401e2982cc40df035eb475d3e9d91c6 Mon Sep 17 00:00:00 2001 From: Michael Schwarcz Date: Thu, 14 Mar 2019 15:33:14 +0200 Subject: [PATCH] LPC55S69_S: reduce ITS size to 32KB - Reduce LPC55S69 secure side ITS from 64KB to 32KB --- .../kvstore/conf/tdb_internal/mbed_lib.json | 2 +- .../TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf | 4 ++-- .../TARGET_LPC55S69/partition/flash_layout.h | 14 +++++++------- targets/targets.json | 8 ++++---- 4 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 48262ddc65..923503bb0a 100644 --- a/features/storage/kvstore/conf/tdb_internal/mbed_lib.json +++ b/features/storage/kvstore/conf/tdb_internal/mbed_lib.json @@ -20,7 +20,7 @@ "internal_base_address": "0x10038000" }, "LPC55S69_S": { - "internal_size": "0x10000", + "internal_size": "0x8000", "internal_base_address": "0x00028000" } } diff --git a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf index 4288763d89..b8cd5d6f73 100644 --- a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf +++ b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf @@ -23,8 +23,8 @@ ** ################################################################### */ -define symbol NS_CODE_START = 0x00038000; -define symbol NS_CODE_SIZE = 0x00060000; +define symbol NS_CODE_START = 0x00030000; +define symbol NS_CODE_SIZE = 0x00068000; define symbol NS_DATA_START = 0x20022000; define symbol NS_DATA_SIZE = 0x00022000; 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 d6f6f7b230..e462c6cea8 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 @@ -26,8 +26,8 @@ /* Flash layout on LPC55S69 without BL2: * * 0x0000_0000 Secure image primary - * 0x0003_0000 SST / ITS - * 0x0004_0000 Non-secure + * 0x0002_8000 SST / ITS + * 0x0003_0000 Non-secure */ /* This header file is included from linker scatter file as well, where only a @@ -63,12 +63,12 @@ #define FLASH_SST_AREA_OFFSET (FLASH_AREA_IMAGE_0_OFFSET + \ FLASH_AREA_IMAGE_0_SIZE) // 0x00028000 -#define FLASH_SST_AREA_SIZE (0x00010000) /* 64 KB */ +#define FLASH_SST_AREA_SIZE (0x00008000) /* 32 KB */ /* Non-secure image */ #define FLASH_AREA_IMAGE_1_OFFSET (FLASH_SST_AREA_OFFSET +\ - FLASH_SST_AREA_SIZE) // 0x00038000 -#define FLASH_AREA_IMAGE_1_SIZE (0x00060000) + FLASH_SST_AREA_SIZE) // 0x00030000 +#define FLASH_AREA_IMAGE_1_SIZE (0x00068000) #define FLASH_AREA_IMAGE_SCRATCH_OFFSET (FLASH_AREA_IMAGE_1_OFFSET +\ FLASH_AREA_IMAGE_1_SIZE) @@ -78,8 +78,8 @@ #define SECURE_IMAGE_OFFSET 0x0 #define SECURE_IMAGE_MAX_SIZE 0x00028000 -#define NON_SECURE_IMAGE_OFFSET 0x00038000 -#define NON_SECURE_IMAGE_MAX_SIZE 0x00060000 +#define NON_SECURE_IMAGE_OFFSET 0x00030000 +#define NON_SECURE_IMAGE_MAX_SIZE 0x00068000 /* 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 168cb2a03c..916080df47 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -2092,8 +2092,8 @@ "post_binary_hook": {"function": "LPC55S69Code.binary_hook"}, "secure_image_filename": "tfm.bin", "overrides": { - "non-secure-rom-start": "0x00038000", - "non-secure-rom-size": "0x60000", + "non-secure-rom-start": "0x00030000", + "non-secure-rom-size": "0x68000", "non-secure-ram-start": "0x20022000", "non-secure-ram-size": "0x22000", "secure-rom-start": "0x10000000", @@ -2128,8 +2128,8 @@ "deliver_to_target": "LPC55S69_NS", "delivery_dir": "TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/prebuilt", "overrides": { - "non-secure-rom-start": "0x00038000", - "non-secure-rom-size": "0x60000", + "non-secure-rom-start": "0x00030000", + "non-secure-rom-size": "0x68000", "non-secure-ram-start": "0x20022000", "non-secure-ram-size": "0x22000", "secure-rom-start": "0x10000000",