mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
ttfw_idf: Added ESP32-S3 FPGA support
Provision to burn and reset efuses of ESP32S3 on FPGA test_app: Enabled automated test cases for ESP32S3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 |
|
||||
| ----------------- | ----- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
|
||||
# Secure Boot
|
||||
|
||||
@@ -14,6 +14,7 @@ Any of the following ESP module:
|
||||
* ESP32-ECO3 (supports Secure Boot V2 & Secure Boot V1)
|
||||
* ESP32S2 (supports Secure Boot V2)
|
||||
* ESP32C3-ECO3 (supports Secure Boot V2)
|
||||
* ESP32S3 (supports Secure Boot V2)
|
||||
|
||||
It is recommended to use Secure Boot V2 from ESP32-ECO3 onwards.
|
||||
|
||||
@@ -68,7 +69,7 @@ Purpose of the example test cases (`example_test.py`) is to test the secure boot
|
||||
|
||||
### Hardware required
|
||||
|
||||
* FPGA setup with ESP32C3 image
|
||||
* FPGA setup with ESP32C3/ESP32S3 image
|
||||
|
||||
* COM port for programming and export it as ESPPORT
|
||||
e.g `export ESPPORT=/dev/ttyUSB0`
|
||||
@@ -81,7 +82,7 @@ Purpose of the example test cases (`example_test.py`) is to test the secure boot
|
||||
```
|
||||
export IDF_ENV_FPGA=1
|
||||
|
||||
idf.py set-target esp32c3
|
||||
idf.py set-target esp32c3 #(or esp32s3)
|
||||
|
||||
idf.py menuconfig
|
||||
```
|
||||
|
@@ -75,7 +75,7 @@ def dut_start_secure_app(dut): # type: (ttfw_idf.IDFDUT) -> None
|
||||
|
||||
# Test secure boot flow.
|
||||
# Correctly signed bootloader + correctly signed app should work
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga'], ignore=True)
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga', 'esp32s3fpga'], ignore=True)
|
||||
def test_examples_security_secure_boot(env, _): # type: (ttfw_idf.TinyFW.Env, None) -> None
|
||||
efuse_port = os.getenv('EFUSEPORT')
|
||||
dut = env.get_dut('secure_boot', 'tools/test_apps/security/secure_boot', efuse_reset_port=efuse_port)
|
||||
@@ -85,7 +85,7 @@ def test_examples_security_secure_boot(env, _): # type: (ttfw_idf.TinyFW.Env,
|
||||
|
||||
# Test efuse key index and key block combination.
|
||||
# Any key index can be written to any key block and should work
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga'], ignore=True)
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga', 'esp32s3fpga'], ignore=True)
|
||||
def test_examples_security_secure_boot_key_combo(env, _): # type: (ttfw_idf.TinyFW.Env, None) -> None
|
||||
efuse_port = os.getenv('EFUSEPORT')
|
||||
dut = env.get_dut('secure_boot', 'tools/test_apps/security/secure_boot', efuse_reset_port=efuse_port)
|
||||
@@ -101,7 +101,7 @@ def test_examples_security_secure_boot_key_combo(env, _): # type: (ttfw_idf
|
||||
|
||||
# Test secure boot key revoke.
|
||||
# If a key is revoked, bootloader signed with that key should fail verification
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga'], ignore=True)
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga', 'esp32s3fpga'], ignore=True)
|
||||
def test_examples_security_secure_boot_key_revoke(env, _): # type: (ttfw_idf.TinyFW.Env, None) -> None
|
||||
efuse_port = os.getenv('EFUSEPORT')
|
||||
dut = env.get_dut('secure_boot', 'tools/test_apps/security/secure_boot', efuse_reset_port=efuse_port)
|
||||
@@ -117,7 +117,7 @@ def test_examples_security_secure_boot_key_revoke(env, _): # type: (ttfw_idf
|
||||
|
||||
# Test bootloader signature corruption.
|
||||
# Corrupt one byte at a time of bootloader signature and test that the verification fails
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga'], ignore=True)
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga', 'esp32s3fpga'], ignore=True)
|
||||
def test_examples_security_secure_boot_corrupt_bl_sig(env, _): # type: (ttfw_idf.TinyFW.Env, None) -> None
|
||||
efuse_port = os.getenv('EFUSEPORT')
|
||||
dut = env.get_dut('secure_boot', 'tools/test_apps/security/secure_boot', efuse_reset_port=efuse_port)
|
||||
@@ -140,7 +140,7 @@ def test_examples_security_secure_boot_corrupt_bl_sig(env, _): # type: (ttfw
|
||||
|
||||
# Test app signature corruption.
|
||||
# Corrupt app signature, one byte at a time, and test that the verification fails
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga'], ignore=True)
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_Secure_Boot', target=['esp32c3fpga', 'esp32s3fpga'], ignore=True)
|
||||
def test_examples_security_secure_boot_corrupt_app_sig(env, _): # type: (ttfw_idf.TinyFW.Env, None) -> None
|
||||
efuse_port = os.getenv('EFUSEPORT')
|
||||
dut = env.get_dut('secure_boot', 'tools/test_apps/security/secure_boot', efuse_reset_port=efuse_port)
|
||||
|
Reference in New Issue
Block a user