Skip to content

Commit e249150

Browse files
committed
M2354: Update to TF-M 1.3
1 parent 98f5a99 commit e249150

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ This document guides how to rebuild TF-M and integrate with Mbed on M2354.
55
### Downloading TF-M source
66

77
The M2354 port in TF-M must patch to enable TF-M integration with Mbed.
8-
For TF-M 1.2/Mbed integration on M2354, the [mainstream TF-M](https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git) is patched as follows:
8+
For TF-M 1.3/Mbed integration on M2354, the [mainstream TF-M](https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git) is patched as follows:
99
- Apply Mbed-enabled patch to `nuvoton/m2354` TF-M target.
10-
- Backport to base on [ARMmbed TF-M mbed-tfm-1.2](https://github.com/ARMmbed/trusted-firmware-m/tree/mbed-tfm-1.2).
1110

1211
Run the following command to fetch and switch to the intended version:
1312
```sh
14-
git clone https://github.com/OpenNuvoton/trusted-firmware-m -b nuvoton_mbed_m2354_tfm-1.2
13+
git clone https://github.com/OpenNuvoton/trusted-firmware-m -b nuvoton_mbed_m2354_tfm-1.3
1514
```
1615

1716
## Customizing TF-M

targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/partition/flash_layout.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,39 +124,39 @@
124124
* Note: Further documentation of these definitions can be found in the
125125
* TF-M PS Integration Guide.
126126
*/
127-
#define PS_FLASH_DEV_NAME Driver_FLASH0
127+
#define TFM_HAL_PS_FLASH_DRIVER Driver_FLASH0
128128

129129
/* In this target the CMSIS driver requires only the offset from the base
130130
* address instead of the full memory address.
131131
*/
132-
#define PS_FLASH_AREA_ADDR FLASH_PS_AREA_OFFSET
132+
#define TFM_HAL_PS_FLASH_AREA_ADDR FLASH_PS_AREA_OFFSET
133133
/* Dedicated flash area for PS */
134-
#define PS_FLASH_AREA_SIZE FLASH_PS_AREA_SIZE
134+
#define TFM_HAL_PS_FLASH_AREA_SIZE FLASH_PS_AREA_SIZE
135135
#define PS_SECTOR_SIZE FLASH_AREA_IMAGE_SECTOR_SIZE
136136
/* Number of PS_SECTOR_SIZE per block */
137-
#define PS_SECTORS_PER_BLOCK (0x1)
137+
#define TFM_HAL_PS_SECTORS_PER_BLOCK (0x1)
138138
/* Specifies the smallest flash programmable unit in bytes */
139-
#define PS_FLASH_PROGRAM_UNIT (0x4)
139+
#define TFM_HAL_PS_PROGRAM_UNIT (0x4)
140140

141141
/* Internal Trusted Storage (ITS) Service definitions
142142
* Note: Further documentation of these definitions can be found in the
143143
* TF-M ITS Integration Guide. The ITS should be in the internal flash, but is
144144
* allocated in the external flash just for development platforms that don't
145145
* have internal flash available.
146146
*/
147-
#define ITS_FLASH_DEV_NAME Driver_FLASH0
147+
#define TFM_HAL_ITS_FLASH_DRIVER Driver_FLASH0
148148

149149
/* In this target the CMSIS driver requires only the offset from the base
150150
* address instead of the full memory address.
151151
*/
152-
#define ITS_FLASH_AREA_ADDR FLASH_ITS_AREA_OFFSET
152+
#define TFM_HAL_ITS_FLASH_AREA_ADDR FLASH_ITS_AREA_OFFSET
153153
/* Dedicated flash area for ITS */
154-
#define ITS_FLASH_AREA_SIZE FLASH_ITS_AREA_SIZE
154+
#define TFM_HAL_ITS_FLASH_AREA_SIZE FLASH_ITS_AREA_SIZE
155155
#define ITS_SECTOR_SIZE FLASH_AREA_IMAGE_SECTOR_SIZE
156156
/* Number of ITS_SECTOR_SIZE per block */
157-
#define ITS_SECTORS_PER_BLOCK (0x1)
157+
#define TFM_HAL_ITS_SECTORS_PER_BLOCK (0x1)
158158
/* Specifies the smallest flash programmable unit in bytes */
159-
#define ITS_FLASH_PROGRAM_UNIT (0x4)
159+
#define TFM_HAL_ITS_PROGRAM_UNIT (0x4)
160160

161161
/* NV Counters definitions */
162162
#define TFM_NV_COUNTERS_AREA_ADDR FLASH_NV_COUNTERS_AREA_OFFSET

0 commit comments

Comments
 (0)