Help with HSE integration on S32K314 - Error in platform.h

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with HSE integration on S32K314 - Error in platform.h

1,175 Views
kerti1
Contributor III

Hi everyone,

I'm working with the S32K314 using S32 Design Studio 3.5. I started with a simple application project generated by the IDE, and I'm trying to add support for encryption using HSE.

For reference, I took the S32K3_HSE_DemoExamples_1_0_0 package and included the relevant folders like:

Framework, interfaces, drivers, services. However, I'm running into a build error related to the Platform SDK.

The error message itself is not very descriptive, but it seems to be triggered by something in platform.h. I suspect it could be due to a missing configuration, incompatible platform settings, or some defined variable not being set properly.

Has anyone else run into this issue when integrating HSE examples into a new project? Is there a recommended way to add HSE support (e.g., specific project settings or configuration files that need to be copied over)?

Any help would be appreciated!

Thanks in advance.

0 Kudos
Reply
8 Replies

989 Views
kerti1
Contributor III

Hi Davidtosenovjan,

the issue has been resolved. To integrate HSE into the existing project, I copied the /drivers, /framework, /include and /interface folders from the HSE example into the existing project. That does not work. I initially tried using RTD 5.0, but it does not support the required crypto libraries.

KeerthiT_1-1746518088722.png

 

I then switched to RTD 4.0, which includes crypto support. After that, I added the HSE and crypto in .mex file and included the necessary interface files to ensure a successful build. To make the differences between the versions clear, I also included images comparing the driver structures of RTD 4.0 and RTD 5.0.

KeerthiT_2-1746518213278.png

But now I am working on SHA-256, and I really can’t find any example project for it. Could you please let me know where I can find example projects for SHA-256 and CMAC? It would be very helpful if you could point me to the location or provide any references so I can understand how to use these functions properly.

 

0 Kudos
Reply

960 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

1) I am attaching an example SHA-512 based on mentioned code examples

Note that input message has been created by T32 script by

data.set 0x408000--0x4fc23f 0x61

2) In the mentioned demo examples there is an CMAC example in the following installation directory:

c:\NXP\S32K3_HSE_DemoExamples_1_0_0\S32K3_HSE_DemoExamples\Symmetric_Algorithms\S32K344_CMAC_GenVer\

Hope it helps

 

0 Kudos
Reply

939 Views
kerti1
Contributor III

Thanks for the attachments.

1. I am still in confusion whether the process i explained is the right approach for integrating HSE setup(Not HSE FW installation) in already existing project.

2. Another thing is the examples in the RTD/crypto/Hse_Ip_AesEncAsyncIrq_S32K344 are using different APIs and c:\NXP\S32K3_HSE_DemoExamples_1_0_0\S32K3_HSE_DemoExamples\Symmetric_Algorithms uses different APIs. Could you please let me know what is the difference. 

3. The examples projects shared by NXP does not contain configuration file(mex).

Sorry for asking the basic questions. 

 

0 Kudos
Reply

914 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

HSE_DEMOAPP
A comprehensive demo application designed to showcase the capabilities of the HSE (Hardware Security Engine) firmware on S32K3 MCUs. Primarily designed to work with Lauterbach Trace32 debugger.

S32K3_HSE_DemoExamples_1_0_0
A modularized version of the HSE_DEMOAPP, broken down into simpler, individual examples. Compatible with any debugger, including PEMicro and J-Link, making it more accessible.

To crypto drivers, pay attention to following thread:
https://community.nxp.com/t5/S32K/Application-with-HSE-and-SDK-3-0-0-without-Autosar/m-p/1834466/hig...

 

0 Kudos
Reply

1,149 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Could you be more specific? Thanks

0 Kudos
Reply

1,134 Views
kerti1
Contributor III
Hi Davidtosenovjan,
I am currently working on integrating encryption support into an existing project. I have successfully installed the HSE (Hardware Security Engine) on my device, and I was able to run the demoapp example without any issues. Furthermore, I made some changes to the demoapp, and it continued to work correctly — confirming that the HSE installation is successful.
Now, I would like to integrate the necessary HSE files into my existing application. This project is based on non-AUTOSAR. Could you please advise:
1. Which specific folders or files from the demoapp or HSE integration package need to be added to my existing project?
2. Which RTD (Real-Time Drivers) package should be installed to support HSE in a non-AUTOSAR environment?
Thank you for your support.
0 Kudos
Reply

998 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

You should apparently add header file for S32K314 that is currently not present in the example code. Otherwise HSE_PLATFORM should be HSE_S32K3X4

davidtosenovjan_0-1746444481138.png

 

0 Kudos
Reply

999 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Could you show specific error message or describe the issue?

0 Kudos
Reply