diff --git a/components/freertos/app_startup.c b/components/freertos/app_startup.c index 7789c6124e..99ea6ae570 100644 --- a/components/freertos/app_startup.c +++ b/components/freertos/app_startup.c @@ -199,6 +199,10 @@ static void main_task(void* args) ESP_ERROR_CHECK(esp_task_wdt_init(&twdt_config)); #endif // CONFIG_ESP_TASK_WDT + /* + Note: Be careful when changing the "Calling app_main()" log below as multiple pytest scripts expect this log as a + start-of-application marker. + */ ESP_LOGI(MAIN_TAG, "Calling app_main()"); extern void app_main(void); app_main(); diff --git a/examples/build_system/cmake/plugins/pytest_plugins.py b/examples/build_system/cmake/plugins/pytest_plugins.py index dc1d261269..ece4ea019d 100644 --- a/examples/build_system/cmake/plugins/pytest_plugins.py +++ b/examples/build_system/cmake/plugins/pytest_plugins.py @@ -16,7 +16,7 @@ def test_plugins(dut: Dut) -> None: Successfully registered plugin 'Nihao' Hello plugin performing self-registration... Successfully registered plugin 'Hello' - cpu_start: Starting scheduler + main_task: Calling app_main() List of plugins: - Plugin 'Hello' - Plugin 'Nihao' diff --git a/examples/system/efuse/pytest_system_efuse_example.py b/examples/system/efuse/pytest_system_efuse_example.py index f8545e49bb..2f52f56e39 100644 --- a/examples/system/efuse/pytest_system_efuse_example.py +++ b/examples/system/efuse/pytest_system_efuse_example.py @@ -284,8 +284,8 @@ def test_examples_efuse_with_virt_secure_boot_v1(dut: Dut) -> None: dut.expect('Disable ROM BASIC interpreter fallback...') dut.expect('secure_boot_v1: secure boot is now enabled for bootloader image') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -312,8 +312,8 @@ def test_examples_efuse_with_virt_secure_boot_v1_pre_loaded(dut: Dut) -> None: dut.serial.flash() dut.expect('Loading virtual efuse blocks from real efuses') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -339,8 +339,8 @@ def test_examples_efuse_with_virt_secure_boot_v1_pre_loaded(dut: Dut) -> None: dut.expect('Disable ROM BASIC interpreter fallback...') dut.expect('secure_boot_v1: secure boot is now enabled for bootloader image') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -397,8 +397,8 @@ def test_examples_efuse_with_virt_secure_boot_v2(dut: Dut) -> None: dut.expect('Prevent read disabling of additional efuses...') dut.expect('secure_boot_v2: Secure boot permanently enabled') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -453,8 +453,8 @@ def test_examples_efuse_with_virt_secure_boot_v2(dut: Dut) -> None: dut.expect('Prevent read disabling of additional efuses...') dut.expect('secure_boot_v2: Secure boot permanently enabled') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -481,8 +481,8 @@ def test_examples_efuse_with_virt_secure_boot_v2_pre_loaded(dut: Dut) -> None: print(' - Start app (flash partition_table and app)') dut.serial.flash() dut.expect('Loading virtual efuse blocks from real efuses') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -517,8 +517,8 @@ def test_examples_efuse_with_virt_secure_boot_v2_pre_loaded(dut: Dut) -> None: dut.expect('Prevent read disabling of additional efuses...') dut.expect('secure_boot_v2: Secure boot permanently enabled') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -580,8 +580,8 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut: Dut) -> None: dut.expect('Disable hardware & software JTAG...') dut.expect('secure_boot_v2: Secure boot permanently enabled') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -628,8 +628,8 @@ def test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut: Dut) -> dut.serial.bootloader_flash() dut.serial.flash() dut.expect('Loading virtual efuse blocks from real efuses') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -672,8 +672,8 @@ def test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut: Dut) -> dut.expect('Disable hardware & software JTAG...') dut.expect('secure_boot_v2: Secure boot permanently enabled', timeout=20) - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -768,9 +768,9 @@ def test_examples_efuse_with_virt_sb_v1_and_fe(dut: Dut) -> None: dut.expect('Checking secure boot...') dut.expect('secure_boot_v1: bootloader secure boot is already enabled, continuing..') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') dut.expect_exact('flash_encrypt: Flash encryption mode is DEVELOPMENT (not secure)') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -847,9 +847,9 @@ def test_examples_efuse_with_virt_sb_v2_and_fe(dut: Dut) -> None: dut.expect('secure_boot_v2: enabling secure boot v2...') dut.expect('secure_boot_v2: secure boot v2 is already enabled, continuing..') dut.expect_exact('flash_encrypt: flash encryption is enabled (3 plaintext flashes left)') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') dut.expect_exact('flash_encrypt: Flash encryption mode is DEVELOPMENT (not secure)') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -934,9 +934,9 @@ def test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut: Dut) -> None: dut.expect('secure_boot_v2: enabling secure boot v2...') dut.expect('secure_boot_v2: secure boot v2 is already enabled, continuing..') dut.expect_exact('flash_encrypt: flash encryption is enabled (1 plaintext flashes left)') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') dut.expect_exact('flash_encrypt: Flash encryption mode is DEVELOPMENT (not secure)') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') diff --git a/examples/system/eventfd/pytest_eventfd.py b/examples/system/eventfd/pytest_eventfd.py index 55d88a08c9..29bf68f167 100644 --- a/examples/system/eventfd/pytest_eventfd.py +++ b/examples/system/eventfd/pytest_eventfd.py @@ -17,7 +17,7 @@ from pytest_embedded import Dut @pytest.mark.generic def test_eventfd(dut: Dut) -> None: - dut.expect_exact('cpu_start: Starting scheduler') + dut.expect_exact('main_task: Calling app_main()') exp_list_5seconds = [ 'eventfd_example: Select timeouted for 1 times', diff --git a/examples/system/select/pytest_select.py b/examples/system/select/pytest_select.py index c09a176db1..3cefe3eb15 100644 --- a/examples/system/select/pytest_select.py +++ b/examples/system/select/pytest_select.py @@ -25,7 +25,7 @@ def get_uart_msgs(i: int) -> List[str]: @pytest.mark.generic def test_examples_select(dut: Dut) -> None: - dut.expect_exact('cpu_start: Starting scheduler', timeout=30) + dut.expect_exact('main_task: Calling app_main()', timeout=30) exp_list = [] for i in range(1, 10):