Skip to content

Commit fc172e9

Browse files
authored
Merge pull request #7559 from gojimmypi/PR-PlatformIO-FreeRTOS
Update PlatformIO README and Examples
2 parents 0987bf4 + 22af731 commit fc172e9

File tree

9 files changed

+457
-246
lines changed

9 files changed

+457
-246
lines changed

IDE/PlatformIO/README.md

Lines changed: 11 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,81 +2,25 @@
22

33
Follow the [instructions](https://docs.platformio.org/en/latest/core/installation/methods/index.html) to install PlatformIO.
44

5-
Note there are two options:
5+
Note there are two options for using PlatformIO:
66

77
- [Core CLI](https://docs.platformio.org/en/latest/core/index.html)
88
- [VSCode IDE](https://docs.platformio.org/en/latest/integration/ide/vscode.html#ide-vscode)
99

10+
There are two types wolfSSL libraries for PlatformIO:
1011

11-
## Publishing
12-
13-
The PlatformIO Core CLI is needed to publish wolfSSL:
14-
15-
See also the [Arduino](../ARDUINO/README.md) publishing notes.
16-
17-
18-
### Publish PlatformIO Arduino Library with Windows
19-
20-
The wolfSSL publishing is done from the `scripts`. Here are somple examples:
21-
22-
Setup the PlatformIO CLI:
23-
24-
```dos
25-
set PATH=%PATH%;C:\Users\%USERNAME%\.platformio\penv\Scripts\
26-
pio --help
27-
pio account show
28-
```
29-
30-
Publish
31-
32-
```dos
33-
pio pkg publish --owner wolfSSL C:\workspace\Arduino-wolfSSL
34-
```
35-
36-
### Publish with Linux
12+
- Regular (release): https://registry.platformio.org/libraries/wolfssl/wolfssl
13+
- Arduino (release): https://registry.platformio.org/libraries/wolfssl/Arduino-wolfSSL
3714

38-
```bash
39-
set PATH=%PATH%;C:\Users\%USERNAME%\.platformio\penv\Scripts\
40-
pio --help
41-
pio account show
42-
```
15+
There are staging / preview libraries for each of the two types wolfSSL libraries for PlatformIO:
4316

44-
```bash
45-
pio pkg publish --owner wolfSSL ~\workspace\Arduino-wolfSSL
46-
```
17+
- Regular (staging / preview): https://registry.platformio.org/libraries/wolfssl-staging/wolfSSL
18+
- Arduino (staging / preview): https://registry.platformio.org/libraries/wolfssl-staging/Arduino-wolfSSL
4719

48-
### Create a staging / preview wolfssl org
20+
# Examples
4921

50-
See
22+
See the [examples directory](./examples/)
5123

52-
```
53-
pio org create wolfssl-staging --email [email protected] --displayname "testing preview wolfssl"
54-
```
55-
56-
### Add user to org
57-
58-
The creator of an org is automatically added as user / owner at org creation time. Others can be added:
59-
60-
```
61-
pio org add wolfssl-staging gojimmypi
62-
```
63-
64-
### Publish Arduino wolfSSL to staging / preview site:
65-
66-
```
67-
pio pkg publish --owner wolfssl-staging C:\workspace\Arduino-wolfSSL
68-
```
69-
70-
### Publish Regular wolfSSL to staging / preview site:
71-
72-
```
73-
pio pkg publish --owner wolfssl-staging C:\workspace\wolfssl-gojimmypi\IDE\PlatformIO\PlatformIO_wolfSSL
74-
```
75-
76-
### Remove published version from staging site:
77-
78-
`pio pkg unpublish [<organization>/]<pkgname>[@<version>] [OPTIONS]`
24+
## Publishing
7925

80-
```
81-
pio pkg unpublish wolfssl-staging/[email protected]
82-
```
26+
The wolfSSL publishing is performed from the `scripts`.

IDE/PlatformIO/examples/wolfssl_benchmark/README.md

Lines changed: 188 additions & 98 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* PlatformIO wolfssl_benchmark main.c
2+
*
3+
* Copyright (C) 2006-2024 wolfSSL Inc.
4+
*
5+
* This file is part of wolfSSL.
6+
*
7+
* wolfSSL is free software; you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation; either version 2 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* wolfSSL is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program; if not, write to the Free Software
19+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
20+
*/
21+
#ifndef _MAIN_H_
22+
#define _MAIN_H_
23+
24+
#endif

IDE/PlatformIO/examples/wolfssl_benchmark/platformio.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
platform = espressif32
1313
board = esp32dev
1414
framework = espidf
15-
upload_port = COM82
16-
monitor_port = COM82
15+
upload_port = COM19
16+
monitor_port = COM19
1717
monitor_speed = 115200
1818
build_flags = -DWOLFSSL_USER_SETTINGS, -DWOLFSSL_ESP32
1919
monitor_filters = direct

IDE/PlatformIO/examples/wolfssl_benchmark/src/main.c

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,31 @@
1818
* along with this program; if not, write to the Free Software
1919
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
2020
*/
21+
#include "main.h"
2122

22-
#include <wolfssl/wolfcrypt/settings.h>
23-
#ifdef WOLFSSL_ESPIDF
24-
#include <esp_log.h>
25-
#include <rtc_wdt.h>
26-
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
27-
#endif
28-
29-
#include <wolfssl/version.h>
30-
#include <wolfssl/wolfcrypt/types.h>
31-
#include <wolfcrypt/benchmark/benchmark.h>
32-
33-
#define TAG "demo"
34-
35-
void app_main() {
36-
int ret = 0;
37-
#ifdef WOLFSSL_ESPIDF
38-
ESP_LOGI(TAG, "Found WOLFSSL_ESPIDF!");
39-
#endif
40-
printf("Hello World wolfSSL Version %s", LIBWOLFSSL_VERSION_STRING);
41-
42-
#if defined(HAVE_VERSION_EXTENDED_INFO) && defined(WOLFSSL_ESPIDF)
43-
esp_ShowExtendedSystemInfo();
44-
#endif
45-
ret = benchmark_test(NULL);
46-
printf("benchmark_test result %d", ret);
47-
}
23+
#include <wolfssl/wolfcrypt/settings.h>
24+
#ifdef WOLFSSL_ESPIDF
25+
#include <esp_log.h>
26+
#include <rtc_wdt.h>
27+
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
28+
#endif
29+
30+
#include <wolfssl/version.h>
31+
#include <wolfssl/wolfcrypt/types.h>
32+
#include <wolfcrypt/benchmark/benchmark.h>
33+
34+
#define TAG "wolfSSL demo"
35+
36+
void app_main() {
37+
int ret = 0;
38+
#ifdef WOLFSSL_ESPIDF
39+
ESP_LOGI(TAG, "Found WOLFSSL_ESPIDF!");
40+
#endif
41+
printf("\nHello World wolfSSL Version %s\n", LIBWOLFSSL_VERSION_STRING);
42+
43+
#if defined(HAVE_VERSION_EXTENDED_INFO) && defined(WOLFSSL_ESPIDF)
44+
esp_ShowExtendedSystemInfo();
45+
#endif
46+
ret = benchmark_test(NULL);
47+
printf("\nbenchmark_test complete! result code: %d\n", ret);
48+
}

0 commit comments

Comments
 (0)