cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a source file to secure folder of STM32U5 Azure-IOT example

SKuma.42
Associate

I downloaded Azure-IOT example for STM32U5 which works on IAR. I am trying to add a c file to secure application. I am able to compile and even see that function is hit while I debug.

After this function call, the board is getting rebooted with below logs

[INF] Flash operation: Op=0x0, Area=0x0, Address=0x0

[INF] Starting bootloader

[INF] Checking BL2 NV area

[INF] Checking BL2 NV area header

[INF] Checking BL2 NV Counter consistency

[INF] Consistent BL2 NV Counter 3 = 0x1000000

I want to understand the way to add a source file to secure TFM application.

2 REPLIES 2
CMYL
ST Employee

Hi @Community member​ 

Just after rebooting can you check while the content of SRAM secure or Flash secure is erased or not?

May be the functions you are calling are considered as sort of attack?

BR

Hi @Younes LAHBIB​ 

Thanks for the reply, I am able to figure it. If I add app_rot for all the file names which I added, it is working fine.

The current example which I took has the app-rot in secure folder and not in the partitions.

Now I am trying to create a new partition and add my files as a secure service similar to crypto in trustedfirmware/secure_fw/partitions folder.

I followed Adding Secure Partition — Trusted Firmware-M v1.6.1 documentation and took crypto partition as an example and made all the changes. Now I am getting the below error

 Error[Lp011]: section placement failed            

                unable to complete "place at" directives with a total estimated minimum size of 0x3'5506 bytes in <[0xc02'8400-0xc05'3c7f]> (total space 0x2'b880).            

    Error[Lp015]: section placement failure: overcommitted content in [0xc02'8400-0xc05'3c7f]

Note: I added a file inside a folder which contains a single api in it, which does nothing.

Is there any memory configuration which was required while adding a partition..??

-Santhosh