mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 03:58:12 +00:00
esp32c3: memprot API upgrade and test application
Closes IDF-2641
This commit is contained in:

committed by
Angus Gratton

parent
936523b904
commit
f27c9c5139
@@ -3,7 +3,7 @@
|
||||
import ttfw_idf
|
||||
from tiny_test_fw import Utility
|
||||
|
||||
mem_test = [
|
||||
MEM_TEST_S2 = [
|
||||
['IRAM0_SRAM', 'WRX'],
|
||||
['IRAM0_RTCFAST', 'WRX'],
|
||||
['DRAM0_SRAM', 'WR'],
|
||||
@@ -13,14 +13,29 @@ mem_test = [
|
||||
['PERI2_RTCSLOW_1', 'WRX']
|
||||
]
|
||||
|
||||
MEM_TEST_C3 = [
|
||||
['IRAM0_SRAM', 'WRX'],
|
||||
['DRAM0_SRAM', 'WR']
|
||||
]
|
||||
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_GENERIC', target='esp32s2', group='test-apps')
|
||||
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_GENERIC', target=['esp32c3', 'esp32s2'], group='test-apps')
|
||||
def test_memprot(env, extra_data):
|
||||
|
||||
dut = env.get_dut('memprot', 'tools/test_apps/system/memprot')
|
||||
dut.start_app()
|
||||
|
||||
for i in mem_test:
|
||||
mem_test_cfg = []
|
||||
current_target = dut.app.get_sdkconfig()['CONFIG_IDF_TARGET'].replace('"','').lower()
|
||||
|
||||
if current_target == 'esp32c3':
|
||||
mem_test_cfg = MEM_TEST_C3
|
||||
elif current_target == 'esp32s2':
|
||||
mem_test_cfg = MEM_TEST_S2
|
||||
|
||||
Utility.console_log('Test cfg: ' + current_target)
|
||||
|
||||
for i in mem_test_cfg:
|
||||
if 'R' in i[1]:
|
||||
dut.expect(i[0] + ' read low: OK')
|
||||
dut.expect(i[0] + ' read high: OK')
|
||||
|
Reference in New Issue
Block a user