examples: Enables eFuse example tests for C6/H2/S3

Closes IDF-7011
This commit is contained in:
KonstantinKondrashov 2023-03-07 17:04:42 +08:00
parent 56dc272514
commit 11815b324f
9 changed files with 186 additions and 13 deletions

View File

@ -50,16 +50,6 @@ examples/system/deep_sleep_wake_stub:
temporary: true
reason: target(s) is not supported yet
examples/system/efuse:
disable_test:
- if: IDF_TARGET == "esp32s3"
temporary: true
reason: lack of runners
disable:
- if: IDF_TARGET == "esp32c6" or IDF_TARGET == "esp32h2"
temporary: true
reason: target esp32c6 is not supported yet
examples/system/esp_timer:
disable:
- if: IDF_TARGET == "esp32c6" or IDF_TARGET == "esp32h2"

View File

@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
# eFuse Example

View File

@ -38,9 +38,12 @@ def test_examples_efuse(dut: Dut) -> None:
@pytest.mark.generic
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.parametrize('config', ['virt_flash_enc',], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_flash_enc(dut: Dut) -> None:
@ -136,7 +139,10 @@ def test_examples_efuse_with_virt_flash_enc_aes_256(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.parametrize('config', ['virt_flash_enc',], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_flash_enc_pre_loaded(dut: Dut) -> None:
@ -208,7 +214,10 @@ def test_examples_efuse_with_virt_flash_enc_pre_loaded(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.parametrize('config', ['virt_flash_enc_release',], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_flash_enc_release(dut: Dut) -> None:
@ -619,6 +628,22 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32c2(dut: Dut) -> None:
test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut)
@pytest.mark.generic
@pytest.mark.esp32c6
@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32c6'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_secure_boot_v2_esp32c6(dut: Dut) -> None:
test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut)
@pytest.mark.generic
@pytest.mark.esp32h2
@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32h2'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_secure_boot_v2_esp32h2(dut: Dut) -> None:
test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut)
@pytest.mark.generic
@pytest.mark.esp32s2
@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32s2'], indirect=True)
@ -627,6 +652,14 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32s2(dut: Dut) -> None:
test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut)
@pytest.mark.generic
@pytest.mark.esp32s3
@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32s3'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_secure_boot_v2_esp32s3(dut: Dut) -> None:
test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut)
def test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut: Dut) -> None:
print(' - Erase flash')
dut.serial.erase_flash()
@ -711,6 +744,22 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32c2_pre_loaded(dut: Dut) ->
test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut)
@pytest.mark.generic
@pytest.mark.esp32c6
@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32c6'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_secure_boot_v2_esp32c6_pre_loaded(dut: Dut) -> None:
test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut)
@pytest.mark.generic
@pytest.mark.esp32h2
@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32h2'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_secure_boot_v2_esp32h2_pre_loaded(dut: Dut) -> None:
test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut)
@pytest.mark.generic
@pytest.mark.esp32s2
@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32s2'], indirect=True)
@ -719,6 +768,14 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32s2_pre_loaded(dut: Dut) ->
test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut)
@pytest.mark.generic
@pytest.mark.esp32s3
@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32s3'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_secure_boot_v2_esp32s3_pre_loaded(dut: Dut) -> None:
test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut)
@pytest.mark.generic
@pytest.mark.esp32
@pytest.mark.parametrize('config', ['virt_sb_v1_and_fe',], indirect=True)
@ -972,9 +1029,33 @@ def test_examples_efuse_with_virt_sb_v2_and_fe_esp32c2(dut: Dut) -> None:
test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut)
@pytest.mark.generic
@pytest.mark.esp32c6
@pytest.mark.parametrize('config', ['virt_sb_v2_and_fe.esp32c6'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_sb_v2_and_fe_esp32c6(dut: Dut) -> None:
test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut)
@pytest.mark.generic
@pytest.mark.esp32h2
@pytest.mark.parametrize('config', ['virt_sb_v2_and_fe.esp32h2'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_sb_v2_and_fe_esp32h2(dut: Dut) -> None:
test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut)
@pytest.mark.generic
@pytest.mark.esp32s2
@pytest.mark.parametrize('config', ['virt_sb_v2_and_fe.esp32s2'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_sb_v2_and_fe_esp32s2(dut: Dut) -> None:
test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut)
@pytest.mark.generic
@pytest.mark.esp32s3
@pytest.mark.parametrize('config', ['virt_sb_v2_and_fe.esp32s3'], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
def test_examples_efuse_with_virt_sb_v2_and_fe_esp32s3(dut: Dut) -> None:
test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut)

View File

@ -0,0 +1,18 @@
# FLASH_ENCRYPTION & SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH
CONFIG_IDF_TARGET="esp32c6"
CONFIG_PARTITION_TABLE_OFFSET=0xD000
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
CONFIG_SECURE_BOOT=y
CONFIG_SECURE_BOOT_V2_ENABLED=y
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y
CONFIG_SECURE_FLASH_ENC_ENABLED=y
# IMPORTANT: ONLY VIRTUAL eFuse MODE!
CONFIG_EFUSE_VIRTUAL=y
CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y

View File

@ -0,0 +1,18 @@
# FLASH_ENCRYPTION & SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH
CONFIG_IDF_TARGET="esp32h2"
CONFIG_PARTITION_TABLE_OFFSET=0xD000
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
CONFIG_SECURE_BOOT=y
CONFIG_SECURE_BOOT_V2_ENABLED=y
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y
CONFIG_SECURE_FLASH_ENC_ENABLED=y
# IMPORTANT: ONLY VIRTUAL eFuse MODE!
CONFIG_EFUSE_VIRTUAL=y
CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y

View File

@ -0,0 +1,18 @@
# FLASH_ENCRYPTION & SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH
CONFIG_IDF_TARGET="esp32s3"
CONFIG_PARTITION_TABLE_OFFSET=0xD000
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
CONFIG_SECURE_BOOT=y
CONFIG_SECURE_BOOT_V2_ENABLED=y
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y
CONFIG_SECURE_FLASH_ENC_ENABLED=y
# IMPORTANT: ONLY VIRTUAL eFuse MODE!
CONFIG_EFUSE_VIRTUAL=y
CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y

View File

@ -0,0 +1,16 @@
# SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH
CONFIG_IDF_TARGET="esp32c6"
CONFIG_PARTITION_TABLE_OFFSET=0xC000
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
CONFIG_SECURE_BOOT=y
CONFIG_SECURE_BOOT_V2_ENABLED=y
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
CONFIG_SECURE_INSECURE_ALLOW_DL_MODE=y
# IMPORTANT: ONLY VIRTUAL eFuse MODE!
CONFIG_EFUSE_VIRTUAL=y
CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y

View File

@ -0,0 +1,16 @@
# SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH
CONFIG_IDF_TARGET="esp32h2"
CONFIG_PARTITION_TABLE_OFFSET=0xC000
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
CONFIG_SECURE_BOOT=y
CONFIG_SECURE_BOOT_V2_ENABLED=y
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
CONFIG_SECURE_INSECURE_ALLOW_DL_MODE=y
# IMPORTANT: ONLY VIRTUAL eFuse MODE!
CONFIG_EFUSE_VIRTUAL=y
CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y

View File

@ -0,0 +1,16 @@
# SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH
CONFIG_IDF_TARGET="esp32s3"
CONFIG_PARTITION_TABLE_OFFSET=0xC000
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
CONFIG_SECURE_BOOT=y
CONFIG_SECURE_BOOT_V2_ENABLED=y
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
CONFIG_SECURE_INSECURE_ALLOW_DL_MODE=y
# IMPORTANT: ONLY VIRTUAL eFuse MODE!
CONFIG_EFUSE_VIRTUAL=y
CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y