mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-29 18:27:20 +02:00
test_apps: Test multicore app can be run by unicore bootloader
This commit is contained in:
committed by
BOT
parent
1b608a1c07
commit
a2ffc9374c
6
tools/test_apps/system/unicore_bootloader/CMakeLists.txt
Normal file
6
tools/test_apps/system/unicore_bootloader/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# The following lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(test_unicore_bootloader)
|
2
tools/test_apps/system/unicore_bootloader/README.md
Normal file
2
tools/test_apps/system/unicore_bootloader/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
| Supported Targets | ESP32 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- |
|
4
tools/test_apps/system/unicore_bootloader/README.txt
Normal file
4
tools/test_apps/system/unicore_bootloader/README.txt
Normal file
@ -0,0 +1,4 @@
|
||||
This project tests if the app can start up in a certain configuration.
|
||||
Multicore app can start up even if the bootloader is unicore.
|
||||
|
||||
The test is only for Multicore chips.
|
43
tools/test_apps/system/unicore_bootloader/app_test.py
Normal file
43
tools/test_apps/system/unicore_bootloader/app_test.py
Normal file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from typing import Any
|
||||
|
||||
import ttfw_idf
|
||||
|
||||
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_GENERIC', group='test-apps', target=['esp32', 'esp32s3'])
|
||||
def test_multicore_app_and_unicore_bootloader(env, _): # type: (Any, Any) -> None
|
||||
dut = env.get_dut('unicore_bootloader', 'tools/test_apps/system/unicore_bootloader', app_config_name='multicore_cfg')
|
||||
print('Using binary path: {}'.format(dut.app.binary_path))
|
||||
dut.start_app()
|
||||
dut.expect('Multicore bootloader')
|
||||
dut.expect('Multicore app')
|
||||
dut.expect('App is running')
|
||||
|
||||
another_build_path = dut.app.binary_path.replace('multicore_cfg', 'unicore_cfg')
|
||||
print('Using binary from another_build_path: {}'.format(another_build_path))
|
||||
dut.bootloader_flash(another_build_path)
|
||||
dut.expect('Unicore bootloader')
|
||||
dut.expect('Multicore app')
|
||||
dut.expect('App is running')
|
||||
|
||||
|
||||
@ttfw_idf.idf_custom_test(env_tag='Example_GENERIC', group='test-apps', target=['esp32', 'esp32s3'])
|
||||
def test_unicore_app_and_multicore_bootloader(env, _): # type: (Any, Any) -> None
|
||||
dut = env.get_dut('unicore_bootloader', 'tools/test_apps/system/unicore_bootloader', app_config_name='unicore_cfg')
|
||||
print('Using binary path: {}'.format(dut.app.binary_path))
|
||||
dut.expect('Unicore bootloader')
|
||||
dut.expect('Unicore app')
|
||||
dut.expect('App is running')
|
||||
|
||||
another_build_path = dut.app.binary_path.replace('unicore_cfg', 'multicore_cfg')
|
||||
print('Using binary from another_build_path: {}'.format(another_build_path))
|
||||
dut.bootloader_flash(another_build_path)
|
||||
dut.expect('Multicore bootloader')
|
||||
dut.expect('Unicore app')
|
||||
dut.expect('App is running')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_multicore_app_and_unicore_bootloader()
|
||||
test_unicore_app_and_multicore_bootloader()
|
@ -0,0 +1 @@
|
||||
idf_component_register(SRCS "main.c")
|
12
tools/test_apps/system/unicore_bootloader/main/main.c
Normal file
12
tools/test_apps/system/unicore_bootloader/main/main.c
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
printf("App is running\n");
|
||||
}
|
@ -0,0 +1 @@
|
||||
CONFIG_FREERTOS_UNICORE=y
|
Reference in New Issue
Block a user