mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-10 12:00:53 +02:00
Merge pull request #2206 from miyazakh/Renesas_IDE_CSPlus
Updated Renesas example projects as the latest version of sw use
This commit is contained in:
@@ -50,7 +50,6 @@
|
||||
|
||||
#define USER_TIME
|
||||
#define XTIME time
|
||||
#define HAVE_TIME_T_TYPE
|
||||
#define USE_WOLF_SUSECONDS_T
|
||||
#define USE_WOLF_TIMEVAL_T
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
wolfSSL/AlphaProject Boad demo setup Guide
|
||||
|
||||
This demo is tested with Renesas CS+ v6.01�AAP-RX71M-0A, wolfSSL 3.15.3.
|
||||
This demo is tested with the following condition.
|
||||
|
||||
Renesas : CS+ v6.01, v8.01
|
||||
Board : AP-RX71M-0A
|
||||
wolfSSL : 3.15.3, 4.0.0
|
||||
|
||||
Setup process:
|
||||
1. Download software
|
||||
@@ -12,25 +16,48 @@ Setup process:
|
||||
- open t4_demo.mtpj and build. This create demo program library.
|
||||
|
||||
3. Set up AlphaProject
|
||||
|
||||
!!** When you use version 2.0 of a sample program, **!!
|
||||
!!** please replace _ether_ to _usbfunc_ **!!
|
||||
|
||||
- The demo uses ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\
|
||||
ap_rx71m_0a_ether_sample_cs.mtpj
|
||||
ap_rx71m_0a_ether_sample_cs.mtpj
|
||||
- Open and edit ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\AP_RX71M_0A.c
|
||||
insert wolfSSL_init() in echo_srv_init().
|
||||
|
||||
===
|
||||
sci_init();
|
||||
can_init();
|
||||
echo_srv_init();
|
||||
wolfSSL_init(); <- insert this line
|
||||
sci_init();
|
||||
can_init();
|
||||
echo_srv_init();
|
||||
wolfSSL_init(); <- insert this line
|
||||
===
|
||||
!!** when you use version 2.0 **!!
|
||||
===
|
||||
CanInit();
|
||||
SciInit();
|
||||
EthernetAppInit();
|
||||
UsbfInit();
|
||||
wolfSSL_init(); <- insert this line
|
||||
===
|
||||
!!******************************!!
|
||||
|
||||
- Modify stack and heap size in ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\r_config
|
||||
Line 120#pragma stacksize su=0x2000
|
||||
Line 139 #define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
|
||||
�@- Modify IP address ib Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
|
||||
�@as needed
|
||||
�@
|
||||
!!** when you use version 2.0 **!!
|
||||
- Modify stack and heap size in ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_usbfunc_sample_cs\src\smc_gen\r_bsp_config.h
|
||||
Line 154#pragma stacksize su=0x2000
|
||||
Line 175#define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
!!******************************!!
|
||||
|
||||
- Modify IP address Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
|
||||
as needed
|
||||
!!** when you use version 2.0 **!!
|
||||
- Modify IP address Sample\ap_rx71m_0a_usbfunc_sample_cs\src\tcp_sample\src\config_tcpudp.c
|
||||
as needed
|
||||
!!******************************!!
|
||||
|
||||
===
|
||||
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
|
||||
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
|
||||
@@ -66,16 +93,16 @@ c: simple client. Specify IP address and port as following.
|
||||
You can use wolfssl/examples/server and client on your PC for TLS peer test.
|
||||
|
||||
|
||||
PC side�F
|
||||
PC side
|
||||
$ ./examples/server/server -b -d
|
||||
|
||||
Board side�F
|
||||
Board side
|
||||
> c <IP Addr> 11111
|
||||
|
||||
Board side�F
|
||||
Board side
|
||||
> s
|
||||
|
||||
PC side�F
|
||||
PC side
|
||||
$ ./examples/client/client -h <IP Addr> -p 50000
|
||||
|
||||
---
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
wolfSSL/AlphaProjectボードデモ セットアップガイド
|
||||
|
||||
このデモはRenesas CS+ v6.01、AP-RX71M-0A, wolfSSL 3.15.3 でテストしています。
|
||||
このデモは以下の環境でテストしています。
|
||||
|
||||
Renesas : CS+ v6.01, v8.01
|
||||
Board : AP-RX71M-0A
|
||||
wolfSSL : 3.15.3, 4.0.0
|
||||
|
||||
セットアップ手順:
|
||||
|
||||
@@ -9,12 +13,16 @@ wolfSSL/AlphaProject
|
||||
- 同じフォルダー下にwolfssl一式を解凍します。
|
||||
|
||||
2.wolfSSLのセットアップ
|
||||
- CS+にてwolfssl\IDE\Renesas\cs+\Project下のwolfssl\lib.mtpjを開き
|
||||
- CS+にてwolfssl\IDE\Renesas\cs+\Project下のwolfssl\wolfssl_lib.mtpjを開き
|
||||
wolfSSLライブラリーのビルドをします。
|
||||
- 同じフォルダの下のt4_demo.mtpjを開き、デモプログラムのビルドをします。
|
||||
このプログラムもライブラリー形式でビルドされます。
|
||||
|
||||
|
||||
3.AlphaProject側のセットアップ
|
||||
|
||||
!!** サンプルプログラム v2.0 を使用する場合は、_ether_ => _usbfunc_ **!!
|
||||
!!** と置き換えてください **!!
|
||||
|
||||
デモはap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_csフォルダ下の
|
||||
ap_rx71m_0a_ether_sample_cs.mtpjプロジェクトを利用します。
|
||||
|
||||
@@ -23,31 +31,53 @@ wolfSSL/AlphaProject
|
||||
97行目のecho_srv_init()の下にwolfSSL_init()を挿入します。
|
||||
|
||||
===
|
||||
sci_init();
|
||||
can_init();
|
||||
echo_srv_init();
|
||||
wolfSSL_init(); <- この行を挿入
|
||||
sci_init();
|
||||
can_init();
|
||||
echo_srv_init();
|
||||
wolfSSL_init(); <- この行を挿入
|
||||
===
|
||||
|
||||
- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\r_configファイル
|
||||
!!** サンプルプログラム v2.0 を使用する場合は、下記 **!!
|
||||
===
|
||||
CanInit();
|
||||
SciInit();
|
||||
EthernetAppInit();
|
||||
UsbfInit();
|
||||
wolfSSL_init(); <- この行を挿入
|
||||
===
|
||||
!!**********************************************************************!!
|
||||
|
||||
- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\smc_gen\r_bsp_config.h
|
||||
を開き、スタックサイズとヒープサイズを以下のように設定します。
|
||||
|
||||
120行目 #pragma stacksize su=0x2000
|
||||
139行目 #define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
|
||||
!!** サンプルプログラム v2.0 を使用する場合は、下記 **!!
|
||||
- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_usbfunc_sample_cs\src\smc_gen\r_bsp_config.h
|
||||
を開き、スタックサイズとヒープサイズを以下のように設定します。
|
||||
154行目 #pragma stacksize su=0x2000
|
||||
175行目 #define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
!!**********************************************************************!!
|
||||
|
||||
- IPアドレスのデフォルト値は以下のようになっています。
|
||||
必要があれば、Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
|
||||
内の139行目からの定義を変更します。
|
||||
|
||||
!!** サンプルプログラム v2.0 を使用する場合は、下記 **!!
|
||||
Sample\ap_rx71m_0a_usbfunc_sample_cs\src\tcp_sample\src\config_tcpudp.c
|
||||
内の166行目からの定義を変更します。
|
||||
!!**********************************************************************!!
|
||||
|
||||
===
|
||||
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
|
||||
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
|
||||
#define SUBNET_MASK0 255,255,255,0 /* Subnet mask */
|
||||
===
|
||||
|
||||
|
||||
- CS+でap_rx71m_0a_ether_sample_cs.mtpjプロジェクトを開き、wolfSSLとデモライブラリを
|
||||
登録します。CC-RX(ビルドツール)->リンク・オプションタブ->使用する以下の二つのファイル
|
||||
を登録します。
|
||||
登録します。CC-RX(ビルドツール)->リンク・オプションタブ->使用するライブラリに
|
||||
以下の二つのファイルを登録します。
|
||||
wolfssl\IDE\Renesas\cs+\Projects\wolfssl_lib\DefaultBuild\wolfssl_lib.lib
|
||||
wolfssl\IDE\Renesas\cs+\Projects\t4_demo\DefaultBuild\t4_demo.lib
|
||||
|
||||
|
||||
@@ -25,12 +25,13 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wolf_demo.h"
|
||||
#include "r_cmt_rx_if.h"
|
||||
|
||||
static WOLFSSL_CTX *wolfSSL_sv_ctx;
|
||||
static WOLFSSL_CTX *wolfSSL_cl_ctx;
|
||||
|
||||
static long tick;
|
||||
static void timeTick(void)
|
||||
static void timeTick(void *pdata)
|
||||
{
|
||||
tick++;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ test:
|
||||
- set stack size in stacksct.h
|
||||
- replace lowlvl.src with sample project's lowlvl.src which you can download below.
|
||||
https://www.renesas.com/jp/ja/software/D3012028.html
|
||||
* copy lowlvl.c and lowlvl.h in sample project's above into src directory of test project too.
|
||||
Build test wolfCrypt
|
||||
|
||||
Setting MPU: R5F565MLCxFC
|
||||
Setting MPU: R5F565MLCxFC or R5F571MLDxFC
|
||||
|
||||
@@ -25704,13 +25704,12 @@ int wolfSSL_HMAC_Init_ex(WOLFSSL_HMAC_CTX* ctx, const void* key,
|
||||
* returns WOLFSSL_SUCCESS on success */
|
||||
int wolfSSL_HmacCopy(Hmac* des, Hmac* src)
|
||||
{
|
||||
int ret = 0;
|
||||
void* heap = NULL;
|
||||
|
||||
#ifndef HAVE_FIPS
|
||||
heap = src->heap;
|
||||
#endif
|
||||
if ((ret = wc_HmacInit(des, heap, 0)) != 0) {
|
||||
if (wc_HmacInit(des, heap, 0) != 0) {
|
||||
return WOLFSSL_FAILURE;
|
||||
}
|
||||
|
||||
@@ -32145,7 +32144,6 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl)
|
||||
{
|
||||
word32 oid = 0;
|
||||
word32 idx = 0;
|
||||
int id;
|
||||
|
||||
WOLFSSL_ENTER("wolfSSL_OBJ_obj2nid");
|
||||
|
||||
@@ -32154,7 +32152,7 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl)
|
||||
}
|
||||
if (o->nid > 0)
|
||||
return o->nid;
|
||||
if ((id = GetObjectId(o->obj, &idx, &oid, o->grp, o->objSz)) < 0) {
|
||||
if (GetObjectId(o->obj, &idx, &oid, o->grp, o->objSz) < 0) {
|
||||
WOLFSSL_MSG("Issue getting OID of object");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user