Fix to allow XTIME override for Xilinx. Spelling fixes in Xilinx README.md.

This commit is contained in:
David Garske
2020-09-01 14:17:12 -07:00
parent eb466668ce
commit 63e993b9c1
3 changed files with 12 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
# Common Gotcha's
- If compiling all code togther (ie no sperate wolfssl library) than the -fPIC compiler flag should be used. Without using -fPIC in this build setup there could be unexpected failures.
- If compiling all code together (ie no separate wolfssl library) than the -fPIC compiler flag should be used. Without using -fPIC in this build setup there could be unexpected failures.
- If building with ARMv8 crypto extensions then the compiler flags "-mstrict-align -mcpu=generic+crypto" must be used.
- Check that enough stack and heap memory is set for the operations if a crash or stall happens.
@@ -20,14 +20,14 @@ To use this example project:
- File->New->Platform Project
- Setting "Project name" to standalone_bsp_0, then click "Next"
- Select the "Create from hardware specification" radius and click "Next"
- "Browse..." to the desired XSA file for the hardare
- "Browse..." to the desired XSA file for the hardware
- (optional) change Processor to R5 now
- click "Finish"
3. (optional) If building for TLS support than expand the standalone_bsp_0 project, double click on platform_spr, Expand the cpu (i.e psu_cortexa53_0), click on Board Support Package, select the "Modify BSP Settings..." box and click on lwip211. Note that the api_mode should be changed from RAW API to SOCKET API.
4. Right click on the standalone_bsp_0 project and click on "Build Project"
5. Import the wolfcrypt example project "File->Import->Eclipse workspace or zip file"
6. Uncheck "Copy projects into workspace"
7. Select the root directory of wolfssl/IDE/XilinxSDK/2019_2, and select wolfCrypt_example and wolfCrypt_example_system. Then click "Finish"
7. Select the root directory of `wolfssl/IDE/XilinxSDK/2019_2`, and select `wolfCrypt_example` and `wolfCrypt_example_system`. Then click "Finish"
# Steps For Creating Project From Scratch
@@ -37,7 +37,7 @@ To use this example project:
- File->New->Platform Project
- Setting "Project name" to standalone_bsp_0, then click "Next"
- Select the "Create from hardware specification" radius and click "Next"
- "Browse..." to the desired XSA file for the hardare
- "Browse..." to the desired XSA file for the hardware
- (optional) change Processor to R5 now
- click "Finish"
3. (optional) If building for TLS support than expand the standalone_bsp_0 project, double click on platform_spr, Expand the cpu (i.e psu_cortexa53_0), click on Board Support Package, select the "Modify BSP Settings..." box and click on lwip211. Note that the api_mode should be changed from RAW API to SOCKET API.
@@ -49,10 +49,10 @@ To use this example project:
9. Expand the wolfCrypt_example project and right click on the folder "src".
10. Select "Import Sources" and set the "From directory" to be the wolfssl root directory.
11. Select the folders to import as ./src, ./IDE/XilinxSDK, ./wolfcrypt/benchmark, ./wolfcrypt/test, ./wolfcrypt/src
12. (optional) Expand the Advanced tabe and select "Create links in workspace"
12. (optional) Expand the Advanced table and select "Create links in workspace"
13. Click on "Finish"
14. Expand the wolfcrypt/src directory and exlude all .S files from the build
15. Right click on the wolfCrypt_example project and got to Properties. Set the macro WOLFSSL_USER_SETTINGS in C/C++ Build->Settings->ARM v8 gcc compiler->Symbols
14. Expand the wolfcrypt/src directory and exclude all .S files from the build
15. Right click on the wolfCrypt_example project and got to Properties. Set the macro `WOLFSSL_USER_SETTINGS` in C/C++ Build->Settings->ARM v8 gcc compiler->Symbols
16. Set the include path for finding user_settings.h by going to the Properties and setting it in C/C++ Build->Settings->ARM v8 gcc compiler->Directories. This is to the directory wolfssl/IDE/XilinxSDK
17. Set the include path for finding wolfSSL headers. To the root directory wolfssl
18. Add compiler flags "-fPIC -mstrict-align -mcpu=generic+crypto" to the project properties. C/C++ Build->Settings->ARM v8 gcc compiler->Miscellaneous

View File

@@ -2150,7 +2150,7 @@ time_t XTIME(time_t * timer)
#if defined(WOLFSSL_XILINX)
#include "xrtcpsu.h"
time_t XTIME(time_t * timer)
time_t xilinx_time(time_t * timer)
{
time_t sec = 0;
XRtcPsu_Config* con;

View File

@@ -535,7 +535,9 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
#define NEED_TMP_TIME
#elif defined(WOLFSSL_XILINX)
#define USER_TIME
#ifndef XTIME
#define XTIME(t1) xilinx_time((t1))
#endif
#include <time.h>
#elif defined(HAVE_RTP_SYS)
@@ -750,7 +752,7 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
#endif
#ifndef FILE_BUFFER_SIZE
#define FILE_BUFFER_SIZE 1024 /* default static file buffer size for input,
#define FILE_BUFFER_SIZE 1024 /* default static file buffer size for input, \
will use dynamic buffer if not big enough */
#endif