Skip to content

Commit a568740

Browse files
authored
State Supported ESP-IDF Versions and ESP32 Chips (#74)
2 parents e2d407f + e596061 commit a568740

File tree

1 file changed

+128
-62
lines changed

1 file changed

+128
-62
lines changed

GettingStartedGuide.md

Lines changed: 128 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,25 @@ Once completed, one can progress to the
4444
### 1.1 Hardware Requirements
4545

4646
- Micro USB cable.
47-
- ESP32-C3, ESP32-C3, or a, ESP32-S3 board (e.g [ESP32-C3-DevKitC-02](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitc-02.html)).
47+
- ESP32-C3, ESP32-C3, or a, ESP32-S3 board (e.g
48+
[ESP32-C3-DevKitC-02](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitc-02.html)).
4849
- Personal Computer with Linux, MacOS, or Windows.
4950
- WiFi access point with access to the internet.
5051

5152
### 1.2 Software Requirements
5253

53-
- [ESP-IDF 5.0](https://github.com/espressif/esp-idf/tree/v5.0) or higher to
54-
configure, build, and flash the project. To setup for the ESP32-C3,
55-
follow Espressif's
54+
- [ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started):
55+
This is used to configure, build, and flash the project.
56+
To setup for the ESP32-C3, follow Espressif's
5657
[Getting Started Guide for the ESP32-C3](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/index.html).
5758

58-
**NOTE:** As of December 15h 2023 ESP-IDF V4.4.3 is no longer supported. For
59-
more information refer to the
60-
[ESP-IDF Release Support Schedule](https://github.com/espressif/esp-idf#esp-idf-release-support-schedule)
59+
- The versions of `ESP-IDF` supported by this repository are the ones supported by
60+
[Espressif's GitHub Build Action](https://github.com/espressif/esp-idf-ci-action?tab=readme-ov-file)
61+
- To see the currently supported `ESP-IDF` versions please refer to the list in
62+
[build.yml](./.github/workflows/build.yml#L22).
63+
64+
**NOTE:** Please do not submit a bug report due to build errors or demo failures
65+
when using an unsupported version of `ESP-IDF`.
6166

6267
- [Python3](https://www.python.org/downloads/)
6368
and the Package Installer for Python [pip](https://pip.pypa.io/en/stable/installation/)
@@ -113,10 +118,10 @@ ESP-IDF command prompt/terminal. For Visual Studio (VS) Code users who are
113118
using the Espressif IDF extension, do ->View->Command Palette->Search for
114119
`ESP-IDF: SDK Configuration editor (menuconfig)` and select the command. The
115120
`SDK Configuration editor` window should pop up after a moment.
116-
- (**Note**: If running menuconfig from within a VS Code command prompt, 'j'
121+
- **Note**: If running menuconfig from within a VS Code command prompt, 'j'
117122
and 'k' may have to be used in place of the 'up' and 'down' arrow keys.
118123
Alternately, one can use a command prompt/terminal outside of the VS
119-
Code editor).
124+
Code editor.
120125
1. Select `Featured FreeRTOS IoT Integration` from the menu.
121126
1. Set `Endpoint for MQTT Broker to use` to your **AWS device Endpoint**.
122127
1. Set `Port for MQTT Broker to use` to `8883`.
@@ -131,7 +136,10 @@ following command to create and flash the certificate partition.
131136

132137
The following values will be needed:
133138

134-
- `PORT`: The serial port to which the ESP32-C3 board is connected
139+
- `PORT`: The serial port to which the ESP32-C3 board is connected. You can
140+
refer to this
141+
[guide](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/establish-serial-connection.html)
142+
for information about finding what value this should be.
135143

136144
- `CA_CERT_FILEPATH`: The file path to the PEM-encoded root CA certificate,
137145

@@ -171,10 +179,13 @@ for iOS. Download the appropriate app to your phone before proceeding.
171179
Run the following command to build and flash the demo project:
172180

173181
**NOTE** The list of chip types can be found by running `idf.py list-targets`
174-
The directly supported chips are the `esp32c3`, `esp32s3`, and `esp32c2`
182+
The directly supported chips are the ones listed in
183+
[build.yml](./.github/workflows/build.yml#L27)
184+
185+
- Please do not submit a bug report due to build errors or demo failures
186+
when using an unsupported ESP chip.
175187

176188
```sh
177-
idf.py set-target CHIP_TYPE;
178189
idf.py -p PORT flash monitor;
179190
```
180191

@@ -614,67 +625,83 @@ disabled when running the qualification test. You can change the log level by
614625
### 6.2 Steps for each test case
615626

616627
1. Device Advisor Test
617-
- Create a [Device Advisor test suite](https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor.html) in the console.
618-
- Find the Device Advisor test endpoint for your account
619-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `Device Advisor Test`.
620-
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
621-
- Set `Endpoint for MQTT Broker to use` to Device Advisor test endpoint
622-
- Set `Thing Name for Device Advisor Test/OTA end-to-end Test` to AWS IoT Thing under test.
623-
- Build and run.
624-
- See Device Advisor test result in the console.
628+
- Create a [Device Advisor test suite](https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor.html)
629+
in the console.
630+
- Find the Device Advisor test endpoint for your account
631+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
632+
choose `Device Advisor Test`.
633+
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
634+
- Set `Endpoint for MQTT Broker to use` to Device Advisor test endpoint
635+
- Set `Thing Name for Device Advisor Test/OTA end-to-end Test` to AWS IoT Thing under test.
636+
- Build and run.
637+
- See Device Advisor test result in the console.
625638
2. MQTT Test
626-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `MQTT Test`.
639+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
640+
choose `MQTT Test`.
627641
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
628642
- Set `Endpoint for MQTT Broker to use` to your AWS IoT endpoint
629643
- Set `Client Identifier for MQTT Test`
630644
- Build and run.
631645
- See test result on target output.
632646
- Example output
633-
```
647+
648+
```c
634649
I (821) qual_main: Run qualification test.
635650
...
636651
-----------------------
637652
8 Tests 0 Failures 0 Ignored
638653
OK
639654
I (84381) qual_main: End qualification test.
640655
```
656+
641657
3. Transport Interface Test
642-
- Follow [Run The Transport Interface Test](https://github.com/FreeRTOS/FreeRTOS-Libraries-Integration-Tests/tree/main/src/transport_interface#6-run-the-transport-interface-test) to start an echo server.
643-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `Transport Interface Test`.
644-
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
645-
- Set `Echo Server Domain Name/IP for Transport Interface Test`
646-
- Set `Port for Echo Server to use`
647-
- Set ECHO_SERVER_ROOT_CA / TRANSPORT_CLIENT_CERTIFICATE and TRANSPORT_CLIENT_PRIVATE_KEY in [test_param_config.h](./components/FreeRTOS-Libraries-Integration-Tests/config/test_param_config.h).
648-
- Build and run.
649-
- See test result on target output.
650-
- Example output
651-
```
658+
- Follow
659+
[Run The Transport Interface Test](https://github.com/FreeRTOS/FreeRTOS-Libraries-Integration-Tests/tree/main/src/transport_interface#6-run-the-transport-interface-test)
660+
to start an echo server.
661+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
662+
choose `Transport Interface Test`.
663+
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
664+
- Set `Echo Server Domain Name/IP for Transport Interface Test`
665+
- Set `Port for Echo Server to use`
666+
- Set ECHO_SERVER_ROOT_CA / TRANSPORT_CLIENT_CERTIFICATE and TRANSPORT_CLIENT_PRIVATE_KEY
667+
in [test_param_config.h](./components/FreeRTOS-Libraries-Integration-Tests/config/test_param_config.h).
668+
- Build and run.
669+
- See test result on target output.
670+
- Example output
671+
672+
```c
652673
I (855) qual_main: Run qualification test.
653674
...
654675
-----------------------
655676
14 Tests 0 Failures 0 Ignored
656677
OK
657678
I (612755) qual_main: End qualification test.
658679
```
680+
659681
4. OTA PAL Test
660-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `OTA PAL Test`.
661-
- Build and run.
662-
- See test result on target output.
663-
- Example output
664-
```
682+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
683+
choose `OTA PAL Test`.
684+
- Build and run.
685+
- See test result on target output.
686+
- Example output
687+
688+
```c
665689
I (905) qual_main: Run qualification test.
666690
...
667691
-----------------------
668692
15 Tests 0 Failures 0 Ignored
669693
OK
670694
I (113755) qual_main: End qualification test.
671695
```
696+
672697
5. Core PKCS11 Test
673-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `CorePKCS#11 Test`.
674-
- Build and run.
675-
- See test result on target output.
676-
- Example output
677-
```
698+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
699+
choose `CorePKCS#11 Test`.
700+
- Build and run.
701+
- See test result on target output.
702+
- Example output
703+
704+
```c
678705
I (858) qual_main: Run qualification test.
679706
...
680707
-----------------------
@@ -685,82 +712,121 @@ disabled when running the qualification test. You can change the log level by
685712
686713
## 7 Run AWS IoT Device Tester
687714
688-
This repository can be tested using [AWS IoT Device Tester for FreeRTOS (IDT)](https://aws.amazon.com/freertos/device-tester/). IDT is a downloadable tool that can be used to exercise a device integration with FreeRTOS to validate functionality and compatibility with Amazon IoT cloud. Passing the test suite provided by IDT is also required to qualify a device for the [Amazon Partner Device Catalogue](https://devices.amazonaws.com/).
715+
This repository can be tested using
716+
[AWS IoT Device Tester for FreeRTOS (IDT)](https://aws.amazon.com/freertos/device-tester/).
717+
IDT is a downloadable tool that can be used to exercise a device integration with
718+
FreeRTOS to validate functionality and compatibility with Amazon IoT cloud.
719+
Passing the test suite provided by IDT is also required to qualify a device for
720+
the [Amazon Partner Device Catalogue](https://devices.amazonaws.com/).
689721
690-
IDT runs a suite of tests that include testing the device's transport interface layer implementation, PKCS11 functionality, and OTA capabilities. In IDT test cases, the IDT binary will make a copy of the source code, update the header files in the project, then compile the project and flash the resulting image to your board. Finally, IDT will read serial output from the board and communicate with the AWS IoT cloud to ensure that test cases are passing.
722+
IDT runs a suite of tests that include testing the device's transport interface
723+
layer implementation, PKCS11 functionality, and OTA capabilities. In IDT test
724+
cases, the IDT binary will make a copy of the source code, update the header files
725+
in the project, then compile the project and flash the resulting image to your
726+
board. Finally, IDT will read serial output from the board and communicate with
727+
the AWS IoT cloud to ensure that test cases are passing.
691728
692729
### 7.1 Prerequisite
693730
694-
- Follow the [OTA update with AWS IoT Guide](#5-perform-firmware-over-the-air-updates-with-aws-iot) to create an OTA update and verify the digital signature, checksum and version number of the new image. If firmware update is verified, you can run the tests on your device.
731+
- Follow the
732+
[OTA update with AWS IoT Guide](#5-perform-firmware-over-the-air-updates-with-aws-iot)
733+
to create an OTA update and verify the digital signature, checksum and version
734+
number of the new image. If firmware update is verified, you can run the tests
735+
on your device.
695736
- Run `idf.py menuconfig`.
696737
- Under `Featured FreeRTOS IoT Integration`, choose `Run qualification test`.
697738
- Under `Component config -> Unity unit testing library`, choose `Include Unity test fixture`.
698-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, **DISABLE** all the tests.
739+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
740+
**DISABLE** all the tests.
699741
- Run `idf.py fullclean` to clear local CMAKE cache.
700742
701-
_Note: The log of module `esp_ota_ops`, `AWS_OTA` and `esp-tls-mbedtls` will be disabled when running the qualification test. You can change the log level by `esp_log_level_set` in [main.c](./main/main.c)._
743+
_Note: The log of module `esp_ota_ops`, `AWS_OTA` and `esp-tls-mbedtls` will be
744+
disabled when running the qualification test. You can change the log level by
745+
`esp_log_level_set` in [main.c](./main/main.c)._
702746
703747
### 7.2 Download AWS IoT Device Tester
704748
705-
The latest version of IDT can be downloaded from the [here](https://docs.aws.amazon.com/freertos/latest/userguide/dev-test-versions-afr.html). This repository has been qualified by IDT v4.6.0 and test suite version 2.3.0 for FreeRTOS 202210-LTS.
749+
The latest version of IDT can be downloaded from the
750+
[here](https://docs.aws.amazon.com/freertos/latest/userguide/dev-test-versions-afr.html).
751+
This repository has been qualified by IDT v4.6.0 and test suite version 2.3.0 for
752+
[FreeRTOS 202210-LTS](https://github.com/FreeRTOS/FreeRTOS-LTS/tree/202210.01-LTS).
706753
707754
### 7.3 Configure AWS IoT Device Tester
708755
709756
Follow [the instructions to setup your AWS account](https://docs.aws.amazon.com/freertos/latest/userguide/lts-idt-dev-tester-prereqs.html#lts-config-aws-account).
710757
711758
Extract IDT for FreeRTOS to a location on the file system
712759
713-
- The `devicetester-extract-location/bin` directory holds the IDT binary, which is the entry point used to run IDT
714-
- The `devicetester-extract-location/results` directory holds logs that are generated every time you run IDT.
715-
- The `devicetester-extract-location/configs` directory holds configuration files that are required to setup IDT
760+
- The `devicetester-extract-location/bin` directory holds the IDT binary, which
761+
is the entry point used to run IDT
762+
- The `devicetester-extract-location/results` directory holds logs that are
763+
generated every time you run IDT.
764+
- The `devicetester-extract-location/configs` directory holds configuration files
765+
that are required to setup IDT
716766
717-
Before running IDT, the files in `devicetester-extract-location/configs` need to be updated. We have pre-defined configures available in the [idt_config](https://github.com/FreeRTOS/iot-reference-esp32c3/tree/main/idt_config). Copy these templates to `devicetester-extract-location/configs`, and the rest of this section will walk through the remaining values that need to be filled in.
767+
Before running IDT, the files in `devicetester-extract-location/configs` need
768+
to be updated. We have pre-defined configures available in the
769+
[idt_config](https://github.com/FreeRTOS/iot-reference-esp32c3/tree/main/idt_config).
770+
Copy these templates to `devicetester-extract-location/configs`, and the rest of
771+
this section will walk through the remaining values that need to be filled in.
718772
719773
You need to configure your AWS credentials for IDT.
720774
721775
- In `config.json`, update the `profile` and `awsRegion` fields
722776
723777
You need to specify the device details for IDT.
724778
725-
- In `device.json`, update `serialPort` to the serial port of your board as from [PORT](./GettingStartedGuide.md#23-provision-the-esp32-c3-with-the-private-key-device-certificate-and-ca-certificate-in-development-mode). Update `publicKeyAsciiHexFilePath` to the absolute path to `dummyPublicKeyAsciiHex.txt`. Update `publicDeviceCertificateArn` to the ARN of the certificate uploaded when [Setup AWS IoT Core](./GettingStartedGuide.md#21-setup-aws-iot-core).
779+
- In `device.json`, update `serialPort` to the serial port of your board as from
780+
[PORT](./GettingStartedGuide.md#23-provision-the-esp32-c3-with-the-private-key-device-certificate-and-ca-certificate-in-development-mode).
781+
Update `publicKeyAsciiHexFilePath` to the absolute path to `dummyPublicKeyAsciiHex.txt`.
782+
Update `publicDeviceCertificateArn` to the ARN of the certificate uploaded when
783+
[Setup AWS IoT Core](./GettingStartedGuide.md#21-setup-aws-iot-core).
726784
727785
You need to configure IDT the build, flash and test settings.
728786
729787
- In `build.bat` / `build.sh`, update ESP_IDF_PATH, and ESP_IDF_FRAMEWORK_PATH
730788
- In `flash.bat` / `flash.sh`, update ESP_IDF_PATH, ESP_IDF_FRAMEWORK_PATH, and NUM_COMPORT
731789
- In `userdata.json`, update `sourcePath` to the absolute path to the root of this repository.
732-
- In `userdata.json`, update `signerCertificate` with the ARN of the [Setup pre-requisites for OTA cloud resources
733-
.](./GettingStartedGuide.md#51-setup-pre-requisites-for-ota-cloud-resources)
734-
- Run all the steps to create a [second code signing certificate](./GettingStartedGuide.md#51-setup-pre-requisites-for-ota-cloud-resources) but do NOT provision the key onto your board. Copy the ARN for this certificate in `userdata.json` for the field `untrustedSignerCertificate`.
790+
- In `userdata.json`, update `signerCertificate` with the ARN of the
791+
[Setup pre-requisites for OTA cloud resources](./GettingStartedGuide.md#51-setup-pre-requisites-for-ota-cloud-resources)
792+
- Run all the steps to create a
793+
[second code signing certificate](./GettingStartedGuide.md#51-setup-pre-requisites-for-ota-cloud-resources)
794+
but do NOT provision the key onto your board.
795+
- Copy the ARN for this certificate in `userdata.json` for the field
796+
`untrustedSignerCertificate`.
735797
736798
### 7.4 Running the FreeRTOS qualification 2.0 suite
737799
738-
With configuration complete, IDT can be run for an individual test group, a test case, or the entire qualification suite.
800+
With configuration complete, IDT can be run for an individual test group, a
801+
test case, or the entire qualification suite.
739802
740803
List all the available test groups, run:
741804
742-
```
805+
```sh
743806
.\devicetester_win_x86-64.exe list-groups
744807
```
745808

746809
Run one or more specified test group, run e.g.:
747810

748-
```
811+
```sh
749812
.\devicetester_win_x86-64.exe run-suite --group-id FullCloudIoT --group-id OTACore
750813
```
751814

752815
Run one or more specified tests, run e.g.:
753816

754-
```
817+
```sh
755818
.\devicetester_win_x86-64.exe run-suite --group-id OTADataplaneMQTT --test-id OTAE2EGreaterVersion
756819
```
757820

758821
To run the entire qualification suite, run:
759822

760-
```
823+
```sh
761824
.\devicetester_win_x86-64.exe run-suite --skip-group-id FullPKCS11_PreProvisioned_RSA --skip-group-id FullPKCS11_Import_RSA --skip-group-id FullPKCS11_Core --skip-group-id FullTransportInterfacePlainText
762825
```
763826

764827
For more information, `.\devicetester_win_x86-64.exe help` will show all available commands.
765828

766-
When IDT is run, it generates the `results/uuid` directory that contains the logs and other information associated with your test run. See [Understanding results and logs](https://docs.aws.amazon.com/freertos/latest/userguide/lts-results-logs.html) for more details.
829+
When IDT is run, it generates the `results/uuid` directory that contains the
830+
logs and other information associated with your test run. See
831+
[Understanding results and logs](https://docs.aws.amazon.com/freertos/latest/userguide/lts-results-logs.html)
832+
for more details.

0 commit comments

Comments
 (0)