How to repartition SRAM while using trust zone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-06 1:58 AM
I am using the SBSFU example of "NUCLEO-L552ZE-Q" Projects.
I have added my application code to the NON-Secure application project.
When I see "Region_defs.h", in which nonsecure (NS_TOTAL_RAM_SIZE ) size is 192 KB whereas secure (S_TOTAL_RAM_SIZE)size is 64 KB. Most of my application code is in the non-secure application.
If I want to repartition SRAM is it possible? If yes how can I do it?
I want to increase the nonsecure ram size to 235 KB, Is it feasible?
- Labels:
-
STM32L5 Series
-
X-Cube-SBSFU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-06 9:05 PM
I have tried to increase the nonsecure ram to 235 KB, in this case, the application is not booting correctly. With 216KB of nonsecure ram, the application boots properly. Is there any other dependency as well to change nonsecure RAM size?
@Frantz LEFRERE , Can you please help me regarding this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-12 2:04 AM
Hi @PYada.1​ ,
you can refer to this document: https://www.st.com/resource/en/user_manual/dm00678763-getting-started-with-stm32cubel5-tfm-application-stmicroelectronics.pdf
Section 8.3.2 explains the SRAM memory layout.
I am not sure you can easily change this because:
- SRAM2 (64kB) is dedicated to the secure part.
- SRAM1 (192kB) is dedicated to the non-secure part
I am not sure you can shrink the secure part.
If you want to do so, you must:
- make sure you keep the security protections consistent (see Figure 54)
- make sure the secure RAM size is still sufficient
