• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..10-Feb-2022-

benchmark-template/H10-Feb-2022-743663

example_server-template/H10-Feb-2022-604551

wolfcrypttest-template/H10-Feb-2022-506471

wolfssl-template-project/H10-Feb-2022-403401

README.mdH A D10-Feb-20223.7 KiB6044

include.amH A D10-Feb-20221 KiB2316

user_settings.hH A D10-Feb-20221.5 KiB7845

README.md

1## Project Summary
2|Item|Name/Version|
3|:--|:--|
4|Board|DK-S7G2|
5|Toolchain|GCC ARM Embedded|
6|SSP Version|1.7.0|
7
8
9## Building wolfSSL For DK-S7G2
10
11- First physically toggle the ENET1 and JTAG switch to on with the DK-S7G2 board.
12- Open e2studio and set the workspace to be wolfssl-X.X.X/IDE/Renesas/e2studio/DK-S7G2/
13- Create a Synergy library project named wolfssl "File->New->Synergy C/C++ Project", "Renesas Synergy C Library Project" then "Next", set wolfssl as the "Project Name" then "Next", set Board to "S7G2 DK" then "Next", finally select the BSP radius and click "Finish"
14- Copy configuration.xml and .project from wolfssl-X.X.X/IDE/Renesas/e2studio/DK-S7G2/wolfssl-template-project/ into the wolfssl-X.X.X/IDE/Renesas/e2studio/DK-S7G2/wolfssl directory
15- (optional but necessary for production) Add TRNG support by clicking on Threads tab and highlight HAL/Common click "New Stack > Driver > Crypto > TRNG Driver on r_sce_trng". Then comment out WOLFSSL_SCE_NO_TRNG define in wolfssl project src/user_settings.h
16- (optional SHA acceleration) Add HASH support by clicking on Threads tab and highlight HAL/Common click "New Stack > Driver > Crypto > HASH Driver on r_sce_hash". Then uncomment WOLFSSL_SCE_NO_HASH define in wolfssl project src/user_settings.h
17- (optional AES acceleration) Add the stacks for AES128, AES192, and AES256. Click on Threads tab and highlight HAL/Common click "New Stack > Driver > Crypto > AES Driver on r_sce_aes". Add three one for each key size and rename them to g_sce_aes_256, g_sce_aes_192, and g_sce_aes_128. Changing each to ECB chaining mode and the key length that matches the name.
18- Generate the changes by clicking on "Generate Project Content"
19- Exclude src/wolfcrypt/port and all src/wolfcrypt/*.S and src/wolfcrypt/*.asm files from the build
20- Exclude src/wolfcrypt/evp.c, src/wolfcrypt/misc.c and src/wolfssl/bio.c
21- Set the Preprocessor define in wolfssl proejct to have WOLFSSL_USER_SETTINGS. Right click on wolfssl project "Properties -> C/C++ Build -> GNU ARM Cross C Compiler -> Preprocessor" add WOLFSSL_USER_SETTINGS under "Defined symbols"
22- Set include to wolfssl directory. Right click on project "Properties -> C/C++Build -> GNU ARM Cross Compiler -> Includes". Add "${ProjDirPath}/../../../../.." and "${ProjDirPath}/../"
23- Build wolfssl by right clicking on wolfssl project and selecting "Build Project"
24
25## Example Projects and Building
26
27- Create a new Synergy project "Renesas Synergy C Project Using Synergy Library"
28- Set it to use the wolfssl library
29- Copy in the .cproject, .project and source file from the template desired i.e. wolfssl-X.X.X/IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/
30- Right click on the created project and select "Build Project"
31
32The example_server loops looking to accept connections and closes immediatly after a successful connection was made.
33
34The benchmark example tries to do a TCP connection to SERVER_IP on port 11112 and a TLS connection to SERVER_IP on port 11111 then does wolfCrypt benchmark collection.
35
36The wolfcryptest runs through all of the unit tests from wolfcrypt/test/test.c
37
38## Advanced Overriding Driver Name
39Defaults are set for when accessing the driver but the default names may not always work for an existing project. These are the macros and their defaults that could be mapped to other driver names:
40
41```
42/* For main SCE open and close */
43WOLFSSL_SCE_GSCE_HANDLE g_sce
44
45/* For AES operations */
46WOLFSSL_SCE_AES256_HANDLE g_sce_aes_256
47WOLFSSL_SCE_AES192_HANDLE g_sce_aes_192
48WOLFSSL_SCE_AES128_HANDLE g_sce_aes_128
49
50/* HASH operations */
51WOLFSSL_SCE_SHA256_HANDLE g_sce_hash_0
52
53/* TRNG access */
54WOLFSSL_SCE_TRNG_HANDLE g_sce_trng
55```
56
57
58An example of remapping a driver name would be the following added to a wolfSSL user_settings.h file:
59#define WOFSSL_SCE_SHA256_HANDLE my_sce_hash_driver
60