2022-07-28 08:54 AM
i want implement software AES-GMC algotithen by STM32F030cct6. i download the CubeMX crypto library Ver 4.01. but it does not include driver for STM32F030 mcu. also in UM1924 manual is only about CubeMX crypto Ver 3.0?
please help me
thank you
Solved! Go to Solution.
2022-08-12 02:50 AM
Hi @sabaRamin ,
You can add the Cryptographic library by following these steps:
1. Right click on « Project » and choose « Add Group… ».
2. Create a new group called, for example, Middlewares/STM32Cryptographic.
3. Right click on « Middlewares/STM32Cryptographic » and Choose ‘Add Existing Files to Group Middlewares/STM32Cryptographic’…
4. Add libSTM32Cryptographic_CM3.a from "STM32CubeExpansion_Crypto_V4.0.1\Middlewares\ST\STM32_Cryptographic\lib"
5. Right click on “libSTM32Cryptographic_CM3.a�? in Keil project and choose “Options for file ‘libSTM32Cryptographic_CM3.a’…�?.
6. Add the path of “libSTM32Cryptographic_CM3.a�? and modify the file Type to Library file as shown in the below figure:7. Click Ok.
8. Select “Options for Target�?, choose C/C++ (AC6) and add path by following these steps in the below figures:
8. Copy the cmox_low_level_template.c file from the interface folder to your project specific source folder and rename it into cmox_low_level.c.
9. Right click on « Application/User » and Choose ‘Add Existing Files to Group Application/User’…
10. Add cmox_low_level.c file and tune this file by including the right STM32 HAL driver “#include "stm32f1xx_hal.h�? instead of the comment: /* #include “stm32<series>xx_hal.h
11. Update main.c by inserting # include “cmox_crypto.h�?
12. Check that no problem happened by rebuilding all files. There must be no error and no warning.
Also, I advise you to check this wiki page on getting started with the Cryptographic Library and precisely Section 2. Creating a project that embeds the Cryptographic Library.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-08-10 08:10 AM
Hi @sabaRamin and welcome to the Community :),
You can use:
You can find these libraries in "STM32CubeExpansion_Crypto_V4.0.1\Middlewares\ST\STM32_Cryptographic\lib" path.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-08-10 04:45 PM
Hello Saba,
The cryptolib is Cortex-Mx dependent as described above, choose the appropriate library that is already compiled for you embedded Cortex-M version in the STM32.
BR,
Younes
2022-08-10 11:36 PM
2022-08-12 02:50 AM
Hi @sabaRamin ,
You can add the Cryptographic library by following these steps:
1. Right click on « Project » and choose « Add Group… ».
2. Create a new group called, for example, Middlewares/STM32Cryptographic.
3. Right click on « Middlewares/STM32Cryptographic » and Choose ‘Add Existing Files to Group Middlewares/STM32Cryptographic’…
4. Add libSTM32Cryptographic_CM3.a from "STM32CubeExpansion_Crypto_V4.0.1\Middlewares\ST\STM32_Cryptographic\lib"
5. Right click on “libSTM32Cryptographic_CM3.a�? in Keil project and choose “Options for file ‘libSTM32Cryptographic_CM3.a’…�?.
6. Add the path of “libSTM32Cryptographic_CM3.a�? and modify the file Type to Library file as shown in the below figure:7. Click Ok.
8. Select “Options for Target�?, choose C/C++ (AC6) and add path by following these steps in the below figures:
8. Copy the cmox_low_level_template.c file from the interface folder to your project specific source folder and rename it into cmox_low_level.c.
9. Right click on « Application/User » and Choose ‘Add Existing Files to Group Application/User’…
10. Add cmox_low_level.c file and tune this file by including the right STM32 HAL driver “#include "stm32f1xx_hal.h�? instead of the comment: /* #include “stm32<series>xx_hal.h
11. Update main.c by inserting # include “cmox_crypto.h�?
12. Check that no problem happened by rebuilding all files. There must be no error and no warning.
Also, I advise you to check this wiki page on getting started with the Cryptographic Library and precisely Section 2. Creating a project that embeds the Cryptographic Library.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-08-18 06:19 AM
thank you Kaouthar. so complete answer. :)