Skip to content

Commit fe59870

Browse files
author
Cruz Monrreal
authored
Merge pull request #10047 from kfnta/nxp_secure_code_size
Reduce 32KB from LPC55S69_S binary size
2 parents 6906f39 + 546e33d commit fe59870

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

features/storage/kvstore/conf/tdb_internal/mbed_lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"LPC55S69_S": {
2323
"internal_size": "0x10000",
24-
"internal_base_address": "0x00030000"
24+
"internal_base_address": "0x00028000"
2525
}
2626
}
2727
}

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
** ###################################################################
2424
*/
2525

26-
define symbol NS_CODE_START = 0x00040000;
27-
define symbol NS_CODE_SIZE = 0x00058000;
26+
define symbol NS_CODE_START = 0x00038000;
27+
define symbol NS_CODE_SIZE = 0x00060000;
2828
define symbol NS_DATA_START = 0x20022000;
2929
define symbol NS_DATA_SIZE = 0x00022000;
3030

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/partition/flash_layout.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,27 @@
5959
/* Secure image */
6060
#define FLASH_AREA_IMAGE_0_OFFSET (FLASH_AREA_BL2_OFFSET + \
6161
FLASH_AREA_BL2_SIZE) // 0
62-
#define FLASH_AREA_IMAGE_0_SIZE (0x00030000 - FLASH_AREA_BL2_SIZE) // 0x00030000
62+
#define FLASH_AREA_IMAGE_0_SIZE (0x00028000 - FLASH_AREA_BL2_SIZE) // 0x00028000
6363

6464
#define FLASH_SST_AREA_OFFSET (FLASH_AREA_IMAGE_0_OFFSET + \
65-
FLASH_AREA_IMAGE_0_SIZE) // 0x00030000
65+
FLASH_AREA_IMAGE_0_SIZE) // 0x00028000
6666
#define FLASH_SST_AREA_SIZE (0x00010000) /* 64 KB */
6767

6868
/* Non-secure image */
6969
#define FLASH_AREA_IMAGE_1_OFFSET (FLASH_SST_AREA_OFFSET +\
70-
FLASH_SST_AREA_SIZE) // 0x00040000
71-
#define FLASH_AREA_IMAGE_1_SIZE (0x00058000)
70+
FLASH_SST_AREA_SIZE) // 0x00038000
71+
#define FLASH_AREA_IMAGE_1_SIZE (0x00060000)
7272

7373
#define FLASH_AREA_IMAGE_SCRATCH_OFFSET (FLASH_AREA_IMAGE_1_OFFSET +\
7474
FLASH_AREA_IMAGE_1_SIZE)
7575
#define FLASH_AREA_IMAGE_SCRATCH_SIZE (0)
7676

7777
/* Offset and size definition in flash area, used by assemble.py */
7878
#define SECURE_IMAGE_OFFSET 0x0
79-
#define SECURE_IMAGE_MAX_SIZE 0x00030000
79+
#define SECURE_IMAGE_MAX_SIZE 0x00028000
8080

81-
#define NON_SECURE_IMAGE_OFFSET 0x00040000
82-
#define NON_SECURE_IMAGE_MAX_SIZE 0x00058000
81+
#define NON_SECURE_IMAGE_OFFSET 0x00038000
82+
#define NON_SECURE_IMAGE_MAX_SIZE 0x00060000
8383

8484
/* Flash device name used by BL2 and SST
8585
* Name is defined in flash driver file: Driver_Flash.c

targets/targets.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,12 +2092,12 @@
20922092
"post_binary_hook": {"function": "LPC55S69Code.binary_hook"},
20932093
"secure_image_filename": "tfm.bin",
20942094
"overrides": {
2095-
"non-secure-rom-start": "0x00040000",
2096-
"non-secure-rom-size": "0x58000",
2095+
"non-secure-rom-start": "0x00038000",
2096+
"non-secure-rom-size": "0x60000",
20972097
"non-secure-ram-start": "0x20022000",
20982098
"non-secure-ram-size": "0x22000",
20992099
"secure-rom-start": "0x10000000",
2100-
"secure-rom-size": "0x30000",
2100+
"secure-rom-size": "0x28000",
21012101
"secure-ram-start": "0x30000000",
21022102
"secure-ram-size": "0x22000"
21032103
},
@@ -2128,12 +2128,12 @@
21282128
"deliver_to_target": "LPC55S69_NS",
21292129
"delivery_dir": "TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/prebuilt",
21302130
"overrides": {
2131-
"non-secure-rom-start": "0x00040000",
2132-
"non-secure-rom-size": "0x58000",
2131+
"non-secure-rom-start": "0x00038000",
2132+
"non-secure-rom-size": "0x60000",
21332133
"non-secure-ram-start": "0x20022000",
21342134
"non-secure-ram-size": "0x22000",
21352135
"secure-rom-start": "0x10000000",
2136-
"secure-rom-size": "0x30000",
2136+
"secure-rom-size": "0x28000",
21372137
"secure-ram-start": "0x30000000",
21382138
"secure-ram-size": "0x22000"
21392139
}

0 commit comments

Comments
 (0)