NRF54LM20 CRACEN SilexPK Header Include Issues

On v3.2.3 and v3.3.0-preview3 we are having issues getting CRACEN to build without patching it.

There are a bunch of includes that use the wrong paths, pointing to files that have been moved.
Most of these have been fixed in v3.3.0-preview3, but there is at least one left.

/workspace/nrf/subsys/nrf_security/src/drivers/cracen/silexpk/target/hw/ba414/ec_curves.c:10:10: fatal error: ../../target/hw/ba414/regs_commands.h: No such file or directory
   10 | #include "../../target/hw/ba414/regs_commands.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

The correct line should just be `#include "regs_commands.h"`.

There is also an issue in "nrf/subsys/nrf_security/src/drivers/cracen/silexpk/silexpk.cmake". In this CMake file, it's adding "silexpk/target/baremetal_ba414e_with_ik" to the include path.
The problem with this is that in baremetal_ba414e_with_ik has a header file named "internal.h" (a very generic name). This is causing collisions with other software using the same name (wolfSSL in our case).

There is also "nrf_security/src/drivers/cracen/silexpk/src/blind.c", it brings in internal.h like this "#include "internal.h"", in this case, internal.h does not exist in the same directory.


How to fix
silexpk.cmake should not add files directly to the include list, replace "${CMAKE_CURRENT_LIST_DIR}/target/baremetal_ba414e_with_ik" with "${CMAKE_CURRENT_LIST_DIR}/target"
Also, all the files that use "internal.h" should be updated to "#include <baremetal_ba414e_with_ik/internal.h>".

This would bring it a little more inline with how sxsymcrypt has its internal.h (fixed in v3.3.0-preview3)

Question

What is the status of CRACEN code? It did/does not build in v3.2.3 and v3.3.0-preview3, is it meant to?

Environment
nrf54lm20A
v3.2.3 and v3.3.0-preview3

Files

I have added a patch file for clarity.
/cfs-file/__key/communityserver-discussions-components-files/4/cracen.patch

Parents Reply Children
No Data
Related